diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5f515f55..fe890a7b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,54 +1,101 @@ on: + push: + branches: + - '**' + pull_request: repository_dispatch: - types: [spec_release] -#on: push + types: [release] + workflow_dispatch: + inputs: + json: + description: Passed json from repository_dispatch + required: true + type: string + version_postfix: + description: Additional string to concatenate onto the existing version before release + required: false + type: string + default: '' + workflow_call: + inputs: + ref: + description: Ref of this repository to build. + required: false + type: string + default: main -name: Generate VRChat API SDK +name: CI + +env: + PASSED_VERSION: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json || '{}'))['version'] }} + VERSION_POSTPEND: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix || '' }} jobs: generate: runs-on: ubuntu-latest - name: Generate VRChat API SDK steps: - - uses: actions/setup-node@v1 - with: - node-version: 16 - - uses: actions/checkout@v2 - - name: 'Cache node_modules' - uses: actions/cache@v2 - with: - path: node_modules - key: ${{ runner.os }}-node-v16-${{ hashFiles('**/generate.sh') }} - restore-keys: | - ${{ runner.os }}-node-v16 - - name: Install OpenAPI Generator CLI - run: npm install @openapitools/openapi-generator-cli - - name: Set OpenAPI Generator version - run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 5.3.0 - - name: Generate SDK Client - run: bash ./generate.sh - - name: Check version number - run: | - echo "spec_version=$(grep "version =" build.gradle | cut -d "'" -f 2)" >> $GITHUB_ENV - - name: Print version number - run: echo ${{ env.spec_version }} - - name: Deploy SDK back into main branch - uses: JamesIves/github-pages-deploy-action@4.1.5 + - uses: actions/checkout@v7 + with: + repository: vrchatapi/vrchatapi-java + ref: ${{ inputs.ref || github.ref }} + + - uses: vrchatapi/specification/.github/actions/setup-generator@main + + - uses: vrchatapi/specification/.github/actions/download@main + with: + bundle: openapi-legacy.yaml + + - if: env.VERSION_POSTPEND != '' + run: yq '--inplace' ".info.version |= \"${PASSED_VERSION}${VERSION_POSTPEND}\"" openapi-legacy.yaml + + - run: bash ./generate.sh openapi-legacy.yaml + + - uses: actions/upload-artifact@v7 + with: + name: java-generated + path: . + include-hidden-files: true + + test: + needs: generate + runs-on: ubuntu-latest + strategy: + matrix: + java: ['17', '21'] + steps: + - uses: actions/download-artifact@v8 + with: + name: java-generated + + - uses: actions/setup-java@v5.7.0 + with: + java-version: ${{ matrix.java }} + distribution: temurin + cache: maven + + - run: mvn -B package --no-transfer-progress + + publish: + needs: + - generate + - test + if: github.repository == 'vrchatapi/vrchatapi-java' + && (github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + repository: vrchatapi/vrchatapi-java + + - uses: actions/download-artifact@v8 + with: + name: java-generated + + - run: rm -f openapi-legacy.yaml + + - uses: JamesIves/github-pages-deploy-action@v4.9.0 with: branch: main folder: . - commit-message: "Upgrade Java SDK to spec ${{ env.spec_version }}" - -# gradle: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v2 -# - name: Set up JDK 13 -# uses: actions/setup-java@v2 -# with: -# java-version: '13' -# distribution: 'adopt' -# - name: Validate Gradle wrapper -# uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b -# - name: Build with Gradle -# run: chmod ugo+x gradlew; ./gradlew build \ No newline at end of file + commit-message: Upgrade Java SDK to spec ${{ env.PASSED_VERSION }}${{ env.VERSION_POSTPEND }} + tag: ${{ env.PASSED_VERSION }}${{ env.VERSION_POSTPEND }} diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d531f328..e372e66b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,30 +1,117 @@ +.github/workflows/maven.yml api/openapi.yaml build.gradle build.sbt docs/APIConfig.md -docs/APIEventConfig.md +docs/APIConfigAccessLogsUrls.md +docs/APIConfigAnnouncement.md +docs/APIConfigAudioConfig.md +docs/APIConfigAvatarPerfLimiter.md +docs/APIConfigConstants.md +docs/APIConfigConstantsGROUPS.md +docs/APIConfigConstantsINSTANCE.md +docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.md +docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.md +docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.md +docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.md +docs/APIConfigConstantsLANGUAGE.md +docs/APIConfigDownloadURLList.md +docs/APIConfigEvents.md +docs/APIConfigIosVersion.md +docs/APIConfigMinSupportedClientBuildNumber.md +docs/APIConfigOfflineAnalysis.md docs/APIHealth.md +docs/AccountDeletionLog.md docs/AddFavoriteRequest.md +docs/AddGroupGalleryImageRequest.md +docs/AdminAssetBundle.md +docs/AdminUnityPackage.md +docs/AgeVerificationStatus.md +docs/Agreement.md +docs/AgreementCode.md +docs/AgreementRequest.md +docs/AgreementStatus.md docs/AuthenticationApi.md docs/Avatar.md +docs/AvatarModeration.md +docs/AvatarModerationCreated.md +docs/AvatarModerationType.md +docs/AvatarPerformance.md +docs/AvatarPublishedListingsInner.md +docs/AvatarStyle.md +docs/AvatarStyles.md docs/AvatarUnityPackageUrlObject.md docs/AvatarsApi.md +docs/Badge.md +docs/Balance.md +docs/BanGroupMemberRequest.md +docs/BoopRequest.md +docs/CalendarApi.md +docs/CalendarDayOfWeek.md +docs/CalendarEvent.md +docs/CalendarEventAccess.md +docs/CalendarEventCategory.md +docs/CalendarEventDiscovery.md +docs/CalendarEventDiscoveryInclusion.md +docs/CalendarEventDiscoveryScope.md +docs/CalendarEventFrequency.md +docs/CalendarEventOccurrenceKind.md +docs/CalendarEventPlatform.md +docs/CalendarEventRecurrence.md +docs/CalendarEventRecurrenceEnd.md +docs/CalendarEventRecurrenceEndType.md +docs/CalendarEventUserInterest.md +docs/ChangeUserTagsRequest.md +docs/ChangeWorldTagsRequest.md +docs/ContentFilter.md +docs/CreateAvatarModerationRequest.md docs/CreateAvatarRequest.md +docs/CreateCalendarEventRequest.md docs/CreateFileRequest.md docs/CreateFileVersionRequest.md +docs/CreateGroupAnnouncementRequest.md +docs/CreateGroupGalleryRequest.md +docs/CreateGroupInviteRequest.md +docs/CreateGroupPostRequest.md +docs/CreateGroupRequest.md +docs/CreateGroupRoleRequest.md +docs/CreateInstanceRequest.md +docs/CreateJamSubmissionRequest.md +docs/CreateListingRequest.md +docs/CreateProductRequest.md +docs/CreatePropRequest.md docs/CreateWorldRequest.md docs/CurrentUser.md -docs/DeploymentGroup.md +docs/CurrentUserPlatformHistoryInner.md +docs/CurrentUserPresence.md +docs/DeclineGroupInviteRequest.md docs/DeveloperType.md -docs/DownloadURLList.md +docs/Disable2FAResult.md +docs/DiscordDetails.md docs/DynamicContentRow.md +docs/EarningsMetrics.md +docs/EarningsMetricsTotals.md +docs/EconomyAccount.md docs/EconomyApi.md +docs/EconomyBalances.md +docs/EconomyPayout.md +docs/EconomyPayoutEligibility.md +docs/EconomyPayoutList.md +docs/EconomyPayoutStatus.md +docs/EditPrintRequest.md +docs/EquipInventoryItemRequest.md docs/Error.md docs/Favorite.md docs/FavoriteGroup.md +docs/FavoriteGroupLimits.md docs/FavoriteGroupVisibility.md +docs/FavoriteLimits.md docs/FavoriteType.md +docs/FavoritedWorld.md docs/FavoritesApi.md +docs/Feedback.md +docs/FileAnalysis.md +docs/FileAnalysisAvatarStats.md docs/FileData.md docs/FileStatus.md docs/FileUploadURL.md @@ -32,67 +119,238 @@ docs/FileVersion.md docs/FileVersionUploadStatus.md docs/FilesApi.md docs/FinishFileDataUploadRequest.md +docs/FollowCalendarEventRequest.md docs/FriendStatus.md docs/FriendsApi.md +docs/GetGroupPosts200Response.md +docs/GetUserGroupInstances200Response.md +docs/Group.md +docs/GroupAccessType.md +docs/GroupAnnouncement.md +docs/GroupAuditLogEntry.md +docs/GroupGallery.md +docs/GroupGalleryFileOrder.md +docs/GroupGalleryFileOrderRequest.md +docs/GroupGalleryImage.md +docs/GroupInstance.md +docs/GroupJoinRequestAction.md +docs/GroupJoinState.md +docs/GroupMember.md +docs/GroupMemberLimitedUser.md +docs/GroupMemberStatus.md +docs/GroupMyMember.md +docs/GroupPermission.md +docs/GroupPermissions.md +docs/GroupPost.md +docs/GroupPostVisibility.md +docs/GroupPrivacy.md +docs/GroupRole.md +docs/GroupRoleTemplate.md +docs/GroupRoleTemplateValues.md +docs/GroupRoleTemplateValuesRoles.md +docs/GroupSearchSort.md +docs/GroupTransferable.md +docs/GroupTransferableRequirements.md +docs/GroupUserVisibility.md +docs/GroupsApi.md +docs/ImageAnimationStyle.md +docs/ImageLoopStyle.md +docs/ImageMask.md +docs/ImagePurpose.md docs/InfoPush.md docs/InfoPushData.md docs/InfoPushDataArticle.md docs/InfoPushDataArticleContent.md docs/InfoPushDataClickable.md docs/Instance.md +docs/InstanceContentSettings.md docs/InstancePlatforms.md +docs/InstanceRegion.md +docs/InstanceShortNameResponse.md docs/InstanceType.md docs/InstancesApi.md +docs/Inventory.md +docs/InventoryApi.md +docs/InventoryConsumptionResults.md +docs/InventoryDefaultAttributesValue.md +docs/InventoryDefaultAttributesValueValidator.md +docs/InventoryDrop.md +docs/InventoryEquipSlot.md +docs/InventoryFlag.md +docs/InventoryItem.md +docs/InventoryItemType.md +docs/InventoryMetadata.md +docs/InventoryNotificationDetails.md +docs/InventorySpawn.md +docs/InventoryTemplate.md +docs/InventoryUserAttributes.md docs/InviteApi.md docs/InviteMessage.md docs/InviteMessageType.md docs/InviteRequest.md docs/InviteResponse.md +docs/InviteUserWithPhotoRequest.md +docs/Jam.md +docs/JamStateChangeDates.md +docs/JamSubmission.md +docs/JamsApi.md +docs/JoinGroupRequest.md docs/License.md docs/LicenseAction.md docs/LicenseGroup.md docs/LicenseType.md +docs/LimitedGroup.md docs/LimitedUnityPackage.md -docs/LimitedUser.md +docs/LimitedUserFriend.md +docs/LimitedUserGroups.md +docs/LimitedUserInstance.md +docs/LimitedUserSearch.md docs/LimitedWorld.md docs/MIMEType.md +docs/MiscellaneousApi.md +docs/ModelFile.md docs/ModerateUserRequest.md +docs/ModerationReport.md +docs/MutualFriend.md +docs/Mutuals.md docs/Notification.md +docs/NotificationDetailInvite.md +docs/NotificationDetailInviteResponse.md +docs/NotificationDetailRequestInvite.md +docs/NotificationDetailRequestInviteResponse.md +docs/NotificationDetailVoteToKick.md docs/NotificationType.md +docs/NotificationV2.md +docs/NotificationV2DetailsBoop.md +docs/NotificationV2Response.md +docs/NotificationV2Type.md docs/NotificationsApi.md +docs/OkStatus.md +docs/OkStatus2.md +docs/OrderOption.md +docs/OrderOptionShort.md +docs/PaginatedCalendarEventList.md +docs/PaginatedGroupAuditLogEntryList.md +docs/PaginatedModerationReportList.md docs/PastDisplayName.md +docs/Pending2FAResult.md +docs/PerformanceLimiterInfo.md +docs/PerformanceRatings.md docs/Permission.md -docs/PermissionsApi.md +docs/PermissionData.md +docs/PlatformBuildInfo.md docs/PlayerModeration.md docs/PlayerModerationType.md docs/PlayermoderationApi.md -docs/PublicAnnouncement.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 +docs/ProductListingVariant.md +docs/ProductPurchase.md +docs/ProductPurchaseHistory.md +docs/ProductPurchaseLocationType.md +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/RegisterUserAccountRequest.md docs/ReleaseStatus.md +docs/ReportCategory.md +docs/ReportReason.md +docs/RepresentedGroup.md docs/RequestInviteRequest.md +docs/RequestInviteWithPhotoRequest.md +docs/RespondGroupJoinRequest.md +docs/RespondInviteWithPhotoRequest.md +docs/RespondNotificationV2Request.md docs/Response.md +docs/RewardBadge.md +docs/RewardRedemption.md +docs/RewardRedemptionData.md +docs/RewardRedemptionRequest.md +docs/RewardRedemptionResult.md +docs/SearchGroupMembers200Response.md +docs/SellerEligibility.md +docs/SentNotification.md +docs/ServiceQueueStats.md +docs/ServiceStatus.md +docs/ShareInventoryItemDirectRequest.md +docs/SortOption.md +docs/SortOptionProductPurchase.md +docs/Store.md +docs/StoreContext.md +docs/StoreShelf.md +docs/StoreType.md +docs/StoreView.md +docs/SubmitModerationReportRequest.md +docs/SubmitModerationReportRequestDetails.md docs/Subscription.md docs/SubscriptionPeriod.md docs/Success.md -docs/SystemApi.md +docs/SuccessFlag.md +docs/TiliaKyc.md +docs/TiliaStatus.md +docs/TiliaTOS.md +docs/TokenBundle.md docs/Transaction.md docs/TransactionAgreement.md docs/TransactionStatus.md docs/TransactionSteamInfo.md docs/TransactionSteamWalletInfo.md +docs/TransferGroupRequest.md +docs/TutorialStatus.md docs/TwoFactorAuthCode.md +docs/TwoFactorEmailCode.md +docs/TwoFactorRecoveryCodes.md +docs/TwoFactorRecoveryCodesOtpInner.md docs/UnityPackage.md +docs/UpdateAssetReviewNotesRequest.md docs/UpdateAvatarRequest.md +docs/UpdateCalendarEventRequest.md docs/UpdateFavoriteGroupRequest.md +docs/UpdateGroupGalleryRequest.md +docs/UpdateGroupMemberRequest.md +docs/UpdateGroupRepresentationRequest.md +docs/UpdateGroupRequest.md +docs/UpdateGroupRoleRequest.md +docs/UpdateInventoryItemRequest.md docs/UpdateInviteMessageRequest.md +docs/UpdateListingRequest.md +docs/UpdateProductRequest.md +docs/UpdatePropRequest.md +docs/UpdateTiliaTOSRequest.md +docs/UpdateUserBadgeRequest.md +docs/UpdateUserNoteRequest.md docs/UpdateUserRequest.md docs/UpdateWorldRequest.md +docs/UploadGalleryImageRequest.md +docs/UploadImageRequest.md +docs/UploadPrintRequest.md docs/User.md +docs/UserCreditsEligible.md docs/UserExists.md +docs/UserNote.md +docs/UserNoteTargetUser.md docs/UserState.md docs/UserStatus.md docs/UserSubscription.md +docs/UserSubscriptionEligible.md docs/UsersApi.md +docs/Verify2FAEmailCodeResult.md docs/Verify2FAResult.md docs/VerifyAuthTokenResult.md docs/World.md @@ -123,16 +381,21 @@ src/main/java/io/github/vrchatapi/ServerVariable.java src/main/java/io/github/vrchatapi/StringUtil.java src/main/java/io/github/vrchatapi/api/AuthenticationApi.java src/main/java/io/github/vrchatapi/api/AvatarsApi.java +src/main/java/io/github/vrchatapi/api/CalendarApi.java src/main/java/io/github/vrchatapi/api/EconomyApi.java src/main/java/io/github/vrchatapi/api/FavoritesApi.java src/main/java/io/github/vrchatapi/api/FilesApi.java src/main/java/io/github/vrchatapi/api/FriendsApi.java +src/main/java/io/github/vrchatapi/api/GroupsApi.java src/main/java/io/github/vrchatapi/api/InstancesApi.java +src/main/java/io/github/vrchatapi/api/InventoryApi.java src/main/java/io/github/vrchatapi/api/InviteApi.java +src/main/java/io/github/vrchatapi/api/JamsApi.java +src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java src/main/java/io/github/vrchatapi/api/NotificationsApi.java -src/main/java/io/github/vrchatapi/api/PermissionsApi.java src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java -src/main/java/io/github/vrchatapi/api/SystemApi.java +src/main/java/io/github/vrchatapi/api/PrintsApi.java +src/main/java/io/github/vrchatapi/api/PropsApi.java src/main/java/io/github/vrchatapi/api/UsersApi.java src/main/java/io/github/vrchatapi/api/WorldsApi.java src/main/java/io/github/vrchatapi/auth/ApiKeyAuth.java @@ -140,84 +403,337 @@ src/main/java/io/github/vrchatapi/auth/Authentication.java src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java src/main/java/io/github/vrchatapi/model/APIConfig.java -src/main/java/io/github/vrchatapi/model/APIEventConfig.java +src/main/java/io/github/vrchatapi/model/APIConfigAccessLogsUrls.java +src/main/java/io/github/vrchatapi/model/APIConfigAnnouncement.java +src/main/java/io/github/vrchatapi/model/APIConfigAudioConfig.java +src/main/java/io/github/vrchatapi/model/APIConfigAvatarPerfLimiter.java +src/main/java/io/github/vrchatapi/model/APIConfigConstants.java +src/main/java/io/github/vrchatapi/model/APIConfigConstantsGROUPS.java +src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCE.java +src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.java +src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.java +src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.java +src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.java +src/main/java/io/github/vrchatapi/model/APIConfigConstantsLANGUAGE.java +src/main/java/io/github/vrchatapi/model/APIConfigDownloadURLList.java +src/main/java/io/github/vrchatapi/model/APIConfigEvents.java +src/main/java/io/github/vrchatapi/model/APIConfigIosVersion.java +src/main/java/io/github/vrchatapi/model/APIConfigMinSupportedClientBuildNumber.java +src/main/java/io/github/vrchatapi/model/APIConfigOfflineAnalysis.java src/main/java/io/github/vrchatapi/model/APIHealth.java +src/main/java/io/github/vrchatapi/model/AbstractOpenApiSchema.java +src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java src/main/java/io/github/vrchatapi/model/AddFavoriteRequest.java +src/main/java/io/github/vrchatapi/model/AddGroupGalleryImageRequest.java +src/main/java/io/github/vrchatapi/model/AdminAssetBundle.java +src/main/java/io/github/vrchatapi/model/AdminUnityPackage.java +src/main/java/io/github/vrchatapi/model/AgeVerificationStatus.java +src/main/java/io/github/vrchatapi/model/Agreement.java +src/main/java/io/github/vrchatapi/model/AgreementCode.java +src/main/java/io/github/vrchatapi/model/AgreementRequest.java +src/main/java/io/github/vrchatapi/model/AgreementStatus.java src/main/java/io/github/vrchatapi/model/Avatar.java +src/main/java/io/github/vrchatapi/model/AvatarModeration.java +src/main/java/io/github/vrchatapi/model/AvatarModerationCreated.java +src/main/java/io/github/vrchatapi/model/AvatarModerationType.java +src/main/java/io/github/vrchatapi/model/AvatarPerformance.java +src/main/java/io/github/vrchatapi/model/AvatarPublishedListingsInner.java +src/main/java/io/github/vrchatapi/model/AvatarStyle.java +src/main/java/io/github/vrchatapi/model/AvatarStyles.java src/main/java/io/github/vrchatapi/model/AvatarUnityPackageUrlObject.java +src/main/java/io/github/vrchatapi/model/Badge.java +src/main/java/io/github/vrchatapi/model/Balance.java +src/main/java/io/github/vrchatapi/model/BanGroupMemberRequest.java +src/main/java/io/github/vrchatapi/model/BoopRequest.java +src/main/java/io/github/vrchatapi/model/CalendarDayOfWeek.java +src/main/java/io/github/vrchatapi/model/CalendarEvent.java +src/main/java/io/github/vrchatapi/model/CalendarEventAccess.java +src/main/java/io/github/vrchatapi/model/CalendarEventCategory.java +src/main/java/io/github/vrchatapi/model/CalendarEventDiscovery.java +src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryInclusion.java +src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryScope.java +src/main/java/io/github/vrchatapi/model/CalendarEventFrequency.java +src/main/java/io/github/vrchatapi/model/CalendarEventOccurrenceKind.java +src/main/java/io/github/vrchatapi/model/CalendarEventPlatform.java +src/main/java/io/github/vrchatapi/model/CalendarEventRecurrence.java +src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEnd.java +src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEndType.java +src/main/java/io/github/vrchatapi/model/CalendarEventUserInterest.java +src/main/java/io/github/vrchatapi/model/ChangeUserTagsRequest.java +src/main/java/io/github/vrchatapi/model/ChangeWorldTagsRequest.java +src/main/java/io/github/vrchatapi/model/ContentFilter.java +src/main/java/io/github/vrchatapi/model/CreateAvatarModerationRequest.java src/main/java/io/github/vrchatapi/model/CreateAvatarRequest.java +src/main/java/io/github/vrchatapi/model/CreateCalendarEventRequest.java src/main/java/io/github/vrchatapi/model/CreateFileRequest.java src/main/java/io/github/vrchatapi/model/CreateFileVersionRequest.java +src/main/java/io/github/vrchatapi/model/CreateGroupAnnouncementRequest.java +src/main/java/io/github/vrchatapi/model/CreateGroupGalleryRequest.java +src/main/java/io/github/vrchatapi/model/CreateGroupInviteRequest.java +src/main/java/io/github/vrchatapi/model/CreateGroupPostRequest.java +src/main/java/io/github/vrchatapi/model/CreateGroupRequest.java +src/main/java/io/github/vrchatapi/model/CreateGroupRoleRequest.java +src/main/java/io/github/vrchatapi/model/CreateInstanceRequest.java +src/main/java/io/github/vrchatapi/model/CreateJamSubmissionRequest.java +src/main/java/io/github/vrchatapi/model/CreateListingRequest.java +src/main/java/io/github/vrchatapi/model/CreateProductRequest.java +src/main/java/io/github/vrchatapi/model/CreatePropRequest.java src/main/java/io/github/vrchatapi/model/CreateWorldRequest.java src/main/java/io/github/vrchatapi/model/CurrentUser.java -src/main/java/io/github/vrchatapi/model/DeploymentGroup.java +src/main/java/io/github/vrchatapi/model/CurrentUserPlatformHistoryInner.java +src/main/java/io/github/vrchatapi/model/CurrentUserPresence.java +src/main/java/io/github/vrchatapi/model/DeclineGroupInviteRequest.java src/main/java/io/github/vrchatapi/model/DeveloperType.java -src/main/java/io/github/vrchatapi/model/DownloadURLList.java +src/main/java/io/github/vrchatapi/model/Disable2FAResult.java +src/main/java/io/github/vrchatapi/model/DiscordDetails.java src/main/java/io/github/vrchatapi/model/DynamicContentRow.java +src/main/java/io/github/vrchatapi/model/EarningsMetrics.java +src/main/java/io/github/vrchatapi/model/EarningsMetricsTotals.java +src/main/java/io/github/vrchatapi/model/EconomyAccount.java +src/main/java/io/github/vrchatapi/model/EconomyBalances.java +src/main/java/io/github/vrchatapi/model/EconomyPayout.java +src/main/java/io/github/vrchatapi/model/EconomyPayoutEligibility.java +src/main/java/io/github/vrchatapi/model/EconomyPayoutList.java +src/main/java/io/github/vrchatapi/model/EconomyPayoutStatus.java +src/main/java/io/github/vrchatapi/model/EditPrintRequest.java +src/main/java/io/github/vrchatapi/model/EquipInventoryItemRequest.java src/main/java/io/github/vrchatapi/model/Error.java src/main/java/io/github/vrchatapi/model/Favorite.java src/main/java/io/github/vrchatapi/model/FavoriteGroup.java +src/main/java/io/github/vrchatapi/model/FavoriteGroupLimits.java src/main/java/io/github/vrchatapi/model/FavoriteGroupVisibility.java +src/main/java/io/github/vrchatapi/model/FavoriteLimits.java src/main/java/io/github/vrchatapi/model/FavoriteType.java +src/main/java/io/github/vrchatapi/model/FavoritedWorld.java +src/main/java/io/github/vrchatapi/model/Feedback.java +src/main/java/io/github/vrchatapi/model/FileAnalysis.java +src/main/java/io/github/vrchatapi/model/FileAnalysisAvatarStats.java src/main/java/io/github/vrchatapi/model/FileData.java src/main/java/io/github/vrchatapi/model/FileStatus.java src/main/java/io/github/vrchatapi/model/FileUploadURL.java src/main/java/io/github/vrchatapi/model/FileVersion.java src/main/java/io/github/vrchatapi/model/FileVersionUploadStatus.java src/main/java/io/github/vrchatapi/model/FinishFileDataUploadRequest.java +src/main/java/io/github/vrchatapi/model/FollowCalendarEventRequest.java src/main/java/io/github/vrchatapi/model/FriendStatus.java +src/main/java/io/github/vrchatapi/model/GetGroupPosts200Response.java +src/main/java/io/github/vrchatapi/model/GetUserGroupInstances200Response.java +src/main/java/io/github/vrchatapi/model/Group.java +src/main/java/io/github/vrchatapi/model/GroupAccessType.java +src/main/java/io/github/vrchatapi/model/GroupAnnouncement.java +src/main/java/io/github/vrchatapi/model/GroupAuditLogEntry.java +src/main/java/io/github/vrchatapi/model/GroupGallery.java +src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrder.java +src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrderRequest.java +src/main/java/io/github/vrchatapi/model/GroupGalleryImage.java +src/main/java/io/github/vrchatapi/model/GroupInstance.java +src/main/java/io/github/vrchatapi/model/GroupJoinRequestAction.java +src/main/java/io/github/vrchatapi/model/GroupJoinState.java +src/main/java/io/github/vrchatapi/model/GroupMember.java +src/main/java/io/github/vrchatapi/model/GroupMemberLimitedUser.java +src/main/java/io/github/vrchatapi/model/GroupMemberStatus.java +src/main/java/io/github/vrchatapi/model/GroupMyMember.java +src/main/java/io/github/vrchatapi/model/GroupPermission.java +src/main/java/io/github/vrchatapi/model/GroupPermissions.java +src/main/java/io/github/vrchatapi/model/GroupPost.java +src/main/java/io/github/vrchatapi/model/GroupPostVisibility.java +src/main/java/io/github/vrchatapi/model/GroupPrivacy.java +src/main/java/io/github/vrchatapi/model/GroupRole.java +src/main/java/io/github/vrchatapi/model/GroupRoleTemplate.java +src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValues.java +src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValuesRoles.java +src/main/java/io/github/vrchatapi/model/GroupSearchSort.java +src/main/java/io/github/vrchatapi/model/GroupTransferable.java +src/main/java/io/github/vrchatapi/model/GroupTransferableRequirements.java +src/main/java/io/github/vrchatapi/model/GroupUserVisibility.java +src/main/java/io/github/vrchatapi/model/ImageAnimationStyle.java +src/main/java/io/github/vrchatapi/model/ImageLoopStyle.java +src/main/java/io/github/vrchatapi/model/ImageMask.java +src/main/java/io/github/vrchatapi/model/ImagePurpose.java src/main/java/io/github/vrchatapi/model/InfoPush.java src/main/java/io/github/vrchatapi/model/InfoPushData.java src/main/java/io/github/vrchatapi/model/InfoPushDataArticle.java src/main/java/io/github/vrchatapi/model/InfoPushDataArticleContent.java src/main/java/io/github/vrchatapi/model/InfoPushDataClickable.java src/main/java/io/github/vrchatapi/model/Instance.java +src/main/java/io/github/vrchatapi/model/InstanceContentSettings.java src/main/java/io/github/vrchatapi/model/InstancePlatforms.java +src/main/java/io/github/vrchatapi/model/InstanceRegion.java +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/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 +src/main/java/io/github/vrchatapi/model/InventoryItem.java +src/main/java/io/github/vrchatapi/model/InventoryItemType.java +src/main/java/io/github/vrchatapi/model/InventoryMetadata.java +src/main/java/io/github/vrchatapi/model/InventoryNotificationDetails.java +src/main/java/io/github/vrchatapi/model/InventorySpawn.java +src/main/java/io/github/vrchatapi/model/InventoryTemplate.java +src/main/java/io/github/vrchatapi/model/InventoryUserAttributes.java src/main/java/io/github/vrchatapi/model/InviteMessage.java src/main/java/io/github/vrchatapi/model/InviteMessageType.java src/main/java/io/github/vrchatapi/model/InviteRequest.java src/main/java/io/github/vrchatapi/model/InviteResponse.java +src/main/java/io/github/vrchatapi/model/InviteUserWithPhotoRequest.java +src/main/java/io/github/vrchatapi/model/Jam.java +src/main/java/io/github/vrchatapi/model/JamStateChangeDates.java +src/main/java/io/github/vrchatapi/model/JamSubmission.java +src/main/java/io/github/vrchatapi/model/JoinGroupRequest.java src/main/java/io/github/vrchatapi/model/License.java src/main/java/io/github/vrchatapi/model/LicenseAction.java src/main/java/io/github/vrchatapi/model/LicenseGroup.java src/main/java/io/github/vrchatapi/model/LicenseType.java +src/main/java/io/github/vrchatapi/model/LimitedGroup.java src/main/java/io/github/vrchatapi/model/LimitedUnityPackage.java -src/main/java/io/github/vrchatapi/model/LimitedUser.java +src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java +src/main/java/io/github/vrchatapi/model/LimitedUserGroups.java +src/main/java/io/github/vrchatapi/model/LimitedUserInstance.java +src/main/java/io/github/vrchatapi/model/LimitedUserSearch.java src/main/java/io/github/vrchatapi/model/LimitedWorld.java src/main/java/io/github/vrchatapi/model/MIMEType.java +src/main/java/io/github/vrchatapi/model/ModelFile.java src/main/java/io/github/vrchatapi/model/ModerateUserRequest.java +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/NotificationDetailInvite.java +src/main/java/io/github/vrchatapi/model/NotificationDetailInviteResponse.java +src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInvite.java +src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInviteResponse.java +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/NotificationV2DetailsBoop.java +src/main/java/io/github/vrchatapi/model/NotificationV2Response.java +src/main/java/io/github/vrchatapi/model/NotificationV2Type.java +src/main/java/io/github/vrchatapi/model/OkStatus.java +src/main/java/io/github/vrchatapi/model/OkStatus2.java +src/main/java/io/github/vrchatapi/model/OrderOption.java +src/main/java/io/github/vrchatapi/model/OrderOptionShort.java +src/main/java/io/github/vrchatapi/model/PaginatedCalendarEventList.java +src/main/java/io/github/vrchatapi/model/PaginatedGroupAuditLogEntryList.java +src/main/java/io/github/vrchatapi/model/PaginatedModerationReportList.java src/main/java/io/github/vrchatapi/model/PastDisplayName.java +src/main/java/io/github/vrchatapi/model/Pending2FAResult.java +src/main/java/io/github/vrchatapi/model/PerformanceLimiterInfo.java +src/main/java/io/github/vrchatapi/model/PerformanceRatings.java src/main/java/io/github/vrchatapi/model/Permission.java +src/main/java/io/github/vrchatapi/model/PermissionData.java +src/main/java/io/github/vrchatapi/model/PlatformBuildInfo.java 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/PublicAnnouncement.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 +src/main/java/io/github/vrchatapi/model/ProductListingVariant.java +src/main/java/io/github/vrchatapi/model/ProductPurchase.java +src/main/java/io/github/vrchatapi/model/ProductPurchaseHistory.java +src/main/java/io/github/vrchatapi/model/ProductPurchaseLocationType.java +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/RegisterUserAccountRequest.java src/main/java/io/github/vrchatapi/model/ReleaseStatus.java +src/main/java/io/github/vrchatapi/model/ReportCategory.java +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/RespondGroupJoinRequest.java +src/main/java/io/github/vrchatapi/model/RespondInviteWithPhotoRequest.java +src/main/java/io/github/vrchatapi/model/RespondNotificationV2Request.java src/main/java/io/github/vrchatapi/model/Response.java +src/main/java/io/github/vrchatapi/model/RewardBadge.java +src/main/java/io/github/vrchatapi/model/RewardRedemption.java +src/main/java/io/github/vrchatapi/model/RewardRedemptionData.java +src/main/java/io/github/vrchatapi/model/RewardRedemptionRequest.java +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/ServiceQueueStats.java +src/main/java/io/github/vrchatapi/model/ServiceStatus.java +src/main/java/io/github/vrchatapi/model/ShareInventoryItemDirectRequest.java +src/main/java/io/github/vrchatapi/model/SortOption.java +src/main/java/io/github/vrchatapi/model/SortOptionProductPurchase.java +src/main/java/io/github/vrchatapi/model/Store.java +src/main/java/io/github/vrchatapi/model/StoreContext.java +src/main/java/io/github/vrchatapi/model/StoreShelf.java +src/main/java/io/github/vrchatapi/model/StoreType.java +src/main/java/io/github/vrchatapi/model/StoreView.java +src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequest.java +src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequestDetails.java src/main/java/io/github/vrchatapi/model/Subscription.java src/main/java/io/github/vrchatapi/model/SubscriptionPeriod.java src/main/java/io/github/vrchatapi/model/Success.java +src/main/java/io/github/vrchatapi/model/SuccessFlag.java +src/main/java/io/github/vrchatapi/model/TiliaKyc.java +src/main/java/io/github/vrchatapi/model/TiliaStatus.java +src/main/java/io/github/vrchatapi/model/TiliaTOS.java +src/main/java/io/github/vrchatapi/model/TokenBundle.java src/main/java/io/github/vrchatapi/model/Transaction.java src/main/java/io/github/vrchatapi/model/TransactionAgreement.java src/main/java/io/github/vrchatapi/model/TransactionStatus.java src/main/java/io/github/vrchatapi/model/TransactionSteamInfo.java 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/TwoFactorEmailCode.java +src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodes.java +src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodesOtpInner.java src/main/java/io/github/vrchatapi/model/UnityPackage.java +src/main/java/io/github/vrchatapi/model/UpdateAssetReviewNotesRequest.java src/main/java/io/github/vrchatapi/model/UpdateAvatarRequest.java +src/main/java/io/github/vrchatapi/model/UpdateCalendarEventRequest.java src/main/java/io/github/vrchatapi/model/UpdateFavoriteGroupRequest.java +src/main/java/io/github/vrchatapi/model/UpdateGroupGalleryRequest.java +src/main/java/io/github/vrchatapi/model/UpdateGroupMemberRequest.java +src/main/java/io/github/vrchatapi/model/UpdateGroupRepresentationRequest.java +src/main/java/io/github/vrchatapi/model/UpdateGroupRequest.java +src/main/java/io/github/vrchatapi/model/UpdateGroupRoleRequest.java +src/main/java/io/github/vrchatapi/model/UpdateInventoryItemRequest.java src/main/java/io/github/vrchatapi/model/UpdateInviteMessageRequest.java +src/main/java/io/github/vrchatapi/model/UpdateListingRequest.java +src/main/java/io/github/vrchatapi/model/UpdateProductRequest.java +src/main/java/io/github/vrchatapi/model/UpdatePropRequest.java +src/main/java/io/github/vrchatapi/model/UpdateTiliaTOSRequest.java +src/main/java/io/github/vrchatapi/model/UpdateUserBadgeRequest.java +src/main/java/io/github/vrchatapi/model/UpdateUserNoteRequest.java src/main/java/io/github/vrchatapi/model/UpdateUserRequest.java src/main/java/io/github/vrchatapi/model/UpdateWorldRequest.java +src/main/java/io/github/vrchatapi/model/UploadGalleryImageRequest.java +src/main/java/io/github/vrchatapi/model/UploadImageRequest.java +src/main/java/io/github/vrchatapi/model/UploadPrintRequest.java src/main/java/io/github/vrchatapi/model/User.java +src/main/java/io/github/vrchatapi/model/UserCreditsEligible.java src/main/java/io/github/vrchatapi/model/UserExists.java +src/main/java/io/github/vrchatapi/model/UserNote.java +src/main/java/io/github/vrchatapi/model/UserNoteTargetUser.java src/main/java/io/github/vrchatapi/model/UserState.java src/main/java/io/github/vrchatapi/model/UserStatus.java src/main/java/io/github/vrchatapi/model/UserSubscription.java +src/main/java/io/github/vrchatapi/model/UserSubscriptionEligible.java +src/main/java/io/github/vrchatapi/model/Verify2FAEmailCodeResult.java src/main/java/io/github/vrchatapi/model/Verify2FAResult.java src/main/java/io/github/vrchatapi/model/VerifyAuthTokenResult.java src/main/java/io/github/vrchatapi/model/World.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index e230c839..07832195 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0 \ No newline at end of file +7.24.0 diff --git a/README.md b/README.md index 5fec0c1d..ef243cf0 100644 --- a/README.md +++ b/README.md @@ -49,22 +49,42 @@ dependencies { Below is an example on how to login to the API and fetch your own user information. ```java -// Step 1. VRChat consists of several API's + // Step 1. VRChat consists of several API's // e.g. (WorldsApi, UsersApi, FilesApi, NotificationsApi, FriendsApi, etc...) // Here we instantiate the Authentication API which is required for logging in. ApiClient defaultClient = Configuration.getDefaultApiClient(); AuthenticationApi authApi = new AuthenticationApi(defaultClient); // Step 2. We begin with creating a Configuration -// This contains the username and password for authentication. +// This contains the username and password for authentication, as well as a user agent. HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader"); authHeader.setUsername("username"); authHeader.setPassword("password"); +defaultClient.setUserAgent("ExampleProgram/0.0.1 my@email.com"); + // Step 3. Call getCurrentUser on Authentication API. -// This logs you in if the user isn't already logged in. -CurrentUser result = authApi.getCurrentUser(); -System.out.println(result.getDisplayName()); +BufferedReader reader = new BufferedReader( new InputStreamReader( System.in ) ); +try { + authApi.getCurrentUser(); +} +catch (IllegalArgumentException e){ + // Step 4. Verify using 2fa. + if (e.toString().contains("emailOtp")){ + System.out.println("2FA Email code:"); + TwoFactorEmailCode code = new TwoFactorEmailCode(); + code.setCode(reader.readLine()); + authApi.verify2FAEmailCode(code); + } else { + System.out.println("2FA Authenticator code:"); + TwoFactorAuthCode code = new TwoFactorAuthCode(); + code.setCode(reader.readLine()); + authApi.verify2FA(code); + } +} + +CurrentUser user = authApi.getCurrentUser(); +System.out.println("Logged in as: " + user.getDisplayName()); ``` See [examples](https://github.com/vrchatapi/vrchatapi-java/blob/master/examples) for more example usage on getting started. diff --git a/build.gradle b/build.gradle index 7783f6c3..3bc1398d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,10 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' group = 'io.github.vrchatapi' -version = '1.6.9' +version = '1.20.8' buildscript { repositories { @@ -11,7 +12,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' } } @@ -60,10 +62,10 @@ 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" - artifacts.add('archives', task); + 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) } } @@ -104,20 +106,61 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.5.24' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.1' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' - implementation 'com.google.code.gson:gson:2.8.6' - implementation 'io.gsonfire:gson-fire:1.8.4' - implementation 'org.openapitools:jackson-databind-nullable:0.2.1' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' - implementation 'org.threeten:threetenbp:1.4.3' + 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.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 'junit:junit:4.13.1' - testImplementation 'org.mockito:mockito-core:3.11.2' + 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.10.3' } javadoc { options.tags = [ "http.response.details:a:Http Response Details" ] } + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/build.sbt b/build.sbt index 7a9c8f8d..d4b30401 100644 --- a/build.sbt +++ b/build.sbt @@ -2,25 +2,26 @@ lazy val root = (project in file(".")). settings( organization := "io.github.vrchatapi", name := "vrchatapi", - version := "1.6.9", - scalaVersion := "2.11.4", + version := "1.20.8", + 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.5.24", - "com.squareup.okhttp3" % "okhttp" % "4.9.1", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", - "com.google.code.gson" % "gson" % "2.8.6", - "org.apache.commons" % "commons-lang3" % "3.10", - "org.openapitools" % "jackson-databind-nullable" % "0.2.1", - "org.threeten" % "threetenbp" % "1.4.3" % "compile", - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "io.swagger" % "swagger-annotations" % "1.6.5", + "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.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", - "junit" % "junit" % "4.13.1" % "test", - "com.novocode" % "junit-interface" % "0.10" % "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/APIConfig.md b/docs/APIConfig.md index 94a992e1..115df0e2 100644 --- a/docs/APIConfig.md +++ b/docs/APIConfig.md @@ -2,91 +2,138 @@ # APIConfig +Global configuration for various features. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**voiceEnableDegradation** | **Boolean** | Unknown, probably voice optimization testing | -**voiceEnableReceiverLimiting** | **Boolean** | Unknown, probably voice optimization testing | -**address** | **String** | VRChat's office address | -**announcements** | [**Set<PublicAnnouncement>**](PublicAnnouncement.md) | Public Announcements | -**apiKey** | **String** | apiKey to be used for all other requests | -**appName** | **String** | Game name | -**buildVersionTag** | **String** | Build tag of the API server | -**clientApiKey** | **String** | apiKey to be used for all other requests | -**clientBPSCeiling** | **Integer** | Unknown | -**clientDisconnectTimeout** | **Integer** | Unknown | -**clientReservedPlayerBPS** | **Integer** | Unknown | -**clientSentCountAllowance** | **Integer** | Unknown | -**contactEmail** | **String** | VRChat's contact email | -**copyrightEmail** | **String** | VRChat's copyright-issues-related email | -**currentTOSVersion** | **Integer** | Current version number of the Terms of Service | -**defaultAvatar** | **String** | | -**deploymentGroup** | **DeploymentGroup** | | -**devAppVersionStandalone** | **String** | Version number for game development build | -**devDownloadLinkWindows** | **String** | Developer Download link | -**devSdkUrl** | **String** | Link to download the development SDK, use downloadUrls instead | -**devSdkVersion** | **String** | Version of the development SDK | -**devServerVersionStandalone** | **String** | Version number for server development build | -**disCountdown** | **OffsetDateTime** | Unknown, \"dis\" maybe for disconnect? | -**disableAvatarCopying** | **Boolean** | Toggles if copying avatars should be disabled | -**disableAvatarGating** | **Boolean** | 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 | -**disableCommunityLabs** | **Boolean** | Toggles if the Community Labs should be disabled | -**disableCommunityLabsPromotion** | **Boolean** | Toggles if promotion out of Community Labs should be disabled | -**disableEmail** | **Boolean** | Unknown | -**disableEventStream** | **Boolean** | Toggles if Analytics should be disabled. | -**disableFeedbackGating** | **Boolean** | 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. | -**disableFrontendBuilds** | **Boolean** | Unknown, probably toggles compilation of frontend web builds? So internal flag? | -**disableHello** | **Boolean** | Unknown | -**disableOculusSubs** | **Boolean** | Toggles if signing up for Subscriptions in Oculus is disabled or not. | -**disableRegistration** | **Boolean** | Toggles if new user account registration should be disabled. | -**disableSteamNetworking** | **Boolean** | Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead. | -**disableTwoFactorAuth** | **Boolean** | Toggles if 2FA should be disabled. | -**disableUdon** | **Boolean** | Toggles if Udon should be universally disabled in-game. | -**disableUpgradeAccount** | **Boolean** | Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. | -**downloadLinkWindows** | **String** | Download link for game on the Oculus Rift website. | -**downloadUrls** | [**DownloadURLList**](DownloadURLList.md) | | -**dynamicWorldRows** | [**Set<DynamicContentRow>**](DynamicContentRow.md) | Array of DynamicWorldRow objects, used by the game to display the list of world rows | -**events** | [**APIEventConfig**](APIEventConfig.md) | | -**gearDemoRoomId** | **String** | Unknown | -**homeWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**homepageRedirectTarget** | **String** | Redirect target if you try to open the base API domain in your browser | -**hubWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**jobsEmail** | **String** | VRChat's job application email | -**messageOfTheDay** | **String** | MOTD | -**moderationEmail** | **String** | VRChat's moderation related email | -**moderationQueryPeriod** | **Integer** | Unknown | -**notAllowedToSelectAvatarInPrivateWorldMessage** | **String** | Used in-game to notify a user they aren't allowed to select avatars in private worlds | -**plugin** | **String** | Extra [plugin](https://doc.photonengine.com/en-us/server/current/plugins/manual) to run in each instance | -**releaseAppVersionStandalone** | **String** | Version number for game release build | -**releaseSdkUrl** | **String** | Link to download the release SDK | -**releaseSdkVersion** | **String** | Version of the release SDK | -**releaseServerVersionStandalone** | **String** | Version number for server release build | -**sdkDeveloperFaqUrl** | **String** | Link to the developer FAQ | -**sdkDiscordUrl** | **String** | Link to the official VRChat Discord | -**sdkNotAllowedToPublishMessage** | **String** | Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet | -**sdkUnityVersion** | **String** | Unity version supported by the SDK | -**serverName** | **String** | Server name of the API server currently responding | -**supportEmail** | **String** | VRChat's support email | -**timeOutWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**tutorialWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**updateRateMsMaximum** | **Integer** | Unknown | -**updateRateMsMinimum** | **Integer** | Unknown | -**updateRateMsNormal** | **Integer** | Unknown | -**updateRateMsUdonManual** | **Integer** | Unknown | -**uploadAnalysisPercent** | **Integer** | Unknown | -**urlList** | **List<String>** | List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game | -**useReliableUdpForVoice** | **Boolean** | Unknown | -**userUpdatePeriod** | **Integer** | Unknown | -**userVerificationDelay** | **Integer** | Unknown | -**userVerificationRetry** | **Integer** | Unknown | -**userVerificationTimeout** | **Integer** | Unknown | -**viveWindowsUrl** | **String** | Download link for game on the Steam website. | -**whiteListedAssetUrls** | **List<String>** | List of allowed URLs that are allowed to host avatar assets | -**worldUpdatePeriod** | **Integer** | Unknown | -**youtubedlHash** | **String** | Currently used youtube-dl.exe hash in SHA-256-delimited format | -**youtubedlVersion** | **String** | Currently used youtube-dl.exe version | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**campaignStatus** | **String** | The current platform-wide event taking place | | +|**disableBackgroundPreloads** | **Boolean** | Toggles if certain assets are preloaded in the background | | +|**locationGiftingNonSubPrioEnabled** | **Boolean** | Toggles whether users without a current VRC+ subscription are priority recipients for gift drops | | +|**voiceEnableDegradation** | **Boolean** | Unknown, probably voice optimization testing | | +|**voiceEnableReceiverLimiting** | **Boolean** | Unknown, probably voice optimization testing | | +|**accessLogsUrls** | [**APIConfigAccessLogsUrls**](APIConfigAccessLogsUrls.md) | | | +|**address** | **String** | VRChat's office address | | +|**ageVerificationInviteVisible** | **Boolean** | | | +|**ageVerificationP** | **Boolean** | | | +|**ageVerificationStatusVisible** | **Boolean** | | | +|**analysisMaxRetries** | **Integer** | Max retries for avatar analysis requests | | +|**analysisRetryInterval** | **Integer** | Interval between retries for avatar analysis requests | | +|**analyticsSegmentNewUIPctOfUsers** | **Integer** | Unknown | | +|**analyticsSegmentNewUISalt** | **String** | Unknown | | +|**announcements** | [**Set<APIConfigAnnouncement>**](APIConfigAnnouncement.md) | Public Announcements | | +|**audioConfig** | [**APIConfigAudioConfig**](APIConfigAudioConfig.md) | | [optional] | +|**availableLanguageCodes** | **List<String>** | List of supported Languages | | +|**availableLanguages** | **List<String>** | List of supported Languages | | +|**avatarPerfLimiter** | [**APIConfigAvatarPerfLimiter**](APIConfigAvatarPerfLimiter.md) | | | +|**chatboxLogBufferSeconds** | **Integer** | Unknown | | +|**clientApiKey** | **String** | apiKey to be used for all other requests | | +|**clientBPSCeiling** | **Integer** | Unknown | | +|**clientDisconnectTimeout** | **Integer** | Unknown | | +|**clientNetDispatchThread** | **Boolean** | Unknown | [optional] | +|**clientNetDispatchThreadMobile** | **Boolean** | Unknown | | +|**clientNetInThread** | **Boolean** | Unknown | [optional] | +|**clientNetInThread2** | **Boolean** | Unknown | [optional] | +|**clientNetInThreadMobile** | **Boolean** | Unknown | [optional] | +|**clientNetInThreadMobile2** | **Boolean** | Unknown | [optional] | +|**clientNetOutThread** | **Boolean** | Unknown | [optional] | +|**clientNetOutThread2** | **Boolean** | Unknown | [optional] | +|**clientNetOutThreadMobile** | **Boolean** | Unknown | [optional] | +|**clientNetOutThreadMobile2** | **Boolean** | Unknown | [optional] | +|**clientQR** | **Integer** | Unknown | [optional] | +|**clientReservedPlayerBPS** | **Integer** | Unknown | | +|**clientSentCountAllowance** | **Integer** | Unknown | | +|**constants** | [**APIConfigConstants**](APIConfigConstants.md) | | | +|**contactEmail** | **String** | VRChat's contact email | | +|**copyrightEmail** | **String** | VRChat's copyright-issues-related email | | +|**copyrightFormUrl** | **String** | VRChat's DMCA claim webform url | | +|**currentPrivacyVersion** | **Integer** | Current version number of the Privacy Agreement | | +|**currentTOSVersion** | **Integer** | Current version number of the Terms of Service | | +|**defaultAvatar** | **String** | | | +|**defaultStickerSet** | **String** | | | +|**devLanguageCodes** | **List<String>** | Unknown | [optional] | +|**devSdkUrl** | **String** | Link to download the development SDK, use downloadUrls instead | | +|**devSdkVersion** | **String** | Version of the development SDK | | +|**disCountdown** | **OffsetDateTime** | Unknown, \"dis\" maybe for disconnect? | | +|**disableAVProInProton** | **Boolean** | Unknown | [optional] | +|**disableAvatarCopying** | **Boolean** | Toggles if copying avatars should be disabled | | +|**disableAvatarGating** | **Boolean** | 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 | | +|**disableCaptcha** | **Boolean** | Unknown | [optional] | +|**disableCommunityLabs** | **Boolean** | Toggles if the Community Labs should be disabled | | +|**disableCommunityLabsPromotion** | **Boolean** | Toggles if promotion out of Community Labs should be disabled | | +|**disableEmail** | **Boolean** | Unknown | | +|**disableEventStream** | **Boolean** | Toggles if Analytics should be disabled. | | +|**disableFeedbackGating** | **Boolean** | 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. | | +|**disableFrontendBuilds** | **Boolean** | Unknown, probably toggles compilation of frontend web builds? So internal flag? | | +|**disableGiftDrops** | **Boolean** | Toggles if gift drops should be disabled | | +|**disableHello** | **Boolean** | Unknown | | +|**disableOculusSubs** | **Boolean** | Toggles if signing up for Subscriptions in Oculus is disabled or not. | | +|**disableRegistration** | **Boolean** | Toggles if new user account registration should be disabled. | | +|**disableSteamNetworking** | **Boolean** | Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead. | | +|**disableTwoFactorAuth** | **Boolean** | Toggles if 2FA should be disabled. | | +|**disableUdon** | **Boolean** | Toggles if Udon should be universally disabled in-game. | | +|**disableUpgradeAccount** | **Boolean** | Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. | | +|**downloadLinkWindows** | **String** | Download link for game on the Oculus Rift website. | | +|**downloadUrls** | [**APIConfigDownloadURLList**](APIConfigDownloadURLList.md) | | | +|**dynamicWorldRows** | [**Set<DynamicContentRow>**](DynamicContentRow.md) | Array of DynamicWorldRow objects, used by the game to display the list of world rows | | +|**economyLedgerBackfill** | **Boolean** | Unknown | | +|**economyLedgerMigrationStop** | **String** | Unknown | | +|**economyLedgerMode** | **String** | Unknown | | +|**economyPauseEnd** | **OffsetDateTime** | Unknown | | +|**economyPauseStart** | **OffsetDateTime** | Unknown | | +|**economyPurchaseRepairEnabled** | **Boolean** | Unknown | | +|**economyState** | **Integer** | Unknown | | +|**events** | [**APIConfigEvents**](APIConfigEvents.md) | | | +|**forceUseLatestWorld** | **Boolean** | Unknown | | +|**giftDisplayType** | **String** | Display type of gifts | | +|**googleApiClientId** | **String** | Unknown | | +|**homeWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**homepageRedirectTarget** | **String** | Redirect target if you try to open the base API domain in your browser | | +|**hubWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**imageHostUrlList** | **List<String>** | 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). | | +|**iosAppVersion** | **List<String>** | Current app version for iOS | | +|**iosVersion** | [**APIConfigIosVersion**](APIConfigIosVersion.md) | | | +|**jobsEmail** | **String** | VRChat's job application email | | +|**maxUserEmoji** | **Integer** | The maximum number of custom emoji each user may have at a given time. | | +|**maxUserStickers** | **Integer** | The maximum number of custom stickers each user may have at a given time. | | +|**minSupportedClientBuildNumber** | [**APIConfigMinSupportedClientBuildNumber**](APIConfigMinSupportedClientBuildNumber.md) | | | +|**minimumUnityVersionForUploads** | **String** | Minimum Unity version required for uploading assets | | +|**moderationEmail** | **String** | VRChat's moderation related email | | +|**notAllowedToSelectAvatarInPrivateWorldMessage** | **String** | Used in-game to notify a user they aren't allowed to select avatars in private worlds | | +|**offlineAnalysis** | [**APIConfigOfflineAnalysis**](APIConfigOfflineAnalysis.md) | | | +|**photonNameserverOverrides** | **List<String>** | Unknown | | +|**photonPublicKeys** | **List<String>** | Unknown | | +|**playerUrlResolverSha1** | **String** | Currently used youtube-dl.exe hash in SHA1-delimited format | | +|**playerUrlResolverVersion** | **String** | Currently used youtube-dl.exe version | | +|**publicKey** | **String** | Public key, hex encoded | | +|**reportCategories** | [**Map<String, ReportCategory>**](ReportCategory.md) | Categories available for reporting objectionable content | | +|**reportFormUrl** | **String** | URL to the report form | | +|**reportOptions** | **Map<String, Map<String, List<String>>>** | 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. | | +|**reportReasons** | [**Map<String, ReportReason>**](ReportReason.md) | Reasons available for submitting a report | | +|**requireAgeVerificationBetaTag** | **Boolean** | | | +|**sdkDeveloperFaqUrl** | **String** | Link to the developer FAQ | | +|**sdkDiscordUrl** | **String** | Link to the official VRChat Discord | | +|**sdkNotAllowedToPublishMessage** | **String** | Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet | | +|**sdkUnityVersion** | **String** | Unity version supported by the SDK | | +|**stringHostUrlList** | **List<String>** | 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). | | +|**supportEmail** | **String** | VRChat's support email | | +|**supportFormUrl** | **String** | VRChat's support form | | +|**timeOutWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**timekeeping** | **Boolean** | Unknown | | +|**tutorialWorldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**updateRateMsMaximum** | **Integer** | Unknown | | +|**updateRateMsMinimum** | **Integer** | Unknown | | +|**updateRateMsNormal** | **Integer** | Unknown | | +|**updateRateMsUdonManual** | **Integer** | Unknown | | +|**uploadAnalysisPercent** | **Integer** | Unknown | | +|**urlList** | **List<String>** | List of allowed URLs that bypass the \"Allow untrusted URL's\" setting in-game | | +|**useReliableUdpForVoice** | **Boolean** | Unknown | | +|**viveWindowsUrl** | **String** | Download link for game on the Steam website. | | +|**websocketMaxFriendsRefreshDelay** | **Integer** | Unknown | | +|**websocketQuickReconnectTime** | **Integer** | Unknown | | +|**websocketReconnectMaxDelay** | **Integer** | Unknown | | +|**whiteListedAssetUrls** | **List<String>** | List of allowed URLs that are allowed to host avatar assets | | diff --git a/docs/APIConfigAccessLogsUrls.md b/docs/APIConfigAccessLogsUrls.md new file mode 100644 index 00000000..e718f91a --- /dev/null +++ b/docs/APIConfigAccessLogsUrls.md @@ -0,0 +1,16 @@ + + +# APIConfigAccessLogsUrls + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_default** | **URI** | | [optional] | +|**pico** | **URI** | | [optional] | +|**quest** | **URI** | | [optional] | +|**xrElite** | **URI** | | [optional] | + + + diff --git a/docs/APIConfigAnnouncement.md b/docs/APIConfigAnnouncement.md new file mode 100644 index 00000000..ad607c3b --- /dev/null +++ b/docs/APIConfigAnnouncement.md @@ -0,0 +1,15 @@ + + +# APIConfigAnnouncement + +Public Announcement + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Announcement name | | +|**text** | **String** | Announcement text | | + + + diff --git a/docs/APIConfigAudioConfig.md b/docs/APIConfigAudioConfig.md new file mode 100644 index 00000000..42b0e61f --- /dev/null +++ b/docs/APIConfigAudioConfig.md @@ -0,0 +1,24 @@ + + +# APIConfigAudioConfig + +Global configuration for Steam Audio + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eq** | **BigDecimal** | Unknown | | +|**nearFieldILDNudge** | **BigDecimal** | Unknown | | +|**nearFieldILDNudgeDistance** | **BigDecimal** | Unknown | | +|**nearFieldILDNudgeEarRadius** | **BigDecimal** | Unknown | | +|**perEarDirectionalityEarRadius** | **BigDecimal** | Unknown | | +|**perEarDirectionalityFadeDistance** | **BigDecimal** | Unknown | | +|**perEarDirectionalityMaxScale** | **BigDecimal** | Unknown | | +|**perEarDirectionalityPCFactor** | **BigDecimal** | Unknown | | +|**trackingScaleMax** | **BigDecimal** | Unknown | | +|**trackingScaleMin** | **BigDecimal** | Unknown | | +|**trackingScaleMultiplier** | **BigDecimal** | Unknown | | + + + diff --git a/docs/APIConfigAvatarPerfLimiter.md b/docs/APIConfigAvatarPerfLimiter.md new file mode 100644 index 00000000..92e9cbf6 --- /dev/null +++ b/docs/APIConfigAvatarPerfLimiter.md @@ -0,0 +1,18 @@ + + +# APIConfigAvatarPerfLimiter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**androidMobile** | [**PerformanceLimiterInfo**](PerformanceLimiterInfo.md) | | | +|**PC** | [**PerformanceLimiterInfo**](PerformanceLimiterInfo.md) | | | +|**pico** | [**PerformanceLimiterInfo**](PerformanceLimiterInfo.md) | | | +|**quest** | [**PerformanceLimiterInfo**](PerformanceLimiterInfo.md) | | | +|**xrElite** | [**PerformanceLimiterInfo**](PerformanceLimiterInfo.md) | | | +|**iOSMobile** | [**PerformanceLimiterInfo**](PerformanceLimiterInfo.md) | | | + + + diff --git a/docs/APIConfigConstants.md b/docs/APIConfigConstants.md new file mode 100644 index 00000000..d7ed92cb --- /dev/null +++ b/docs/APIConfigConstants.md @@ -0,0 +1,16 @@ + + +# APIConfigConstants + +Constants + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**GROUPS** | [**APIConfigConstantsGROUPS**](APIConfigConstantsGROUPS.md) | | | +|**INSTANCE** | [**APIConfigConstantsINSTANCE**](APIConfigConstantsINSTANCE.md) | | | +|**LANGUAGE** | [**APIConfigConstantsLANGUAGE**](APIConfigConstantsLANGUAGE.md) | | | + + + diff --git a/docs/APIConfigConstantsGROUPS.md b/docs/APIConfigConstantsGROUPS.md new file mode 100644 index 00000000..7bd78dfc --- /dev/null +++ b/docs/APIConfigConstantsGROUPS.md @@ -0,0 +1,23 @@ + + +# APIConfigConstantsGROUPS + +Group-related constants + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**CAPACITY** | **Integer** | Maximum group capacity | [optional] | +|**GROUP_TRANSFER_REQUIREMENTS** | **List<String>** | Requirements for transferring group ownership | [optional] | +|**MAX_INVITES_REQUESTS** | **Integer** | Maximum number of invite requests | [optional] | +|**MAX_JOINED** | **Integer** | Maximum number of joined groups | [optional] | +|**MAX_JOINED_PLUS** | **Integer** | Maximum number of joined groups for VRChat Plus members | [optional] | +|**MAX_LANGUAGES** | **Integer** | Maximum number of supported languages | [optional] | +|**MAX_LINKS** | **Integer** | Maximum number of group links | [optional] | +|**MAX_MANAGEMENT_ROLES** | **Integer** | Maximum number of management roles in a group | [optional] | +|**MAX_OWNED** | **Integer** | Maximum number of groups a user can own | [optional] | +|**MAX_ROLES** | **Integer** | Maximum number of roles in a group | [optional] | + + + diff --git a/docs/APIConfigConstantsINSTANCE.md b/docs/APIConfigConstantsINSTANCE.md new file mode 100644 index 00000000..4da4c5b4 --- /dev/null +++ b/docs/APIConfigConstantsINSTANCE.md @@ -0,0 +1,14 @@ + + +# APIConfigConstantsINSTANCE + +Instance-related constants + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**POPULATION_BRACKETS** | [**APIConfigConstantsINSTANCEPOPULATIONBRACKETS**](APIConfigConstantsINSTANCEPOPULATIONBRACKETS.md) | | [optional] | + + + diff --git a/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.md b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.md new file mode 100644 index 00000000..a2637df7 --- /dev/null +++ b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.md @@ -0,0 +1,16 @@ + + +# APIConfigConstantsINSTANCEPOPULATIONBRACKETS + +Population brackets based on instance population + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**CROWDED** | [**APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED**](APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.md) | | [optional] | +|**FEW** | [**APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW**](APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.md) | | [optional] | +|**MANY** | [**APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY**](APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.md) | | [optional] | + + + diff --git a/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.md b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.md new file mode 100644 index 00000000..ba16696e --- /dev/null +++ b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.md @@ -0,0 +1,15 @@ + + +# APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED + +Crowded population range + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**max** | **Integer** | Maximum population for a crowded instance | [optional] | +|**min** | **Integer** | Minimum population for a crowded instance | [optional] | + + + diff --git a/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.md b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.md new file mode 100644 index 00000000..36e7966f --- /dev/null +++ b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.md @@ -0,0 +1,15 @@ + + +# APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW + +Few population range + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**max** | **Integer** | Maximum population for a few instance | [optional] | +|**min** | **Integer** | Minimum population for a few instance | [optional] | + + + diff --git a/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.md b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.md new file mode 100644 index 00000000..791aa701 --- /dev/null +++ b/docs/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.md @@ -0,0 +1,15 @@ + + +# APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY + +Many population range + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**max** | **Integer** | Maximum population for a many instance | [optional] | +|**min** | **Integer** | Minimum population for a many instance | [optional] | + + + diff --git a/docs/APIConfigConstantsLANGUAGE.md b/docs/APIConfigConstantsLANGUAGE.md new file mode 100644 index 00000000..7f671e55 --- /dev/null +++ b/docs/APIConfigConstantsLANGUAGE.md @@ -0,0 +1,14 @@ + + +# APIConfigConstantsLANGUAGE + +Language-related constants + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**SPOKEN_LANGUAGE_OPTIONS** | **Map<String, String>** | Supported spoken language options | [optional] | + + + diff --git a/docs/APIConfigDownloadURLList.md b/docs/APIConfigDownloadURLList.md new file mode 100644 index 00000000..d0e50613 --- /dev/null +++ b/docs/APIConfigDownloadURLList.md @@ -0,0 +1,18 @@ + + +# APIConfigDownloadURLList + +Download links for various development assets. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bootstrap** | **String** | Download link for ??? | | +|**sdk2** | **String** | Download link for legacy SDK2 | | +|**sdk3Avatars** | **String** | Download link for SDK3 for Avatars | | +|**sdk3Worlds** | **String** | Download link for SDK3 for Worlds | | +|**vcc** | **String** | Download link for the Creator Companion | | + + + diff --git a/docs/APIConfigEvents.md b/docs/APIConfigEvents.md new file mode 100644 index 00000000..7086a880 --- /dev/null +++ b/docs/APIConfigEvents.md @@ -0,0 +1,23 @@ + + +# APIConfigEvents + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**distanceClose** | **Integer** | Unknown | | +|**distanceFactor** | **Integer** | Unknown | | +|**distanceFar** | **Integer** | Unknown | | +|**groupDistance** | **Integer** | Unknown | | +|**maximumBunchSize** | **Integer** | Unknown | | +|**notVisibleFactor** | **Integer** | Unknown | | +|**playerOrderBucketSize** | **Integer** | Unknown | | +|**playerOrderFactor** | **Integer** | Unknown | | +|**slowUpdateFactorThreshold** | **Integer** | Unknown | | +|**useDirectPlayerSerialization** | **Boolean** | Unknown | | +|**viewSegmentLength** | **Integer** | Unknown | | + + + diff --git a/docs/APIConfigIosVersion.md b/docs/APIConfigIosVersion.md new file mode 100644 index 00000000..0e53b496 --- /dev/null +++ b/docs/APIConfigIosVersion.md @@ -0,0 +1,15 @@ + + +# APIConfigIosVersion + +Current version for iOS + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**major** | **Integer** | | | +|**minor** | **Integer** | | | + + + diff --git a/docs/APIConfigMinSupportedClientBuildNumber.md b/docs/APIConfigMinSupportedClientBuildNumber.md new file mode 100644 index 00000000..6c7e5e71 --- /dev/null +++ b/docs/APIConfigMinSupportedClientBuildNumber.md @@ -0,0 +1,24 @@ + + +# APIConfigMinSupportedClientBuildNumber + +Minimum supported client build number for various platforms + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appStore** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**_default** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**firebase** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**firebaseiOS** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**googlePlay** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**PC** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**picoStore** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**questAppLab** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**questStore** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**testFlight** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | +|**xrElite** | [**PlatformBuildInfo**](PlatformBuildInfo.md) | | | + + + diff --git a/docs/APIConfigOfflineAnalysis.md b/docs/APIConfigOfflineAnalysis.md new file mode 100644 index 00000000..c31c3d82 --- /dev/null +++ b/docs/APIConfigOfflineAnalysis.md @@ -0,0 +1,15 @@ + + +# APIConfigOfflineAnalysis + +Whether to allow offline analysis + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**android** | **Boolean** | Whether to allow offline analysis | [optional] | +|**standalonewindows** | **Boolean** | Whether to allow offline analysis | [optional] | + + + diff --git a/docs/APIEventConfig.md b/docs/APIEventConfig.md deleted file mode 100644 index e49b6a31..00000000 --- a/docs/APIEventConfig.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# APIEventConfig - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**distanceClose** | **Integer** | Unknown | -**distanceFactor** | **Integer** | Unknown | -**distanceFar** | **Integer** | Unknown | -**groupDistance** | **Integer** | Unknown | -**maximumBunchSize** | **Integer** | Unknown | -**notVisibleFactor** | **Integer** | Unknown | -**playerOrderBucketSize** | **Integer** | Unknown | -**playerOrderFactor** | **Integer** | Unknown | -**slowUpdateFactorThreshold** | **Integer** | Unknown | -**viewSegmentLength** | **Integer** | Unknown | - - - diff --git a/docs/APIHealth.md b/docs/APIHealth.md index 362ec176..a5295cf0 100644 --- a/docs/APIHealth.md +++ b/docs/APIHealth.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ok** | **Boolean** | | -**serverName** | **String** | | -**buildVersionTag** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**buildVersionTag** | **String** | | | +|**ok** | **Boolean** | | | +|**serverName** | **String** | | | diff --git a/docs/AccountDeletionLog.md b/docs/AccountDeletionLog.md new file mode 100644 index 00000000..cd53e7e8 --- /dev/null +++ b/docs/AccountDeletionLog.md @@ -0,0 +1,15 @@ + + +# AccountDeletionLog + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dateTime** | **OffsetDateTime** | Date and time of the deletion request. | [optional] | +|**deletionScheduled** | **OffsetDateTime** | When the deletion is scheduled to happen, standard is 14 days after the request. | [optional] | +|**message** | **String** | 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. | [optional] | + + + diff --git a/docs/AddFavoriteRequest.md b/docs/AddFavoriteRequest.md index d2099c49..f5ededcb 100644 --- a/docs/AddFavoriteRequest.md +++ b/docs/AddFavoriteRequest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **FavoriteType** | | -**favoriteId** | **String** | Must be either AvatarID, WorldID or UserID. | -**tags** | **List<String>** | 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. | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**favoriteId** | **String** | Must be either AvatarID, WorldID or UserID. | | +|**tags** | **List<String>** | 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. | | +|**type** | **FavoriteType** | | | diff --git a/docs/AddGroupGalleryImageRequest.md b/docs/AddGroupGalleryImageRequest.md new file mode 100644 index 00000000..b9556d82 --- /dev/null +++ b/docs/AddGroupGalleryImageRequest.md @@ -0,0 +1,13 @@ + + +# AddGroupGalleryImageRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fileId** | **String** | | | + + + diff --git a/docs/AdminAssetBundle.md b/docs/AdminAssetBundle.md new file mode 100644 index 00000000..96d6f9f8 --- /dev/null +++ b/docs/AdminAssetBundle.md @@ -0,0 +1,26 @@ + + +# AdminAssetBundle + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**updatedAt** | **OffsetDateTime** | | | +|**assetType** | **String** | | | +|**authorId** | **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. | | +|**authorName** | **String** | | | +|**description** | **String** | | | +|**imageUrl** | **String** | | | +|**name** | **String** | | | +|**releaseStatus** | **ReleaseStatus** | | | +|**tags** | **List<String>** | | | +|**thumbnailImageUrl** | **String** | | | +|**unityPackageUrl** | **String** | | | +|**unityPackages** | [**Set<AdminUnityPackage>**](AdminUnityPackage.md) | | | + + + diff --git a/docs/AdminUnityPackage.md b/docs/AdminUnityPackage.md new file mode 100644 index 00000000..5580b679 --- /dev/null +++ b/docs/AdminUnityPackage.md @@ -0,0 +1,18 @@ + + +# AdminUnityPackage + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | | +|**assetVersion** | **Integer** | | | +|**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`. | | +|**unityVersion** | **String** | | | +|**variant** | **String** | | | + + + diff --git a/docs/AgeVerificationStatus.md b/docs/AgeVerificationStatus.md new file mode 100644 index 00000000..43c36939 --- /dev/null +++ b/docs/AgeVerificationStatus.md @@ -0,0 +1,15 @@ + + +# AgeVerificationStatus + +## Enum + + +* `plus18` (value: `"18+"`) + +* `hidden` (value: `"hidden"`) + +* `verified` (value: `"verified"`) + + + diff --git a/docs/Agreement.md b/docs/Agreement.md new file mode 100644 index 00000000..ec8fd239 --- /dev/null +++ b/docs/Agreement.md @@ -0,0 +1,20 @@ + + +# Agreement + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**agreementCode** | **AgreementCode** | | | +|**agreementFulltext** | **String** | The full text of the agreement. | [optional] | +|**contentId** | **String** | The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. | | +|**created** | **String** | When the agreement was created | | +|**id** | **String** | The id of the agreement. | | +|**tags** | **List<String>** | | | +|**userId** | **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. | | +|**version** | **Integer** | The version of the agreement. | | + + + diff --git a/docs/AgreementCode.md b/docs/AgreementCode.md new file mode 100644 index 00000000..0165fb8c --- /dev/null +++ b/docs/AgreementCode.md @@ -0,0 +1,11 @@ + + +# AgreementCode + +## Enum + + +* `CONTENT_COPYRIGHT_OWNED` (value: `"content.copyright.owned"`) + + + diff --git a/docs/AgreementRequest.md b/docs/AgreementRequest.md new file mode 100644 index 00000000..39343440 --- /dev/null +++ b/docs/AgreementRequest.md @@ -0,0 +1,16 @@ + + +# AgreementRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**agreementCode** | **AgreementCode** | | | +|**agreementFulltext** | **String** | 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.`). | | +|**contentId** | **String** | The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. | | +|**version** | **Integer** | The version of the agreement (currently `1`). | | + + + diff --git a/docs/AgreementStatus.md b/docs/AgreementStatus.md new file mode 100644 index 00000000..db74fcd9 --- /dev/null +++ b/docs/AgreementStatus.md @@ -0,0 +1,17 @@ + + +# AgreementStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**agreed** | **Boolean** | Whether the user has agreed for this content. | | +|**agreementCode** | **AgreementCode** | | | +|**contentId** | **String** | The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. | | +|**userId** | **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. | | +|**version** | **Integer** | The version of the agreement. | | + + + diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index 685abcee..b0e03d60 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -2,24 +2,941 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**checkUserExists**](AuthenticationApi.md#checkUserExists) | **GET** /auth/exists | Check User Exists -[**deleteUser**](AuthenticationApi.md#deleteUser) | **PUT** /user/{userId}/delete | Delete User -[**getCurrentUser**](AuthenticationApi.md#getCurrentUser) | **GET** /auth/user | Login and/or Get Current User Info -[**logout**](AuthenticationApi.md#logout) | **PUT** /logout | Logout -[**verify2FA**](AuthenticationApi.md#verify2FA) | **POST** /auth/twofactorauth/totp/verify | Verify 2FA code -[**verifyAuthToken**](AuthenticationApi.md#verifyAuthToken) | **GET** /auth | Verify Auth Token -[**verifyRecoveryCode**](AuthenticationApi.md#verifyRecoveryCode) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code - - - +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**cancelPending2FA**](AuthenticationApi.md#cancelPending2FA) | **DELETE** /auth/twofactorauth/totp/pending | Cancel pending enabling of time-based 2FA codes | +| [**checkUserExists**](AuthenticationApi.md#checkUserExists) | **GET** /auth/exists | Check User Exists | +| [**confirmEmail**](AuthenticationApi.md#confirmEmail) | **GET** /auth/confirmEmail | Confirm Email | +| [**createGlobalAvatarModeration**](AuthenticationApi.md#createGlobalAvatarModeration) | **POST** /auth/user/avatarmoderations | Create Global Avatar Moderation | +| [**deleteGlobalAvatarModeration**](AuthenticationApi.md#deleteGlobalAvatarModeration) | **DELETE** /auth/user/avatarmoderations | Delete Global Avatar Moderation | +| [**deleteModerationReport**](AuthenticationApi.md#deleteModerationReport) | **DELETE** /moderationReports/{moderationReportId} | Delete Moderation Report | +| [**deleteUser**](AuthenticationApi.md#deleteUser) | **PUT** /users/{userId}/delete | Delete User | +| [**disable2FA**](AuthenticationApi.md#disable2FA) | **DELETE** /auth/twofactorauth | Disable 2FA | +| [**enable2FA**](AuthenticationApi.md#enable2FA) | **POST** /auth/twofactorauth/totp/pending | Enable time-based 2FA codes | +| [**getCurrentUser**](AuthenticationApi.md#getCurrentUser) | **GET** /auth/user | Login and/or Get Current User Info | +| [**getGlobalAvatarModerations**](AuthenticationApi.md#getGlobalAvatarModerations) | **GET** /auth/user/avatarmoderations | Get Global Avatar Moderations | +| [**getModerationReports**](AuthenticationApi.md#getModerationReports) | **GET** /moderationReports | Get Moderation Reports | +| [**getRecoveryCodes**](AuthenticationApi.md#getRecoveryCodes) | **GET** /auth/user/twofactorauth/otp | Get 2FA Recovery codes | +| [**logout**](AuthenticationApi.md#logout) | **PUT** /logout | Logout | +| [**registerUserAccount**](AuthenticationApi.md#registerUserAccount) | **POST** /auth/register | Register User Account | +| [**resendEmailConfirmation**](AuthenticationApi.md#resendEmailConfirmation) | **POST** /auth/user/resendEmail | Resend Email Confirmation | +| [**submitModerationReport**](AuthenticationApi.md#submitModerationReport) | **POST** /moderationReports | Submit Moderation Report | +| [**verify2FA**](AuthenticationApi.md#verify2FA) | **POST** /auth/twofactorauth/totp/verify | Verify 2FA code | +| [**verify2FAEmailCode**](AuthenticationApi.md#verify2FAEmailCode) | **POST** /auth/twofactorauth/emailotp/verify | Verify 2FA email code | +| [**verifyAuthToken**](AuthenticationApi.md#verifyAuthToken) | **GET** /auth | Verify Auth Token | +| [**verifyLoginPlace**](AuthenticationApi.md#verifyLoginPlace) | **GET** /auth/verifyLoginPlace | Verify Login Place | +| [**verifyPending2FA**](AuthenticationApi.md#verifyPending2FA) | **POST** /auth/twofactorauth/totp/pending/verify | Verify Pending 2FA code | +| [**verifyRecoveryCode**](AuthenticationApi.md#verifyRecoveryCode) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code | + + + +# **cancelPending2FA** +> Disable2FAResult cancelPending2FA() + +Cancel pending enabling of time-based 2FA codes + +Cancels the sequence for enabling time-based 2FA. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + try { + Disable2FAResult result = apiInstance.cancelPending2FA(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#cancelPending2FA"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Disable2FAResult**](Disable2FAResult.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** | OK | - | +| **401** | Error response due to missing auth cookie. | - | + + # **checkUserExists** -> UserExists checkUserExists(email, displayName, userId, excludeUserId) +> UserExists checkUserExists(email, displayName, username, excludeUserId) + +Check User Exists + +Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search. + +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.AuthenticationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + String email = "email_example"; // String | Filter by email. + String displayName = "displayName_example"; // String | Filter by displayName. + String username = "username_example"; // String | Filter by Username. + String excludeUserId = "excludeUserId_example"; // String | Exclude by UserID. + try { + UserExists result = apiInstance.checkUserExists(email, displayName, username, excludeUserId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#checkUserExists"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **email** | **String**| Filter by email. | [optional] | +| **displayName** | **String**| Filter by displayName. | [optional] | +| **username** | **String**| Filter by Username. | [optional] | +| **excludeUserId** | **String**| Exclude by UserID. | [optional] | + +### Return type + +[**UserExists**](UserExists.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **confirmEmail** +> confirmEmail(id, verifyEmail) + +Confirm Email + +Confirms the email address for a user + +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.AuthenticationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + String id = "id_example"; // String | Target user for which to verify email. + String verifyEmail = "eml_00000000-0000-0000-0000-000000000000"; // String | Token to verify email. + try { + apiInstance.confirmEmail(id, verifyEmail); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#confirmEmail"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| Target user for which to verify email. | | +| **verifyEmail** | **String**| Token to verify email. | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **302** | OK | - | + + +# **createGlobalAvatarModeration** +> AvatarModerationCreated createGlobalAvatarModeration(createAvatarModerationRequest) + +Create Global Avatar Moderation + +Globally moderates an avatar. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + CreateAvatarModerationRequest createAvatarModerationRequest = new CreateAvatarModerationRequest(); // CreateAvatarModerationRequest | + try { + AvatarModerationCreated result = apiInstance.createGlobalAvatarModeration(createAvatarModerationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#createGlobalAvatarModeration"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createAvatarModerationRequest** | [**CreateAvatarModerationRequest**](CreateAvatarModerationRequest.md)| | | + +### Return type + +[**AvatarModerationCreated**](AvatarModerationCreated.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single AvatarModerationCreated object | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **deleteGlobalAvatarModeration** +> OkStatus2 deleteGlobalAvatarModeration(targetAvatarId, avatarModerationType) + +Delete Global Avatar Moderation + +Globally unmoderates an avatar. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + String targetAvatarId = "targetAvatarId_example"; // String | Must be a valid avatar ID. + AvatarModerationType avatarModerationType = AvatarModerationType.fromValue("block"); // AvatarModerationType | The avatar moderation type associated with the avatar. + try { + OkStatus2 result = apiInstance.deleteGlobalAvatarModeration(targetAvatarId, avatarModerationType); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#deleteGlobalAvatarModeration"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **targetAvatarId** | **String**| Must be a valid avatar ID. | | +| **avatarModerationType** | [**AvatarModerationType**](.md)| The avatar moderation type associated with the avatar. | [enum: block] | + +### Return type + +[**OkStatus2**](OkStatus2.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 single OkStatus2 object | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **deleteModerationReport** +> SuccessFlag deleteModerationReport(moderationReportId) + +Delete Moderation Report + +Delete a moderation report + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + String moderationReportId = "moderationReportId_example"; // String | The moderation report id. + try { + SuccessFlag result = apiInstance.deleteModerationReport(moderationReportId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#deleteModerationReport"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **moderationReportId** | **String**| The moderation report id. | | + +### Return type + +[**SuccessFlag**](SuccessFlag.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 an SuccessFlag object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response due to missing Administrator credentials. | - | + + +# **deleteUser** +> CurrentUser deleteUser(userId) + +Delete User + +Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + CurrentUser result = apiInstance.deleteUser(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#deleteUser"); + 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 + +[**CurrentUser**](CurrentUser.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** | OK | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **disable2FA** +> Disable2FAResult disable2FA() + +Disable 2FA + +Disables 2FA for the currently logged in account + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + try { + Disable2FAResult result = apiInstance.disable2FA(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#disable2FA"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Disable2FAResult**](Disable2FAResult.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** | OK | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **enable2FA** +> Pending2FAResult enable2FA() + +Enable time-based 2FA codes + +Begins the sequence for enabling time-based 2FA. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + try { + Pending2FAResult result = apiInstance.enable2FA(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#enable2FA"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Pending2FAResult**](Pending2FAResult.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** | OK | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getCurrentUser** +> CurrentUser getCurrentUser() + +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. + +### 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.AuthenticationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + // Configure HTTP basic authorization: authHeader + HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader"); + authHeader.setUsername("YOUR USERNAME"); + authHeader.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: twoFactorAuthCookie + ApiKeyAuth twoFactorAuthCookie = (ApiKeyAuth) defaultClient.getAuthentication("twoFactorAuthCookie"); + twoFactorAuthCookie.setApiKey("YOUR API KEY"); + // 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(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#getCurrentUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CurrentUser**](CurrentUser.md) + +### Authorization + +[authHeader](../README.md#authHeader), [twoFactorAuthCookie](../README.md#twoFactorAuthCookie), [authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **getGlobalAvatarModerations** +> List<AvatarModeration> getGlobalAvatarModerations() + +Get Global Avatar Moderations + +Returns list of globally moderated avatars. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + try { + List result = apiInstance.getGlobalAvatarModerations(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#getGlobalAvatarModerations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<AvatarModeration>**](AvatarModeration.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 list of globally blocked avatars with timestamps | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getModerationReports** +> PaginatedModerationReportList getModerationReports(offset, n, reportingUserId, status, type) + +Get Moderation Reports + +Get submitted moderation reports + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. + Integer n = 60; // Integer | The number of objects to return. + String reportingUserId = "reportingUserId_example"; // String | Filter for moderation reports. + String status = "status_example"; // String | Filter for moderation reports. One of: `closed`... + String type = "type_example"; // String | Filter for moderation reports. One of: `avatar`, `group`, `user`, `world`... + try { + PaginatedModerationReportList result = apiInstance.getModerationReports(offset, n, reportingUserId, status, type); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#getModerationReports"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **reportingUserId** | **String**| Filter for moderation reports. | [optional] | +| **status** | **String**| Filter for moderation reports. One of: `closed`... | [optional] | +| **type** | **String**| Filter for moderation reports. One of: `avatar`, `group`, `user`, `world`... | [optional] | + +### Return type + +[**PaginatedModerationReportList**](PaginatedModerationReportList.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 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. | - | + + +# **getRecoveryCodes** +> TwoFactorRecoveryCodes getRecoveryCodes() + +Get 2FA Recovery codes + +Gets the OTP (One Time Password) recovery codes for accounts with 2FA-protection enabled. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + try { + TwoFactorRecoveryCodes result = apiInstance.getRecoveryCodes(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#getRecoveryCodes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` -Check User Exists +### Parameters +This endpoint does not need any parameter. -Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search. +### Return type + +[**TwoFactorRecoveryCodes**](TwoFactorRecoveryCodes.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 the two factor recovery codes | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **logout** +> Success logout() + +Logout + +Invalidates the login session. ### Example ```java @@ -36,22 +953,18 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - String email = "email_example"; // String | Filter by email. - String displayName = "displayName_example"; // String | Filter by displayName. - String userId = "userId_example"; // String | Filter by UserID. - String excludeUserId = "excludeUserId_example"; // String | Exclude by UserID. try { - UserExists result = apiInstance.checkUserExists(email, displayName, userId, excludeUserId); + Success result = apiInstance.logout(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#checkUserExists"); + System.err.println("Exception when calling AuthenticationApi#logout"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -62,21 +975,15 @@ public class Example { ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **email** | **String**| Filter by email. | [optional] - **displayName** | **String**| Filter by displayName. | [optional] - **userId** | **String**| Filter by UserID. | [optional] - **excludeUserId** | **String**| Exclude by UserID. | [optional] +This endpoint does not need any parameter. ### Return type -[**UserExists**](UserExists.md) +[**Success**](Success.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -86,16 +993,16 @@ Name | Type | Description | Notes ### HTTP 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. | - | +| **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. | - | - -# **deleteUser** -> CurrentUser deleteUser(userId) + +# **registerUserAccount** +> CurrentUser registerUserAccount(registerUserAccountRequest) -Delete User +Register User Account -Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. +~~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 ### Example ```java @@ -103,7 +1010,6 @@ Deletes the account with given ID. Normal users only have permission to delete t 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.AuthenticationApi; @@ -111,26 +1017,14 @@ 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: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.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); - String userId = "userId_example"; // String | + RegisterUserAccountRequest registerUserAccountRequest = new RegisterUserAccountRequest(); // RegisterUserAccountRequest | try { - CurrentUser result = apiInstance.deleteUser(userId); + CurrentUser result = apiInstance.registerUserAccount(registerUserAccountRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#deleteUser"); + System.err.println("Exception when calling AuthenticationApi#registerUserAccount"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -142,9 +1036,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **registerUserAccountRequest** | [**RegisterUserAccountRequest**](RegisterUserAccountRequest.md)| | | ### Return type @@ -152,26 +1046,26 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | OK | * Set-Cookie - Successful authentication returns an `auth` cookie.
| +| **401** | Error response due to missing auth cookie. | - | - -# **getCurrentUser** -> CurrentUser getCurrentUser() + +# **resendEmailConfirmation** +> Success resendEmailConfirmation() -Login and/or Get Current User Info +Resend Email Confirmation -This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. +Requests a resend of pending email address confirmation email ### Example ```java @@ -194,23 +1088,12 @@ public class Example { // 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"); - authHeader.setPassword("YOUR PASSWORD"); - - // Configure API key authorization: twoFactorAuthCookie - ApiKeyAuth twoFactorAuthCookie = (ApiKeyAuth) defaultClient.getAuthentication("twoFactorAuthCookie"); - twoFactorAuthCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //twoFactorAuthCookie.setApiKeyPrefix("Token"); - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); try { - CurrentUser result = apiInstance.getCurrentUser(); + Success result = apiInstance.resendEmailConfirmation(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#getCurrentUser"); + System.err.println("Exception when calling AuthenticationApi#resendEmailConfirmation"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -225,11 +1108,11 @@ This endpoint does not need any parameter. ### Return type -[**CurrentUser**](CurrentUser.md) +[**Success**](Success.md) ### Authorization -[authCookie](../README.md#authCookie), [authHeader](../README.md#authHeader), [twoFactorAuthCookie](../README.md#twoFactorAuthCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -239,16 +1122,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | * Set-Cookie - Successful authentication returns an `auth` cookie.
* \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set.
| -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | OK | - | +| **401** | Error response due to missing auth cookie. | - | - -# **logout** -> Success logout() + +# **submitModerationReport** +> ModerationReport submitModerationReport(submitModerationReportRequest) -Logout +Submit Moderation Report -Invalidates the login session. +Submit a moderation report ### Example ```java @@ -272,11 +1155,12 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + SubmitModerationReportRequest submitModerationReportRequest = new SubmitModerationReportRequest(); // SubmitModerationReportRequest | try { - Success result = apiInstance.logout(); + ModerationReport result = apiInstance.submitModerationReport(submitModerationReportRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#logout"); + System.err.println("Exception when calling AuthenticationApi#submitModerationReport"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -287,11 +1171,14 @@ public class Example { ``` ### Parameters -This endpoint does not need any parameter. + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **submitModerationReportRequest** | [**SubmitModerationReportRequest**](SubmitModerationReportRequest.md)| | | ### Return type -[**Success**](Success.md) +[**ModerationReport**](ModerationReport.md) ### Authorization @@ -299,16 +1186,16 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | * Set-Cookie - Clears the `auth` cookie.
* \0Set-Cookie - Clears the `age` cookie.
* \0\0Set-Cookie - Clears the `tos` cookie.
| -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single ModerationReport object. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **verify2FA** > Verify2FAResult verify2FA(twoFactorAuthCode) @@ -355,9 +1242,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md)| | | ### Return type @@ -375,10 +1262,80 @@ Name | Type | Description | Notes ### HTTP 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 apiKey or auth cookie. | - | +| **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) + +Verify 2FA email code + +Finishes the login sequence with an 2FA email code. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + TwoFactorEmailCode twoFactorEmailCode = new TwoFactorEmailCode(); // TwoFactorEmailCode | + try { + Verify2FAEmailCodeResult result = apiInstance.verify2FAEmailCode(twoFactorEmailCode); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#verify2FAEmailCode"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **twoFactorEmailCode** | [**TwoFactorEmailCode**](TwoFactorEmailCode.md)| | | + +### Return type + +[**Verify2FAEmailCodeResult**](Verify2FAEmailCodeResult.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | - + # **verifyAuthToken** > VerifyAuthTokenResult verifyAuthToken() @@ -441,10 +1398,143 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns wether a provided auth token is valid or not. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns wether a provided auth token is valid or not. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **verifyLoginPlace** +> verifyLoginPlace(token, userId) + +Verify Login Place + +Verifies a login attempt for a user + +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.AuthenticationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + String token = "token_example"; // String | Token to verify login attempt. + String userId = "userId_example"; // String | Filter by UserID. + try { + apiInstance.verifyLoginPlace(token, userId); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#verifyLoginPlace"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **token** | **String**| Token to verify login attempt. | | +| **userId** | **String**| Filter by UserID. | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **302** | OK | - | + + +# **verifyPending2FA** +> Verify2FAResult verifyPending2FA(twoFactorAuthCode) + +Verify Pending 2FA code + +Finishes sequence for enabling time-based 2FA. + +### 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.AuthenticationApi; + +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"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + TwoFactorAuthCode twoFactorAuthCode = new TwoFactorAuthCode(); // TwoFactorAuthCode | + try { + Verify2FAResult result = apiInstance.verifyPending2FA(twoFactorAuthCode); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#verifyPending2FA"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md)| | | + +### Return type + +[**Verify2FAResult**](Verify2FAResult.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | - + # **verifyRecoveryCode** > Verify2FAResult verifyRecoveryCode(twoFactorAuthCode) @@ -491,9 +1581,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **twoFactorAuthCode** | [**TwoFactorAuthCode**](TwoFactorAuthCode.md)| | | ### Return type @@ -511,6 +1601,6 @@ Name | Type | Description | Notes ### HTTP 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 apiKey or auth cookie. | - | +| **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. | - | diff --git a/docs/Avatar.md b/docs/Avatar.md index 6a40a6e4..b3d8eedf 100644 --- a/docs/Avatar.md +++ b/docs/Avatar.md @@ -3,28 +3,41 @@ # Avatar + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assetUrl** | **String** | Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`. | [optional] -**assetUrlObject** | **Object** | Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`. **Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead. | [optional] -**authorId** | **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. | -**authorName** | **String** | | -**createdAt** | **OffsetDateTime** | | -**description** | **String** | | -**featured** | **Boolean** | | -**id** | **String** | | -**imageUrl** | **String** | | -**name** | **String** | | -**releaseStatus** | **ReleaseStatus** | | -**tags** | **List<String>** | | -**thumbnailImageUrl** | **String** | | -**unityPackageUrl** | **String** | | -**unityPackageUrlObject** | [**AvatarUnityPackageUrlObject**](AvatarUnityPackageUrlObject.md) | | -**unityPackages** | [**Set<UnityPackage>**](UnityPackage.md) | | -**updatedAt** | **OffsetDateTime** | | -**version** | **Integer** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acknowledgements** | **String** | | [optional] | +|**activeAssetReviewId** | **String** | Only present for the avatar author on avatars under active review. | [optional] | +|**assetUrl** | **String** | Not present from general search `/avatars`, only on specific requests `/avatars/{avatarId}`. | [optional] | +|**assetUrlObject** | **Object** | 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. | [optional] | +|**authorId** | **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. | | +|**authorName** | **String** | | | +|**createdAt** | **OffsetDateTime** | | | +|**description** | **String** | | | +|**featured** | **Boolean** | | | +|**highestPrice** | **Integer** | | [optional] | +|**id** | **String** | | | +|**imageUrl** | **String** | | | +|**listingDate** | **String** | | | +|**lock** | **Boolean** | | [optional] | +|**lowestPrice** | **Integer** | | [optional] | +|**name** | **String** | | | +|**pendingUpload** | **Boolean** | | [optional] | +|**performance** | [**AvatarPerformance**](AvatarPerformance.md) | | | +|**productId** | **String** | | [optional] | +|**publishedListings** | [**List<AvatarPublishedListingsInner>**](AvatarPublishedListingsInner.md) | | [optional] | +|**releaseStatus** | **ReleaseStatus** | | | +|**searchable** | **Boolean** | | [optional] | +|**styles** | [**AvatarStyles**](AvatarStyles.md) | | | +|**tags** | **List<String>** | | | +|**thumbnailImageUrl** | **String** | | | +|**unityPackageUrl** | **String** | | | +|**unityPackageUrlObject** | [**AvatarUnityPackageUrlObject**](AvatarUnityPackageUrlObject.md) | | | +|**unityPackages** | [**Set<UnityPackage>**](UnityPackage.md) | | | +|**updatedAt** | **OffsetDateTime** | | | +|**version** | **Integer** | | | diff --git a/docs/AvatarModeration.md b/docs/AvatarModeration.md new file mode 100644 index 00000000..0dcc220a --- /dev/null +++ b/docs/AvatarModeration.md @@ -0,0 +1,15 @@ + + +# AvatarModeration + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarModerationType** | **AvatarModerationType** | | | +|**created** | **OffsetDateTime** | | | +|**targetAvatarId** | **String** | | | + + + diff --git a/docs/AvatarModerationCreated.md b/docs/AvatarModerationCreated.md new file mode 100644 index 00000000..81be0743 --- /dev/null +++ b/docs/AvatarModerationCreated.md @@ -0,0 +1,15 @@ + + +# AvatarModerationCreated + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarModerationType** | **AvatarModerationType** | | | +|**created** | **Long** | Timestamp in milliseconds since Unix epoch | | +|**targetAvatarId** | **String** | | | + + + diff --git a/docs/AvatarModerationType.md b/docs/AvatarModerationType.md new file mode 100644 index 00000000..e6110ed8 --- /dev/null +++ b/docs/AvatarModerationType.md @@ -0,0 +1,11 @@ + + +# AvatarModerationType + +## Enum + + +* `BLOCK` (value: `"block"`) + + + diff --git a/docs/AvatarPerformance.md b/docs/AvatarPerformance.md new file mode 100644 index 00000000..8d0108a8 --- /dev/null +++ b/docs/AvatarPerformance.md @@ -0,0 +1,18 @@ + + +# AvatarPerformance + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**android** | **String** | | [optional] | +|**androidSort** | **Integer** | | [optional] | +|**ios** | **String** | | [optional] | +|**iosSort** | **Integer** | | [optional] | +|**standalonewindows** | **String** | | [optional] | +|**standalonewindowsSort** | **Integer** | | [optional] | + + + diff --git a/docs/AvatarPublishedListingsInner.md b/docs/AvatarPublishedListingsInner.md new file mode 100644 index 00000000..20afe223 --- /dev/null +++ b/docs/AvatarPublishedListingsInner.md @@ -0,0 +1,18 @@ + + +# AvatarPublishedListingsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | | [optional] | +|**displayName** | **String** | | [optional] | +|**imageId** | **String** | | [optional] | +|**listingId** | **String** | | [optional] | +|**listingType** | **String** | | [optional] | +|**priceTokens** | **Integer** | | [optional] | + + + diff --git a/docs/AvatarStyle.md b/docs/AvatarStyle.md new file mode 100644 index 00000000..156a9384 --- /dev/null +++ b/docs/AvatarStyle.md @@ -0,0 +1,15 @@ + + +# AvatarStyle + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**styleName** | **String** | | | + + + diff --git a/docs/AvatarStyles.md b/docs/AvatarStyles.md new file mode 100644 index 00000000..6de8f768 --- /dev/null +++ b/docs/AvatarStyles.md @@ -0,0 +1,15 @@ + + +# AvatarStyles + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**primary** | **String** | | [optional] | +|**secondary** | **String** | | [optional] | +|**supplementary** | **List<String>** | | [optional] | + + + diff --git a/docs/AvatarUnityPackageUrlObject.md b/docs/AvatarUnityPackageUrlObject.md index 827dae9b..bd742e13 100644 --- a/docs/AvatarUnityPackageUrlObject.md +++ b/docs/AvatarUnityPackageUrlObject.md @@ -6,9 +6,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**unityPackageUrl** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**unityPackageUrl** | **String** | | [optional] | diff --git a/docs/AvatarsApi.md b/docs/AvatarsApi.md index 327e1572..639c4562 100644 --- a/docs/AvatarsApi.md +++ b/docs/AvatarsApi.md @@ -2,19 +2,25 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createAvatar**](AvatarsApi.md#createAvatar) | **POST** /avatars | Create Avatar -[**deleteAvatar**](AvatarsApi.md#deleteAvatar) | **DELETE** /avatars/{avatarId} | Delete Avatar -[**getAvatar**](AvatarsApi.md#getAvatar) | **GET** /avatars/{avatarId} | Get Avatar -[**getFavoritedAvatars**](AvatarsApi.md#getFavoritedAvatars) | **GET** /avatars/favorites | List Favorited Avatars -[**searchAvatars**](AvatarsApi.md#searchAvatars) | **GET** /avatars | Search Avatars -[**selectAvatar**](AvatarsApi.md#selectAvatar) | **PUT** /avatars/{avatarId}/select | Select Avatar -[**selectFallbackAvatar**](AvatarsApi.md#selectFallbackAvatar) | **PUT** /avatars/{avatarId}/selectFallback | Select Fallback Avatar -[**updateAvatar**](AvatarsApi.md#updateAvatar) | **PUT** /avatars/{avatarId} | Update Avatar - - - +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createAvatar**](AvatarsApi.md#createAvatar) | **POST** /avatars | Create Avatar | +| [**deleteAvatar**](AvatarsApi.md#deleteAvatar) | **DELETE** /avatars/{avatarId} | Delete Avatar | +| [**deleteImpostor**](AvatarsApi.md#deleteImpostor) | **DELETE** /avatars/{avatarId}/impostor | Delete generated Impostor | +| [**enqueueImpostor**](AvatarsApi.md#enqueueImpostor) | **POST** /avatars/{avatarId}/impostor/enqueue | Enqueue Impostor generation | +| [**getAvatar**](AvatarsApi.md#getAvatar) | **GET** /avatars/{avatarId} | Get Avatar | +| [**getAvatarStyles**](AvatarsApi.md#getAvatarStyles) | **GET** /avatarStyles | Get Avatar Styles | +| [**getFavoritedAvatars**](AvatarsApi.md#getFavoritedAvatars) | **GET** /avatars/favorites | List Favorited Avatars | +| [**getImpostorQueueStats**](AvatarsApi.md#getImpostorQueueStats) | **GET** /avatars/impostor/queue/stats | Get Impostor Queue Stats | +| [**getLicensedAvatars**](AvatarsApi.md#getLicensedAvatars) | **GET** /avatars/licensed | List Licensed Avatars | +| [**getOwnAvatar**](AvatarsApi.md#getOwnAvatar) | **GET** /users/{userId}/avatar | Get Own Avatar | +| [**searchAvatars**](AvatarsApi.md#searchAvatars) | **GET** /avatars | Search Avatars | +| [**selectAvatar**](AvatarsApi.md#selectAvatar) | **PUT** /avatars/{avatarId}/select | Select Avatar | +| [**selectFallbackAvatar**](AvatarsApi.md#selectFallbackAvatar) | **PUT** /avatars/{avatarId}/selectFallback | Select Fallback Avatar | +| [**updateAvatar**](AvatarsApi.md#updateAvatar) | **PUT** /avatars/{avatarId} | Update Avatar | + + + # **createAvatar** > Avatar createAvatar(createAvatarRequest) @@ -37,12 +43,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -67,9 +67,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createAvatarRequest** | [**CreateAvatarRequest**](CreateAvatarRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createAvatarRequest** | [**CreateAvatarRequest**](CreateAvatarRequest.md)| | [optional] | ### Return type @@ -77,7 +77,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -87,10 +87,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Avatar object. | - | -**401** | Error response when set featured to true without being an admin. | - | +| **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. | - | - + # **deleteAvatar** > Avatar deleteAvatar(avatarId) @@ -113,12 +114,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -126,7 +121,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AvatarsApi apiInstance = new AvatarsApi(defaultClient); - String avatarId = "avatarId_example"; // String | + String avatarId = "avatarId_example"; // String | Must be a valid avatar ID. try { Avatar result = apiInstance.deleteAvatar(avatarId); System.out.println(result); @@ -143,9 +138,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **avatarId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **avatarId** | **String**| Must be a valid avatar ID. | | ### Return type @@ -153,7 +148,148 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[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 single Avatar object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **404** | Error response when trying to show information about a non-existent avatar. | - | + + +# **deleteImpostor** +> deleteImpostor(avatarId) + +Delete generated Impostor + +Delete generated Impostor for that avatar. + +### 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.AvatarsApi; + +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"); + + AvatarsApi apiInstance = new AvatarsApi(defaultClient); + String avatarId = "avatarId_example"; // String | Must be a valid avatar ID. + try { + apiInstance.deleteImpostor(avatarId); + } catch (ApiException e) { + System.err.println("Exception when calling AvatarsApi#deleteImpostor"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **avatarId** | **String**| Must be a valid avatar ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **enqueueImpostor** +> ServiceStatus enqueueImpostor(avatarId) + +Enqueue Impostor generation + +Enqueue Impostor generation for that avatar. + +### 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.AvatarsApi; + +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"); + + AvatarsApi apiInstance = new AvatarsApi(defaultClient); + String avatarId = "avatarId_example"; // String | Must be a valid avatar ID. + try { + ServiceStatus result = apiInstance.enqueueImpostor(avatarId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AvatarsApi#enqueueImpostor"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **avatarId** | **String**| Must be a valid avatar ID. | | + +### Return type + +[**ServiceStatus**](ServiceStatus.md) + +### Authorization + +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -163,11 +299,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Avatar object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to show information about a non-existent avatar. | - | +| **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. | - | - + # **getAvatar** > Avatar getAvatar(avatarId) @@ -190,12 +326,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -203,7 +333,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AvatarsApi apiInstance = new AvatarsApi(defaultClient); - String avatarId = "avatarId_example"; // String | + String avatarId = "avatarId_example"; // String | Must be a valid avatar ID. try { Avatar result = apiInstance.getAvatar(avatarId); System.out.println(result); @@ -220,9 +350,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **avatarId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **avatarId** | **String**| Must be a valid avatar ID. | | ### Return type @@ -230,7 +360,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -240,11 +370,69 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Avatar object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to show information about a non-existent avatar. | - | +| **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. | - | + + +# **getAvatarStyles** +> List<AvatarStyle> getAvatarStyles() + +Get Avatar Styles + +List avatar styles. - +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.AvatarsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + AvatarsApi apiInstance = new AvatarsApi(defaultClient); + try { + List result = apiInstance.getAvatarStyles(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AvatarsApi#getAvatarStyles"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<AvatarStyle>**](AvatarStyle.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a list of AvatarStyle objects. | - | + + # **getFavoritedAvatars** > List<Avatar> getFavoritedAvatars(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId) @@ -267,12 +455,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -280,15 +462,15 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AvatarsApi apiInstance = new AvatarsApi(defaultClient); - String featured = "featured_example"; // String | Filters on featured results. - String sort = "popularity"; // String | + Boolean featured = true; // Boolean | Filters on featured results. + SortOption sort = SortOption.fromValue("_created_at"); // SortOption | The sort order of the results. Integer n = 60; // Integer | The number of objects to return. - String order = "ascending"; // String | + OrderOption order = OrderOption.fromValue("ascending"); // OrderOption | Result ordering Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. String search = "search_example"; // String | Filters by world name. String tag = "tag_example"; // String | Tags to include (comma-separated). Any of the tags needs to be present. String notag = "notag_example"; // String | Tags to exclude (comma-separated). - String releaseStatus = "public"; // String | Filter by ReleaseStatus. + ReleaseStatus releaseStatus = ReleaseStatus.fromValue("all"); // ReleaseStatus | Filter by ReleaseStatus. String maxUnityVersion = "maxUnityVersion_example"; // String | The maximum Unity version supported by the asset. String minUnityVersion = "minUnityVersion_example"; // String | The minimum Unity version supported by the asset. String platform = "platform_example"; // String | The platform the asset supports. @@ -309,21 +491,160 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **featured** | **String**| Filters on featured results. | [optional] - **sort** | **String**| | [optional] [default to popularity] [enum: popularity, heat, trust, shuffle, random, favorites, reportScore, reportCount, publicationDate, labsPublicationDate, created, _created_at, updated, _updated_at, order, relevance, magic, name] - **n** | **Integer**| The number of objects to return. | [optional] [default to 60] - **order** | **String**| | [optional] [default to descending] [enum: ascending, descending] - **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] - **search** | **String**| Filters by world name. | [optional] - **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] - **notag** | **String**| Tags to exclude (comma-separated). | [optional] - **releaseStatus** | **String**| Filter by ReleaseStatus. | [optional] [default to public] [enum: public, private, hidden, all] - **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] - **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] - **platform** | **String**| The platform the asset supports. | [optional] - **userId** | **String**| Target user to see information on, admin-only. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **featured** | **Boolean**| Filters on featured results. | [optional] | +| **sort** | [**SortOption**](.md)| The sort order of the results. | [optional] [default to popularity] [enum: _created_at, _updated_at, created, favorites, heat, labsPublicationDate, magic, name, order, popularity, publicationDate, random, relevance, reportCount, reportScore, shuffle, trust, updated] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **order** | [**OrderOption**](.md)| Result ordering | [optional] [default to descending] [enum: ascending, descending] | +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **search** | **String**| Filters by world name. | [optional] | +| **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | +| **notag** | **String**| Tags to exclude (comma-separated). | [optional] | +| **releaseStatus** | [**ReleaseStatus**](.md)| Filter by ReleaseStatus. | [optional] [default to public] [enum: all, hidden, private, public] | +| **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] | +| **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] | +| **platform** | **String**| The platform the asset supports. | [optional] | +| **userId** | **String**| Target user to see information on, admin-only. | [optional] | + +### Return type + +[**List<Avatar>**](Avatar.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 list of Avatar objects. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response when trying to see favorited avatars of another user without sufficient admin permissions. | - | + + +# **getImpostorQueueStats** +> ServiceQueueStats getImpostorQueueStats() + +Get Impostor Queue Stats + +Gets service stats for queued impostor. + +### 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.AvatarsApi; + +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"); + + AvatarsApi apiInstance = new AvatarsApi(defaultClient); + try { + ServiceQueueStats result = apiInstance.getImpostorQueueStats(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AvatarsApi#getImpostorQueueStats"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ServiceQueueStats**](ServiceQueueStats.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 Service Queue Stats. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getLicensedAvatars** +> List<Avatar> getLicensedAvatars(n, offset) + +List Licensed Avatars + +List licensed avatars. + +### 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.AvatarsApi; + +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"); + + AvatarsApi apiInstance = new AvatarsApi(defaultClient); + 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. + try { + List result = apiInstance.getLicensedAvatars(n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AvatarsApi#getLicensedAvatars"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **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] | ### Return type @@ -331,7 +652,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -341,13 +662,83 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of Avatar objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**403** | Error response when trying to see favourited avatars of another user without sufficient admin permissions. | - | +| **200** | Returns a list of Avatar objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getOwnAvatar** +> Avatar getOwnAvatar(userId) - +Get Own Avatar + +Get the current avatar for the user. This will return an error for any other user than the one logged in. + +### 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.AvatarsApi; + +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"); + + AvatarsApi apiInstance = new AvatarsApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + Avatar result = apiInstance.getOwnAvatar(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AvatarsApi#getOwnAvatar"); + 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 + +[**Avatar**](Avatar.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 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. | - | + + # **searchAvatars** -> List<Avatar> searchAvatars(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform) +> List<Avatar> searchAvatars(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant) Search Avatars @@ -368,12 +759,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -381,21 +766,22 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AvatarsApi apiInstance = new AvatarsApi(defaultClient); - String featured = "featured_example"; // String | Filters on featured results. - String sort = "popularity"; // String | + Boolean featured = true; // Boolean | Filters on featured results. + SortOption sort = SortOption.fromValue("_created_at"); // SortOption | The sort order of the results. String user = "me"; // String | Set to `me` for searching own avatars. String userId = "userId_example"; // String | Filter by UserID. Integer n = 60; // Integer | The number of objects to return. - String order = "ascending"; // String | + OrderOption order = OrderOption.fromValue("ascending"); // OrderOption | Result ordering Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. String tag = "tag_example"; // String | Tags to include (comma-separated). Any of the tags needs to be present. String notag = "notag_example"; // String | Tags to exclude (comma-separated). - String releaseStatus = "public"; // String | Filter by ReleaseStatus. + ReleaseStatus releaseStatus = ReleaseStatus.fromValue("all"); // ReleaseStatus | Filter by ReleaseStatus. String maxUnityVersion = "maxUnityVersion_example"; // String | The maximum Unity version supported by the asset. String minUnityVersion = "minUnityVersion_example"; // String | The minimum Unity version supported by the asset. String platform = "platform_example"; // String | The platform the asset supports. + Boolean isInternalVariant = false; // Boolean | Not quite sure what this actually does (exists on the website but doesn't seem to be used) try { - List result = apiInstance.searchAvatars(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); + List result = apiInstance.searchAvatars(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AvatarsApi#searchAvatars"); @@ -410,21 +796,22 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **featured** | **String**| Filters on featured results. | [optional] - **sort** | **String**| | [optional] [default to popularity] [enum: popularity, heat, trust, shuffle, random, favorites, reportScore, reportCount, publicationDate, labsPublicationDate, created, _created_at, updated, _updated_at, order, relevance, magic, name] - **user** | **String**| Set to `me` for searching own avatars. | [optional] [enum: me] - **userId** | **String**| Filter by UserID. | [optional] - **n** | **Integer**| The number of objects to return. | [optional] [default to 60] - **order** | **String**| | [optional] [default to descending] [enum: ascending, descending] - **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] - **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] - **notag** | **String**| Tags to exclude (comma-separated). | [optional] - **releaseStatus** | **String**| Filter by ReleaseStatus. | [optional] [default to public] [enum: public, private, hidden, all] - **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] - **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] - **platform** | **String**| The platform the asset supports. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **featured** | **Boolean**| Filters on featured results. | [optional] | +| **sort** | [**SortOption**](.md)| The sort order of the results. | [optional] [default to popularity] [enum: _created_at, _updated_at, created, favorites, heat, labsPublicationDate, magic, name, order, popularity, publicationDate, random, relevance, reportCount, reportScore, shuffle, trust, updated] | +| **user** | **String**| Set to `me` for searching own avatars. | [optional] [enum: me] | +| **userId** | **String**| Filter by UserID. | [optional] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **order** | [**OrderOption**](.md)| Result ordering | [optional] [default to descending] [enum: ascending, descending] | +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | +| **notag** | **String**| Tags to exclude (comma-separated). | [optional] | +| **releaseStatus** | [**ReleaseStatus**](.md)| Filter by ReleaseStatus. | [optional] [default to public] [enum: all, hidden, private, public] | +| **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] | +| **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] | +| **platform** | **String**| The platform the asset supports. | [optional] | +| **isInternalVariant** | **Boolean**| Not quite sure what this actually does (exists on the website but doesn't seem to be used) | [optional] | ### Return type @@ -432,7 +819,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -442,10 +829,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of Avatar objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of Avatar objects. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **selectAvatar** > CurrentUser selectAvatar(avatarId) @@ -468,12 +855,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -481,7 +862,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AvatarsApi apiInstance = new AvatarsApi(defaultClient); - String avatarId = "avatarId_example"; // String | + String avatarId = "avatarId_example"; // String | Must be a valid avatar ID. try { CurrentUser result = apiInstance.selectAvatar(avatarId); System.out.println(result); @@ -498,9 +879,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **avatarId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **avatarId** | **String**| Must be a valid avatar ID. | | ### Return type @@ -508,7 +889,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -518,11 +899,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single CurrentUser object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to show information about a non-existent avatar. | - | +| **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. | - | - + # **selectFallbackAvatar** > CurrentUser selectFallbackAvatar(avatarId) @@ -545,12 +926,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -558,7 +933,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AvatarsApi apiInstance = new AvatarsApi(defaultClient); - String avatarId = "avatarId_example"; // String | + String avatarId = "avatarId_example"; // String | Must be a valid avatar ID. try { CurrentUser result = apiInstance.selectFallbackAvatar(avatarId); System.out.println(result); @@ -575,9 +950,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **avatarId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **avatarId** | **String**| Must be a valid avatar ID. | | ### Return type @@ -585,7 +960,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -595,12 +970,12 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single CurrentUser object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**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. | - | +| **200** | Returns a single CurrentUser object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) @@ -623,12 +998,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -636,7 +1005,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); AvatarsApi apiInstance = new AvatarsApi(defaultClient); - String avatarId = "avatarId_example"; // String | + String avatarId = "avatarId_example"; // String | Must be a valid avatar ID. UpdateAvatarRequest updateAvatarRequest = new UpdateAvatarRequest(); // UpdateAvatarRequest | try { Avatar result = apiInstance.updateAvatar(avatarId, updateAvatarRequest); @@ -654,10 +1023,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **avatarId** | **String**| | - **updateAvatarRequest** | [**UpdateAvatarRequest**](UpdateAvatarRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **avatarId** | **String**| Must be a valid avatar ID. | | +| **updateAvatarRequest** | [**UpdateAvatarRequest**](UpdateAvatarRequest.md)| | [optional] | ### Return type @@ -665,7 +1034,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -675,7 +1044,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Avatar object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to show information about a non-existent avatar. | - | +| **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. | - | diff --git a/docs/Badge.md b/docs/Badge.md new file mode 100644 index 00000000..d3d8faca --- /dev/null +++ b/docs/Badge.md @@ -0,0 +1,21 @@ + + +# Badge + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assignedAt** | **OffsetDateTime** | only present in CurrentUser badges | [optional] | +|**badgeDescription** | **String** | | | +|**badgeId** | **String** | | | +|**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/Balance.md b/docs/Balance.md new file mode 100644 index 00000000..9ce49d0c --- /dev/null +++ b/docs/Balance.md @@ -0,0 +1,16 @@ + + +# Balance + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**balance** | **Integer** | | | +|**noTransactions** | **Boolean** | | [optional] | +|**tiliaResponse** | **Boolean** | | [optional] | + + + diff --git a/docs/BanGroupMemberRequest.md b/docs/BanGroupMemberRequest.md new file mode 100644 index 00000000..2e8cc856 --- /dev/null +++ b/docs/BanGroupMemberRequest.md @@ -0,0 +1,13 @@ + + +# BanGroupMemberRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userId** | **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/BoopRequest.md b/docs/BoopRequest.md new file mode 100644 index 00000000..dbcdbea5 --- /dev/null +++ b/docs/BoopRequest.md @@ -0,0 +1,16 @@ + + +# BoopRequest + +See NotificationDetailBoop; either inventoryItemId (accessed through .id) by itself, or emojiId (accessed through .metadata.fileId or built-in emoji name) with optional emojiVersion + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**emojiId** | **String** | Either a FileID or a string constant for default emojis | [optional] | +|**emojiVersion** | **Integer** | | [optional] | +|**inventoryItemId** | **String** | | [optional] | + + + diff --git a/docs/CalendarApi.md b/docs/CalendarApi.md new file mode 100644 index 00000000..69af25b9 --- /dev/null +++ b/docs/CalendarApi.md @@ -0,0 +1,991 @@ +# CalendarApi + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createGroupCalendarEvent**](CalendarApi.md#createGroupCalendarEvent) | **POST** /calendar/{groupId}/event | Create a calendar event | +| [**deleteGroupCalendarEvent**](CalendarApi.md#deleteGroupCalendarEvent) | **DELETE** /calendar/{groupId}/{calendarId} | Delete a calendar event | +| [**discoverCalendarEvents**](CalendarApi.md#discoverCalendarEvents) | **GET** /calendar/discover | Discover calendar events | +| [**followGroupCalendarEvent**](CalendarApi.md#followGroupCalendarEvent) | **POST** /calendar/{groupId}/{calendarId}/follow | Follow a calendar event | +| [**getCalendarEvents**](CalendarApi.md#getCalendarEvents) | **GET** /calendar | List calendar events | +| [**getFeaturedCalendarEvents**](CalendarApi.md#getFeaturedCalendarEvents) | **GET** /calendar/featured | List featured calendar events | +| [**getFollowedCalendarEvents**](CalendarApi.md#getFollowedCalendarEvents) | **GET** /calendar/following | List followed calendar events | +| [**getGroupCalendarEvent**](CalendarApi.md#getGroupCalendarEvent) | **GET** /calendar/{groupId}/{calendarId} | Get a calendar event | +| [**getGroupCalendarEventICS**](CalendarApi.md#getGroupCalendarEventICS) | **GET** /calendar/{groupId}/{calendarId}.ics | Download calendar event as ICS | +| [**getGroupCalendarEvents**](CalendarApi.md#getGroupCalendarEvents) | **GET** /calendar/{groupId} | List a group's calendar events | +| [**getGroupNextCalendarEvent**](CalendarApi.md#getGroupNextCalendarEvent) | **GET** /calendar/{groupId}/next | Get next calendar event | +| [**searchCalendarEvents**](CalendarApi.md#searchCalendarEvents) | **GET** /calendar/search | Search for calendar events | +| [**updateGroupCalendarEvent**](CalendarApi.md#updateGroupCalendarEvent) | **PUT** /calendar/{groupId}/{calendarId}/event | Update a calendar event | + + + +# **createGroupCalendarEvent** +> CalendarEvent createGroupCalendarEvent(groupId, createCalendarEventRequest) + +Create a calendar event + +Creates an event for a group on the calendar + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + CreateCalendarEventRequest createCalendarEventRequest = new CreateCalendarEventRequest(); // CreateCalendarEventRequest | + try { + CalendarEvent result = apiInstance.createGroupCalendarEvent(groupId, createCalendarEventRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#createGroupCalendarEvent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **createCalendarEventRequest** | [**CreateCalendarEventRequest**](CreateCalendarEventRequest.md)| | | + +### Return type + +[**CalendarEvent**](CalendarEvent.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single CalendarEvent object. | - | +| **400** | Error response due to an invalid or illegal calendar request. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response due to an invalid or illegal calendar request. | - | + + +# **deleteGroupCalendarEvent** +> Success deleteGroupCalendarEvent(groupId, calendarId) + +Delete a calendar event + +Delete a group calendar event + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String calendarId = "calendarId_example"; // String | Must be a valid calendar ID. + try { + Success result = apiInstance.deleteGroupCalendarEvent(groupId, calendarId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#deleteGroupCalendarEvent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **calendarId** | **String**| Must be a valid calendar ID. | | + +### Return type + +[**Success**](Success.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** | 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. | - | + + +# **discoverCalendarEvents** +> CalendarEventDiscovery discoverCalendarEvents(scope, categories, tags, featuredResults, nonFeaturedResults, personalizedResults, minimumInterestCount, minimumRemainingMinutes, upcomingOffsetMinutes, n, nextCursor) + +Discover calendar events + +Get a list of calendar events Initially, call without a `nextCursor` parameter For every successive call, use the `nextCursor` property returned in the previous call & the `number` of entries desired for this call The `nextCursor` internally keeps track of the `offset` of the results, the initial request parameters, and accounts for discrepancies that might arise from time elapsed between calls + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + CalendarEventDiscoveryScope scope = CalendarEventDiscoveryScope.fromValue("all"); // CalendarEventDiscoveryScope | Scope for calendar event discovery. + String categories = "avatars,exploration,gaming,roleplaying,music,performance"; // String | Filter for calendar event discovery. + String tags = "vrc_event_group_fair"; // String | Filter for calendar event discovery. + CalendarEventDiscoveryInclusion featuredResults = CalendarEventDiscoveryInclusion.fromValue("exclude"); // CalendarEventDiscoveryInclusion | Filter for calendar event discovery. + CalendarEventDiscoveryInclusion nonFeaturedResults = CalendarEventDiscoveryInclusion.fromValue("exclude"); // CalendarEventDiscoveryInclusion | Filter for calendar event discovery. + CalendarEventDiscoveryInclusion personalizedResults = CalendarEventDiscoveryInclusion.fromValue("exclude"); // CalendarEventDiscoveryInclusion | Filter for calendar event discovery. + Integer minimumInterestCount = 5; // Integer | Filter for calendar event discovery. + Integer minimumRemainingMinutes = 10; // Integer | Filter for calendar event discovery. + Integer upcomingOffsetMinutes = 10080; // Integer | Filter for calendar event discovery. + Integer n = 60; // Integer | The number of objects to return. + String nextCursor = "nextCursor_example"; // String | Cursor returned from previous calendar discovery queries (see nextCursor property of the schema CalendarEventDiscovery). + try { + CalendarEventDiscovery result = apiInstance.discoverCalendarEvents(scope, categories, tags, featuredResults, nonFeaturedResults, personalizedResults, minimumInterestCount, minimumRemainingMinutes, upcomingOffsetMinutes, n, nextCursor); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#discoverCalendarEvents"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **scope** | [**CalendarEventDiscoveryScope**](.md)| Scope for calendar event discovery. | [optional] [default to upcoming] [enum: all, live, upcoming] | +| **categories** | **String**| Filter for calendar event discovery. | [optional] | +| **tags** | **String**| Filter for calendar event discovery. | [optional] | +| **featuredResults** | [**CalendarEventDiscoveryInclusion**](.md)| Filter for calendar event discovery. | [optional] [default to include] [enum: exclude, include, skip] | +| **nonFeaturedResults** | [**CalendarEventDiscoveryInclusion**](.md)| Filter for calendar event discovery. | [optional] [default to include] [enum: exclude, include, skip] | +| **personalizedResults** | [**CalendarEventDiscoveryInclusion**](.md)| Filter for calendar event discovery. | [optional] [default to include] [enum: exclude, include, skip] | +| **minimumInterestCount** | **Integer**| Filter for calendar event discovery. | [optional] | +| **minimumRemainingMinutes** | **Integer**| Filter for calendar event discovery. | [optional] | +| **upcomingOffsetMinutes** | **Integer**| Filter for calendar event discovery. | [optional] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **nextCursor** | **String**| Cursor returned from previous calendar discovery queries (see nextCursor property of the schema CalendarEventDiscovery). | [optional] | + +### Return type + +[**CalendarEventDiscovery**](CalendarEventDiscovery.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 CalendarEventDiscovery objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **followGroupCalendarEvent** +> CalendarEvent followGroupCalendarEvent(groupId, calendarId, followCalendarEventRequest) + +Follow a calendar event + +Follow or unfollow an event on a group's calendar + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String calendarId = "calendarId_example"; // String | Must be a valid calendar ID. + FollowCalendarEventRequest followCalendarEventRequest = new FollowCalendarEventRequest(); // FollowCalendarEventRequest | + try { + CalendarEvent result = apiInstance.followGroupCalendarEvent(groupId, calendarId, followCalendarEventRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#followGroupCalendarEvent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **calendarId** | **String**| Must be a valid calendar ID. | | +| **followCalendarEventRequest** | [**FollowCalendarEventRequest**](FollowCalendarEventRequest.md)| | | + +### Return type + +[**CalendarEvent**](CalendarEvent.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single CalendarEvent object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getCalendarEvents** +> PaginatedCalendarEventList getCalendarEvents(date, n, offset) + +List calendar events + +Get a list of a user's calendar events for the month in ?date + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + OffsetDateTime date = OffsetDateTime.now(); // OffsetDateTime | The month to search in. + 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. + try { + PaginatedCalendarEventList result = apiInstance.getCalendarEvents(date, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#getCalendarEvents"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **date** | **OffsetDateTime**| The month to search in. | [optional] | +| **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] | + +### Return type + +[**PaginatedCalendarEventList**](PaginatedCalendarEventList.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 list of CalendarEvent objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getFeaturedCalendarEvents** +> PaginatedCalendarEventList getFeaturedCalendarEvents(date, n, offset) + +List featured calendar events + +Get a list of a featured calendar events for the month in ?date + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + OffsetDateTime date = OffsetDateTime.now(); // OffsetDateTime | The month to search in. + 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. + try { + PaginatedCalendarEventList result = apiInstance.getFeaturedCalendarEvents(date, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#getFeaturedCalendarEvents"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **date** | **OffsetDateTime**| The month to search in. | [optional] | +| **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] | + +### Return type + +[**PaginatedCalendarEventList**](PaginatedCalendarEventList.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 list of CalendarEvent objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getFollowedCalendarEvents** +> PaginatedCalendarEventList getFollowedCalendarEvents(date, n, offset) + +List followed calendar events + +Get a list of a followed calendar events for the month in ?date + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + OffsetDateTime date = OffsetDateTime.now(); // OffsetDateTime | The month to search in. + 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. + try { + PaginatedCalendarEventList result = apiInstance.getFollowedCalendarEvents(date, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#getFollowedCalendarEvents"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **date** | **OffsetDateTime**| The month to search in. | [optional] | +| **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] | + +### Return type + +[**PaginatedCalendarEventList**](PaginatedCalendarEventList.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 list of CalendarEvent objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getGroupCalendarEvent** +> CalendarEvent getGroupCalendarEvent(groupId, calendarId) + +Get a calendar event + +Get a group calendar event + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String calendarId = "calendarId_example"; // String | Must be a valid calendar ID. + try { + CalendarEvent result = apiInstance.getGroupCalendarEvent(groupId, calendarId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#getGroupCalendarEvent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **calendarId** | **String**| Must be a valid calendar ID. | | + +### Return type + +[**CalendarEvent**](CalendarEvent.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 single CalendarEvent object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getGroupCalendarEventICS** +> File getGroupCalendarEventICS(groupId, calendarId) + +Download calendar event as ICS + +Returns the specified calendar in iCalendar (ICS) format. + +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.CalendarApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String calendarId = "calendarId_example"; // String | Must be a valid calendar ID. + try { + File result = apiInstance.getGroupCalendarEventICS(groupId, calendarId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#getGroupCalendarEventICS"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **calendarId** | **String**| Must be a valid calendar ID. | | + +### Return type + +[**File**](File.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/calendar, application/json + +### HTTP 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. | - | + + +# **getGroupCalendarEvents** +> PaginatedCalendarEventList getGroupCalendarEvents(groupId, date, n, offset) + +List a group's calendar events + +Get a list of a group's calendar events + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + OffsetDateTime date = OffsetDateTime.now(); // OffsetDateTime | The month to search in. + 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. + try { + PaginatedCalendarEventList result = apiInstance.getGroupCalendarEvents(groupId, date, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#getGroupCalendarEvents"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **date** | **OffsetDateTime**| The month to search in. | [optional] | +| **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] | + +### Return type + +[**PaginatedCalendarEventList**](PaginatedCalendarEventList.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 list of CalendarEvent objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getGroupNextCalendarEvent** +> CalendarEvent getGroupNextCalendarEvent(groupId) + +Get next calendar event + +Get the closest future calendar event scheduled for a group + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + CalendarEvent result = apiInstance.getGroupNextCalendarEvent(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#getGroupNextCalendarEvent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**CalendarEvent**](CalendarEvent.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 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. | - | + + +# **searchCalendarEvents** +> PaginatedCalendarEventList searchCalendarEvents(searchTerm, utcOffset, n, offset, isInternalVariant) + +Search for calendar events + +Get a list of calendar events by search terms + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String searchTerm = "game night"; // String | Search term for calendar events. + Integer utcOffset = 56; // Integer | The offset from UTC in hours of the client or authenticated user. + 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. + Boolean isInternalVariant = false; // Boolean | Not quite sure what this actually does (exists on the website but doesn't seem to be used) + try { + PaginatedCalendarEventList result = apiInstance.searchCalendarEvents(searchTerm, utcOffset, n, offset, isInternalVariant); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#searchCalendarEvents"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **searchTerm** | **String**| Search term for calendar events. | | +| **utcOffset** | **Integer**| The offset from UTC in hours of the client or authenticated user. | [optional] | +| **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] | +| **isInternalVariant** | **Boolean**| Not quite sure what this actually does (exists on the website but doesn't seem to be used) | [optional] | + +### Return type + +[**PaginatedCalendarEventList**](PaginatedCalendarEventList.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 list of CalendarEvent objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **updateGroupCalendarEvent** +> CalendarEvent updateGroupCalendarEvent(groupId, calendarId, updateCalendarEventRequest) + +Update a calendar event + +Updates an event for a group on the calendar + +### 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.CalendarApi; + +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"); + + CalendarApi apiInstance = new CalendarApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String calendarId = "calendarId_example"; // String | Must be a valid calendar ID. + UpdateCalendarEventRequest updateCalendarEventRequest = new UpdateCalendarEventRequest(); // UpdateCalendarEventRequest | + try { + CalendarEvent result = apiInstance.updateGroupCalendarEvent(groupId, calendarId, updateCalendarEventRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CalendarApi#updateGroupCalendarEvent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **calendarId** | **String**| Must be a valid calendar ID. | | +| **updateCalendarEventRequest** | [**UpdateCalendarEventRequest**](UpdateCalendarEventRequest.md)| | | + +### Return type + +[**CalendarEvent**](CalendarEvent.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single CalendarEvent object. | - | +| **401** | Error response due to missing auth cookie. | - | + diff --git a/docs/CalendarDayOfWeek.md b/docs/CalendarDayOfWeek.md new file mode 100644 index 00000000..af3126af --- /dev/null +++ b/docs/CalendarDayOfWeek.md @@ -0,0 +1,23 @@ + + +# CalendarDayOfWeek + +## Enum + + +* `FR` (value: `"FR"`) + +* `MO` (value: `"MO"`) + +* `SA` (value: `"SA"`) + +* `SU` (value: `"SU"`) + +* `TH` (value: `"TH"`) + +* `TU` (value: `"TU"`) + +* `WE` (value: `"WE"`) + + + diff --git a/docs/CalendarEvent.md b/docs/CalendarEvent.md new file mode 100644 index 00000000..104453db --- /dev/null +++ b/docs/CalendarEvent.md @@ -0,0 +1,43 @@ + + +# CalendarEvent + +An event scheduled on a group's calendar + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accessType** | **CalendarEventAccess** | | | +|**category** | **CalendarEventCategory** | | | +|**closeInstanceAfterEndMinutes** | **Integer** | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**deletedAt** | **OffsetDateTime** | | [optional] | +|**description** | **String** | | | +|**durationInMs** | **Long** | | [optional] | +|**endsAt** | **OffsetDateTime** | | | +|**featured** | **Boolean** | | [optional] | +|**guestEarlyJoinMinutes** | **Integer** | | [optional] | +|**hostEarlyJoinMinutes** | **Integer** | | [optional] | +|**id** | **String** | | | +|**imageId** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**interestedUserCount** | **Integer** | | [optional] | +|**isDraft** | **Boolean** | | [optional] | +|**languages** | **List<String>** | Languages that might be spoken at this event | [optional] | +|**occurrenceKind** | **CalendarEventOccurrenceKind** | | [optional] | +|**ownerId** | **String** | | [optional] | +|**platforms** | **List<CalendarEventPlatform>** | | [optional] | +|**recurrence** | [**CalendarEventRecurrence**](CalendarEventRecurrence.md) | | [optional] | +|**roleIds** | **List<String>** | Group roles that may join this event | [optional] | +|**seriesId** | **String** | So far unused, always \"null\" | [optional] | +|**startsAt** | **OffsetDateTime** | | | +|**tags** | **List<String>** | Custom tags for this event | [optional] | +|**title** | **String** | | | +|**type** | **String** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**userInterest** | [**CalendarEventUserInterest**](CalendarEventUserInterest.md) | | [optional] | +|**usesInstanceOverflow** | **Boolean** | | [optional] | + + + diff --git a/docs/CalendarEventAccess.md b/docs/CalendarEventAccess.md new file mode 100644 index 00000000..57086bd3 --- /dev/null +++ b/docs/CalendarEventAccess.md @@ -0,0 +1,13 @@ + + +# CalendarEventAccess + +## Enum + + +* `GROUP` (value: `"group"`) + +* `PUBLIC` (value: `"public"`) + + + diff --git a/docs/CalendarEventCategory.md b/docs/CalendarEventCategory.md new file mode 100644 index 00000000..b689ebfa --- /dev/null +++ b/docs/CalendarEventCategory.md @@ -0,0 +1,35 @@ + + +# CalendarEventCategory + +## Enum + + +* `ARTS` (value: `"arts"`) + +* `AVATARS` (value: `"avatars"`) + +* `DANCE` (value: `"dance"`) + +* `EDUCATION` (value: `"education"`) + +* `EXPLORATION` (value: `"exploration"`) + +* `FILM_MEDIA` (value: `"film_media"`) + +* `GAMING` (value: `"gaming"`) + +* `HANGOUT` (value: `"hangout"`) + +* `MUSIC` (value: `"music"`) + +* `OTHER` (value: `"other"`) + +* `PERFORMANCE` (value: `"performance"`) + +* `ROLEPLAYING` (value: `"roleplaying"`) + +* `WELLNESS` (value: `"wellness"`) + + + diff --git a/docs/CalendarEventDiscovery.md b/docs/CalendarEventDiscovery.md new file mode 100644 index 00000000..78e84270 --- /dev/null +++ b/docs/CalendarEventDiscovery.md @@ -0,0 +1,14 @@ + + +# CalendarEventDiscovery + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nextCursor** | **String** | 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 | | +|**results** | [**List<CalendarEvent>**](CalendarEvent.md) | | | + + + diff --git a/docs/CalendarEventDiscoveryInclusion.md b/docs/CalendarEventDiscoveryInclusion.md new file mode 100644 index 00000000..0edced69 --- /dev/null +++ b/docs/CalendarEventDiscoveryInclusion.md @@ -0,0 +1,15 @@ + + +# CalendarEventDiscoveryInclusion + +## Enum + + +* `EXCLUDE` (value: `"exclude"`) + +* `INCLUDE` (value: `"include"`) + +* `SKIP` (value: `"skip"`) + + + diff --git a/docs/CalendarEventDiscoveryScope.md b/docs/CalendarEventDiscoveryScope.md new file mode 100644 index 00000000..dbd9233b --- /dev/null +++ b/docs/CalendarEventDiscoveryScope.md @@ -0,0 +1,15 @@ + + +# CalendarEventDiscoveryScope + +## Enum + + +* `ALL` (value: `"all"`) + +* `LIVE` (value: `"live"`) + +* `UPCOMING` (value: `"upcoming"`) + + + diff --git a/docs/CalendarEventFrequency.md b/docs/CalendarEventFrequency.md new file mode 100644 index 00000000..3595377d --- /dev/null +++ b/docs/CalendarEventFrequency.md @@ -0,0 +1,17 @@ + + +# CalendarEventFrequency + +## Enum + + +* `DAILY` (value: `"daily"`) + +* `MONTHLY` (value: `"monthly"`) + +* `WEEKLY` (value: `"weekly"`) + +* `YEARLY` (value: `"yearly"`) + + + diff --git a/docs/CalendarEventOccurrenceKind.md b/docs/CalendarEventOccurrenceKind.md new file mode 100644 index 00000000..0d0267c5 --- /dev/null +++ b/docs/CalendarEventOccurrenceKind.md @@ -0,0 +1,15 @@ + + +# CalendarEventOccurrenceKind + +## Enum + + +* `OCCURRENCE` (value: `"occurrence"`) + +* `SERIES` (value: `"series"`) + +* `SINGLE` (value: `"single"`) + + + diff --git a/docs/CalendarEventPlatform.md b/docs/CalendarEventPlatform.md new file mode 100644 index 00000000..a0348f80 --- /dev/null +++ b/docs/CalendarEventPlatform.md @@ -0,0 +1,15 @@ + + +# CalendarEventPlatform + +## Enum + + +* `ANDROID` (value: `"android"`) + +* `IOS` (value: `"ios"`) + +* `STANDALONEWINDOWS` (value: `"standalonewindows"`) + + + diff --git a/docs/CalendarEventRecurrence.md b/docs/CalendarEventRecurrence.md new file mode 100644 index 00000000..c9da74ca --- /dev/null +++ b/docs/CalendarEventRecurrence.md @@ -0,0 +1,18 @@ + + +# CalendarEventRecurrence + +Details about how a recurring event will be scheduled. If the event is to be scheduled indefinitely, this will lack an \"end\" property. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**daysOfWeek** | **List<CalendarDayOfWeek>** | Which days of the week the event will be scheduled, only valid/present for \"weekly\" recurring events | [optional] | +|**end** | [**CalendarEventRecurrenceEnd**](CalendarEventRecurrenceEnd.md) | | [optional] | +|**frequency** | **CalendarEventFrequency** | | | +|**interval** | **Integer** | How often the event will be scheduled, in units of \"frequency\" | | +|**timezone** | **String** | The timezone the event will be scheduled in, in Area/Location format | | + + + diff --git a/docs/CalendarEventRecurrenceEnd.md b/docs/CalendarEventRecurrenceEnd.md new file mode 100644 index 00000000..0871f834 --- /dev/null +++ b/docs/CalendarEventRecurrenceEnd.md @@ -0,0 +1,16 @@ + + +# CalendarEventRecurrenceEnd + +Details about how a recurring event stops being scheduled + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**count** | **Integer** | Required for \"afterOccurrences\" - The number of times the event will be scheduled before it stops being scheduled | [optional] | +|**date** | **String** | Required for \"afterDate\" - The date and time after which the event will stop being scheduled, **without timezone or offset** | [optional] | +|**type** | **CalendarEventRecurrenceEndType** | | | + + + diff --git a/docs/CalendarEventRecurrenceEndType.md b/docs/CalendarEventRecurrenceEndType.md new file mode 100644 index 00000000..6e581cd7 --- /dev/null +++ b/docs/CalendarEventRecurrenceEndType.md @@ -0,0 +1,13 @@ + + +# CalendarEventRecurrenceEndType + +## Enum + + +* `AFTER_DATE` (value: `"afterDate"`) + +* `AFTER_OCCURRENCES` (value: `"afterOccurrences"`) + + + diff --git a/docs/CalendarEventUserInterest.md b/docs/CalendarEventUserInterest.md new file mode 100644 index 00000000..a7fe98d1 --- /dev/null +++ b/docs/CalendarEventUserInterest.md @@ -0,0 +1,15 @@ + + +# CalendarEventUserInterest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | [optional] | +|**isFollowing** | **Boolean** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/ChangeUserTagsRequest.md b/docs/ChangeUserTagsRequest.md new file mode 100644 index 00000000..a886b4c5 --- /dev/null +++ b/docs/ChangeUserTagsRequest.md @@ -0,0 +1,13 @@ + + +# ChangeUserTagsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tags** | **List<String>** | The tags being added or removed. | | + + + diff --git a/docs/ChangeWorldTagsRequest.md b/docs/ChangeWorldTagsRequest.md new file mode 100644 index 00000000..0d830399 --- /dev/null +++ b/docs/ChangeWorldTagsRequest.md @@ -0,0 +1,13 @@ + + +# ChangeWorldTagsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tags** | **List<String>** | The tags being added or removed. | | + + + diff --git a/docs/ContentFilter.md b/docs/ContentFilter.md new file mode 100644 index 00000000..dd8c25b0 --- /dev/null +++ b/docs/ContentFilter.md @@ -0,0 +1,19 @@ + + +# ContentFilter + +## Enum + + +* `CONTENT_ADULT` (value: `"content_adult"`) + +* `CONTENT_GORE` (value: `"content_gore"`) + +* `CONTENT_HORROR` (value: `"content_horror"`) + +* `CONTENT_SEX` (value: `"content_sex"`) + +* `CONTENT_VIOLENCE` (value: `"content_violence"`) + + + diff --git a/docs/CreateAvatarModerationRequest.md b/docs/CreateAvatarModerationRequest.md new file mode 100644 index 00000000..96151493 --- /dev/null +++ b/docs/CreateAvatarModerationRequest.md @@ -0,0 +1,14 @@ + + +# CreateAvatarModerationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarModerationType** | **AvatarModerationType** | | | +|**targetAvatarId** | **String** | | | + + + diff --git a/docs/CreateAvatarRequest.md b/docs/CreateAvatarRequest.md index fd0f0707..7b21a413 100644 --- a/docs/CreateAvatarRequest.md +++ b/docs/CreateAvatarRequest.md @@ -5,17 +5,23 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assetUrl** | **String** | | [optional] -**id** | **String** | | [optional] -**name** | **String** | | -**description** | **String** | | [optional] -**tags** | **List<String>** | | [optional] -**imageUrl** | **String** | | -**releaseStatus** | **ReleaseStatus** | | [optional] -**version** | **BigDecimal** | | [optional] -**unityPackageUrl** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | [optional] | +|**assetVersion** | **String** | | [optional] | +|**createdAt** | **String** | A date and time of the pattern `M/d/yyyy h:mm:ss tt` (see C Sharp `System.DateTime`) | [optional] | +|**description** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**imageUrl** | **String** | | | +|**name** | **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] | +|**releaseStatus** | **ReleaseStatus** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**thumbnailImageUrl** | **String** | | [optional] | +|**unityPackageUrl** | **String** | | [optional] | +|**unityVersion** | **String** | | [optional] | +|**updatedAt** | **String** | A date and time of the pattern `M/d/yyyy h:mm:ss tt` (see C Sharp `System.DateTime`) | [optional] | +|**version** | **Integer** | | [optional] | diff --git a/docs/CreateCalendarEventRequest.md b/docs/CreateCalendarEventRequest.md new file mode 100644 index 00000000..872233d4 --- /dev/null +++ b/docs/CreateCalendarEventRequest.md @@ -0,0 +1,33 @@ + + +# CreateCalendarEventRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accessType** | **CalendarEventAccess** | | | +|**category** | **CalendarEventCategory** | | | +|**closeInstanceAfterEndMinutes** | **Integer** | | [optional] | +|**description** | **String** | | | +|**endsAt** | **OffsetDateTime** | Time the event ends at | | +|**featured** | **Boolean** | | [optional] | +|**guestEarlyJoinMinutes** | **Integer** | | [optional] | +|**hostEarlyJoinMinutes** | **Integer** | | [optional] | +|**imageId** | **String** | | [optional] | +|**isDraft** | **Boolean** | | [optional] | +|**languages** | **List<String>** | | [optional] | +|**occurrenceKind** | **CalendarEventOccurrenceKind** | | [optional] | +|**parentId** | **String** | | [optional] | +|**platforms** | **List<CalendarEventPlatform>** | | [optional] | +|**recurrence** | [**CalendarEventRecurrence**](CalendarEventRecurrence.md) | | [optional] | +|**roleIds** | **List<String>** | | [optional] | +|**sendCreationNotification** | **Boolean** | Send notification to group members. | | +|**startsAt** | **OffsetDateTime** | Time the event starts at | | +|**tags** | **List<String>** | | [optional] | +|**title** | **String** | Event title | | +|**usesInstanceOverflow** | **Boolean** | | [optional] | + + + diff --git a/docs/CreateFileRequest.md b/docs/CreateFileRequest.md index 2cf4fb83..324d368a 100644 --- a/docs/CreateFileRequest.md +++ b/docs/CreateFileRequest.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | -**mimeType** | **MIMEType** | | -**extension** | **String** | | -**tags** | **List<String>** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**extension** | **String** | | | +|**mimeType** | **MIMEType** | | | +|**name** | **String** | | | +|**tags** | **List<String>** | | [optional] | diff --git a/docs/CreateFileVersionRequest.md b/docs/CreateFileVersionRequest.md index c0a42c54..67929e8e 100644 --- a/docs/CreateFileVersionRequest.md +++ b/docs/CreateFileVersionRequest.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**signatureMd5** | **String** | | -**signatureSizeInBytes** | **BigDecimal** | | -**fileMd5** | **String** | | [optional] -**fileSizeInBytes** | **BigDecimal** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fileMd5** | **String** | | [optional] | +|**fileSizeInBytes** | **Integer** | | [optional] | +|**signatureMd5** | **String** | | | +|**signatureSizeInBytes** | **Integer** | | | diff --git a/docs/CreateGroupAnnouncementRequest.md b/docs/CreateGroupAnnouncementRequest.md new file mode 100644 index 00000000..ad044112 --- /dev/null +++ b/docs/CreateGroupAnnouncementRequest.md @@ -0,0 +1,16 @@ + + +# CreateGroupAnnouncementRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**imageId** | **String** | | [optional] | +|**sendNotification** | **Boolean** | Send notification to group members. | [optional] | +|**text** | **String** | Announcement text | [optional] | +|**title** | **String** | Announcement title | | + + + diff --git a/docs/CreateGroupGalleryRequest.md b/docs/CreateGroupGalleryRequest.md new file mode 100644 index 00000000..1f6078b7 --- /dev/null +++ b/docs/CreateGroupGalleryRequest.md @@ -0,0 +1,19 @@ + + +# CreateGroupGalleryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | Description of the gallery. | [optional] | +|**membersOnly** | **Boolean** | Whether the gallery is members only. | [optional] | +|**name** | **String** | Name of the gallery. | | +|**roleIdsToAutoApprove** | **List<String>** | | [optional] | +|**roleIdsToManage** | **List<String>** | | [optional] | +|**roleIdsToSubmit** | **List<String>** | | [optional] | +|**roleIdsToView** | **List<String>** | | [optional] | + + + diff --git a/docs/CreateGroupInviteRequest.md b/docs/CreateGroupInviteRequest.md new file mode 100644 index 00000000..86c0a8b7 --- /dev/null +++ b/docs/CreateGroupInviteRequest.md @@ -0,0 +1,14 @@ + + +# CreateGroupInviteRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**confirmOverrideBlock** | **Boolean** | | [optional] | +|**userId** | **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/CreateGroupPostRequest.md b/docs/CreateGroupPostRequest.md new file mode 100644 index 00000000..6c05c9a2 --- /dev/null +++ b/docs/CreateGroupPostRequest.md @@ -0,0 +1,18 @@ + + +# CreateGroupPostRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**imageId** | **String** | | [optional] | +|**roleIds** | **List<String>** | | [optional] | +|**sendNotification** | **Boolean** | Send notification to group members. | | +|**text** | **String** | Post text | | +|**title** | **String** | Post title | | +|**visibility** | **GroupPostVisibility** | | | + + + diff --git a/docs/CreateGroupRequest.md b/docs/CreateGroupRequest.md new file mode 100644 index 00000000..52241336 --- /dev/null +++ b/docs/CreateGroupRequest.md @@ -0,0 +1,20 @@ + + +# CreateGroupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bannerId** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**iconId** | **String** | | [optional] | +|**joinState** | **GroupJoinState** | | [optional] | +|**name** | **String** | | | +|**privacy** | **GroupPrivacy** | | [optional] | +|**roleTemplate** | **GroupRoleTemplate** | | | +|**shortCode** | **String** | | | + + + diff --git a/docs/CreateGroupRoleRequest.md b/docs/CreateGroupRoleRequest.md new file mode 100644 index 00000000..cab0bed8 --- /dev/null +++ b/docs/CreateGroupRoleRequest.md @@ -0,0 +1,17 @@ + + +# CreateGroupRoleRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**isSelfAssignable** | **Boolean** | | [optional] | +|**name** | **String** | | [optional] | +|**permissions** | **List<GroupPermissions>** | | [optional] | + + + diff --git a/docs/CreateInstanceRequest.md b/docs/CreateInstanceRequest.md new file mode 100644 index 00000000..9dd4c435 --- /dev/null +++ b/docs/CreateInstanceRequest.md @@ -0,0 +1,29 @@ + + +# CreateInstanceRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ageGate** | **Boolean** | | [optional] | +|**calendarEntryId** | **String** | | [optional] | +|**canRequestInvite** | **Boolean** | Only applies to invite type instances to make them invite+ | [optional] | +|**closedAt** | **OffsetDateTime** | The time after which users won't be allowed to join the instance. This doesn't work for public instances. | [optional] | +|**contentSettings** | [**InstanceContentSettings**](InstanceContentSettings.md) | | [optional] | +|**displayName** | **String** | | [optional] | +|**groupAccessType** | **GroupAccessType** | | [optional] | +|**hardClose** | **Boolean** | Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. | [optional] | +|**instancePersistenceEnabled** | **Boolean** | | [optional] | +|**inviteOnly** | **Boolean** | | [optional] | +|**ownerId** | **String** | A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise | [optional] | +|**playerPersistenceEnabled** | **Boolean** | | [optional] | +|**queueEnabled** | **Boolean** | | [optional] | +|**region** | **InstanceRegion** | | | +|**roleIds** | **List<String>** | Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" | [optional] | +|**type** | **InstanceType** | | | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | + + + diff --git a/docs/CreateJamSubmissionRequest.md b/docs/CreateJamSubmissionRequest.md new file mode 100644 index 00000000..f44866c3 --- /dev/null +++ b/docs/CreateJamSubmissionRequest.md @@ -0,0 +1,15 @@ + + +# CreateJamSubmissionRequest + +Submit content for a Jam. Both content upload by submitter and jam submission itself must be made within the jam's designated times. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contentId** | **String** | The id of the uploaded content (e.g., avatar, world) being submitted. | | +|**description** | **String** | A description of the content being submitted. | | + + + diff --git a/docs/CreateListingRequest.md b/docs/CreateListingRequest.md new file mode 100644 index 00000000..4d14f607 --- /dev/null +++ b/docs/CreateListingRequest.md @@ -0,0 +1,21 @@ + + +# CreateListingRequest + +Observed create-listing payload fields. Additional fields may exist. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**active** | **Boolean** | | [optional] | +|**description** | **String** | | | +|**displayName** | **String** | | | +|**imageId** | **String** | | | +|**listingType** | **ProductListingType** | | | +|**priceTokens** | **Integer** | | | +|**productIds** | **List<String>** | | | +|**storeIds** | **List<String>** | | | + + + diff --git a/docs/CreateProductRequest.md b/docs/CreateProductRequest.md new file mode 100644 index 00000000..dfcf1b8e --- /dev/null +++ b/docs/CreateProductRequest.md @@ -0,0 +1,18 @@ + + +# CreateProductRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | | | +|**displayName** | **String** | | | +|**imageId** | **String** | | | +|**productType** | **ProductType** | | | +|**tags** | **List<String>** | | | +|**useForSubscriberList** | **Boolean** | | | + + + diff --git a/docs/CreatePropRequest.md b/docs/CreatePropRequest.md new file mode 100644 index 00000000..9610f97c --- /dev/null +++ b/docs/CreatePropRequest.md @@ -0,0 +1,24 @@ + + +# CreatePropRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | | +|**assetVersion** | **Integer** | | | +|**description** | **String** | | | +|**id** | **String** | | | +|**imageUrl** | **String** | | | +|**name** | **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`. | | +|**propSignature** | **String** | | [optional] | +|**spawnType** | **Integer** | 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: ??? | | +|**tags** | **List<String>** | | | +|**unityVersion** | **String** | | | +|**worldPlacementMask** | **Integer** | Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings | | + + + diff --git a/docs/CreateWorldRequest.md b/docs/CreateWorldRequest.md index 8704ed62..e97e0617 100644 --- a/docs/CreateWorldRequest.md +++ b/docs/CreateWorldRequest.md @@ -5,22 +5,22 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assetUrl** | **String** | | -**assetVersion** | **Integer** | | [optional] -**authorId** | **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] -**authorName** | **String** | | [optional] -**capacity** | **Integer** | | [optional] -**description** | **String** | | [optional] -**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] -**imageUrl** | **String** | | -**name** | **String** | | -**platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | [optional] -**releaseStatus** | **ReleaseStatus** | | [optional] -**tags** | **List<String>** | | [optional] -**unityPackageUrl** | **String** | | [optional] -**unityVersion** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | | +|**assetVersion** | **Integer** | | [optional] | +|**authorId** | **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] | +|**authorName** | **String** | | [optional] | +|**capacity** | **Integer** | | [optional] | +|**description** | **String** | | [optional] | +|**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] | +|**imageUrl** | **String** | | | +|**name** | **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] | +|**releaseStatus** | **ReleaseStatus** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**unityPackageUrl** | **String** | | [optional] | +|**unityVersion** | **String** | | [optional] | diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md index a780a4c8..842d42b7 100644 --- a/docs/CurrentUser.md +++ b/docs/CurrentUser.md @@ -5,54 +5,90 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acceptedTOSVersion** | **Integer** | | -**accountDeletionDate** | **LocalDate** | | [optional] -**activeFriends** | **List<String>** | | [optional] -**allowAvatarCopying** | **Boolean** | | -**bio** | **String** | | -**bioLinks** | **List<String>** | | -**currentAvatar** | **String** | | -**currentAvatarAssetUrl** | **String** | | -**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | -**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | -**dateJoined** | **LocalDate** | | -**developerType** | **DeveloperType** | | -**displayName** | **String** | | -**emailVerified** | **Boolean** | | -**fallbackAvatar** | **String** | | [optional] -**friendGroupNames** | **List<String>** | Always empty array. | -**friendKey** | **String** | | -**friends** | **List<String>** | | -**hasBirthday** | **Boolean** | | -**hasEmail** | **Boolean** | | -**hasLoggedInFromClient** | **Boolean** | | -**hasPendingEmail** | **Boolean** | | -**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. | -**isFriend** | **Boolean** | | -**lastLogin** | **OffsetDateTime** | | -**lastPlatform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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) | | -**profilePicOverride** | **String** | | -**state** | **UserState** | | -**status** | **UserStatus** | | -**statusDescription** | **String** | | -**statusFirstTime** | **Boolean** | | -**statusHistory** | **List<String>** | | -**steamDetails** | **Object** | | -**steamId** | **String** | | -**tags** | **List<String>** | | -**twoFactorAuthEnabled** | **Boolean** | | -**unsubscribe** | **Boolean** | | -**userIcon** | **String** | | -**username** | **String** | | +| 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] | diff --git a/docs/CurrentUserPlatformHistoryInner.md b/docs/CurrentUserPlatformHistoryInner.md new file mode 100644 index 00000000..3f4e0878 --- /dev/null +++ b/docs/CurrentUserPlatformHistoryInner.md @@ -0,0 +1,15 @@ + + +# CurrentUserPlatformHistoryInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isMobile** | **Boolean** | | [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] | +|**recorded** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/CurrentUserPresence.md b/docs/CurrentUserPresence.md new file mode 100644 index 00000000..4631c8df --- /dev/null +++ b/docs/CurrentUserPresence.md @@ -0,0 +1,28 @@ + + +# CurrentUserPresence + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarThumbnail** | **String** | | [optional] | +|**currentAvatarTags** | **List<String>** | | [optional] | +|**debugflag** | **String** | | [optional] | +|**displayName** | **String** | | [optional] | +|**groups** | **List<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] | +|**instance** | **String** | | [optional] | +|**instanceType** | **String** | either an InstanceType or an empty string | [optional] | +|**isRejoining** | **String** | | [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] | +|**profilePicOverride** | **String** | | [optional] | +|**status** | **String** | either a UserStatus or empty string | [optional] | +|**travelingToInstance** | **String** | | [optional] | +|**travelingToWorld** | **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] | +|**userIcon** | **String** | | [optional] | +|**world** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] | + + + diff --git a/docs/DeclineGroupInviteRequest.md b/docs/DeclineGroupInviteRequest.md new file mode 100644 index 00000000..47a6caa5 --- /dev/null +++ b/docs/DeclineGroupInviteRequest.md @@ -0,0 +1,13 @@ + + +# DeclineGroupInviteRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**block** | **Boolean** | | [optional] | + + + diff --git a/docs/DeploymentGroup.md b/docs/DeploymentGroup.md deleted file mode 100644 index 178365ab..00000000 --- a/docs/DeploymentGroup.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# DeploymentGroup - -## Enum - - -* `BLUE` (value: `"blue"`) - -* `GREEN` (value: `"green"`) - -* `GRAPE` (value: `"grape"`) - -* `CHERRY` (value: `"cherry"`) - - - diff --git a/docs/DeveloperType.md b/docs/DeveloperType.md index 40bef3a2..675b12a1 100644 --- a/docs/DeveloperType.md +++ b/docs/DeveloperType.md @@ -5,13 +5,13 @@ ## Enum -* `NONE` (value: `"none"`) - -* `TRUSTED` (value: `"trusted"`) - * `INTERNAL` (value: `"internal"`) * `MODERATOR` (value: `"moderator"`) +* `NONE` (value: `"none"`) + +* `TRUSTED` (value: `"trusted"`) + diff --git a/docs/Disable2FAResult.md b/docs/Disable2FAResult.md new file mode 100644 index 00000000..7249f2f7 --- /dev/null +++ b/docs/Disable2FAResult.md @@ -0,0 +1,13 @@ + + +# Disable2FAResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**removed** | **Boolean** | | | + + + diff --git a/docs/DiscordDetails.md b/docs/DiscordDetails.md new file mode 100644 index 00000000..8e4f896e --- /dev/null +++ b/docs/DiscordDetails.md @@ -0,0 +1,15 @@ + + +# DiscordDetails + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**globalName** | **String** | | [optional] | +|**id** | **String** | https://discord.com/developers/docs/reference#snowflakes | [optional] | + + + diff --git a/docs/DownloadURLList.md b/docs/DownloadURLList.md deleted file mode 100644 index f3e9e755..00000000 --- a/docs/DownloadURLList.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# DownloadURLList - -Download links for various development assets. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sdk2** | **String** | Download link for legacy SDK2 | -**sdk3Avatars** | **String** | Download link for SDK3 for Avatars | -**sdk3Worlds** | **String** | Download link for SDK3 for Worlds | - - - diff --git a/docs/DynamicContentRow.md b/docs/DynamicContentRow.md index 112f4b3c..2ff9969c 100644 --- a/docs/DynamicContentRow.md +++ b/docs/DynamicContentRow.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**index** | **Integer** | | [optional] -**name** | **String** | | -**platform** | **String** | Usually \"ThisPlatformSupported\", but can also be other values such as \"all\" or platform specific identifiers. | -**sortHeading** | **String** | | -**sortOrder** | **String** | | -**sortOwnership** | **String** | | -**tag** | **String** | Tag to filter content for this row. | [optional] -**type** | **String** | Type is not present if it is a world. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**index** | **Integer** | | [optional] | +|**name** | **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`. | | +|**sortHeading** | **String** | | | +|**sortOrder** | **String** | | | +|**sortOwnership** | **String** | | | +|**tag** | **String** | 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. | [optional] | +|**type** | **String** | Type is not present if it is a world. | [optional] | diff --git a/docs/EarningsMetrics.md b/docs/EarningsMetrics.md new file mode 100644 index 00000000..79574eb0 --- /dev/null +++ b/docs/EarningsMetrics.md @@ -0,0 +1,15 @@ + + +# EarningsMetrics + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**breakdown** | **List<Object>** | | | +|**sellerId** | **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. | | +|**totals** | [**EarningsMetricsTotals**](EarningsMetricsTotals.md) | | | + + + diff --git a/docs/EarningsMetricsTotals.md b/docs/EarningsMetricsTotals.md new file mode 100644 index 00000000..15b4b827 --- /dev/null +++ b/docs/EarningsMetricsTotals.md @@ -0,0 +1,17 @@ + + +# EarningsMetricsTotals + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otpEarnings** | **Integer** | | | +|**otpPurchaseCount** | **Integer** | | | +|**subscriberEarnings** | **Integer** | | | +|**subscriberMonths** | **Integer** | | | +|**totalEarnings** | **Integer** | | | + + + diff --git a/docs/EconomyAccount.md b/docs/EconomyAccount.md new file mode 100644 index 00000000..fee89ee4 --- /dev/null +++ b/docs/EconomyAccount.md @@ -0,0 +1,25 @@ + + +# EconomyAccount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountActivatedOn** | **OffsetDateTime** | | | +|**accountId** | **String** | | | +|**accountSellerRegisteredOn** | **OffsetDateTime** | | [optional] | +|**accountSellerStatus** | **String** | | [optional] | +|**blocked** | **Boolean** | | | +|**canEarn** | **Boolean** | | [optional] | +|**canPayout** | **Boolean** | | [optional] | +|**canSpend** | **Boolean** | | | +|**skrillEmail** | **String** | | [optional] | +|**source** | **String** | | | +|**tiliaId** | **String** | | [optional] | +|**tiliaType** | **String** | | [optional] | +|**userId** | **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/EconomyApi.md b/docs/EconomyApi.md index 127857ff..9e055505 100644 --- a/docs/EconomyApi.md +++ b/docs/EconomyApi.md @@ -2,22 +2,2322 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getCurrentSubscriptions**](EconomyApi.md#getCurrentSubscriptions) | **GET** /auth/user/subscription | Get Current Subscriptions -[**getLicenseGroup**](EconomyApi.md#getLicenseGroup) | **GET** /licenseGroups/{licenseGroupId} | Get License Group -[**getSteamTransaction**](EconomyApi.md#getSteamTransaction) | **GET** /Steam/transactions/{transactionId} | Get Steam Transaction -[**getSteamTransactions**](EconomyApi.md#getSteamTransactions) | **GET** /Steam/transactions | List Steam Transactions -[**getSubscriptions**](EconomyApi.md#getSubscriptions) | **GET** /subscriptions | List Subscriptions +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createProduct**](EconomyApi.md#createProduct) | **POST** /products | Create Product | +| [**createProductListingDirect**](EconomyApi.md#createProductListingDirect) | **POST** /listing | Create Product Listing | +| [**deleteProduct**](EconomyApi.md#deleteProduct) | **DELETE** /products/{productId} | Delete Product | +| [**deleteProductListingDirect**](EconomyApi.md#deleteProductListingDirect) | **DELETE** /listing/{productId} | Delete Product Listing | +| [**getActiveLicenses**](EconomyApi.md#getActiveLicenses) | **GET** /economy/licenses/active | Get Active Licenses | +| [**getBalance**](EconomyApi.md#getBalance) | **GET** /user/{userId}/balance | Get Balance | +| [**getBalanceEarnings**](EconomyApi.md#getBalanceEarnings) | **GET** /user/{userId}/balance/earnings | Get Balance Earnings | +| [**getBulkGiftPurchases**](EconomyApi.md#getBulkGiftPurchases) | **GET** /user/bulk/gift/purchases | Get Bulk Gift Purchases | +| [**getCurrentSubscriptions**](EconomyApi.md#getCurrentSubscriptions) | **GET** /auth/user/subscription | Get Current Subscriptions | +| [**getEarningsMetrics**](EconomyApi.md#getEarningsMetrics) | **GET** /economy/metrics/earnings | Get Earnings Metrics | +| [**getEconomyAccount**](EconomyApi.md#getEconomyAccount) | **GET** /user/{userId}/economy/account | Get Economy Account | +| [**getEconomyBalances**](EconomyApi.md#getEconomyBalances) | **GET** /user/{userId}/economy/balances | Get Economy Balances | +| [**getEconomyPayoutStatus**](EconomyApi.md#getEconomyPayoutStatus) | **GET** /user/{userId}/economy/payouts/status | Get Economy Payout Status | +| [**getEconomyPayouts**](EconomyApi.md#getEconomyPayouts) | **GET** /user/{userId}/economy/payouts/list | Get Economy Payouts | +| [**getLicenseGroup**](EconomyApi.md#getLicenseGroup) | **GET** /licenseGroups/{licenseGroupId} | Get License Group | +| [**getProductListing**](EconomyApi.md#getProductListing) | **GET** /listing/{productId} | Get Product Listing | +| [**getProductListingAlternate**](EconomyApi.md#getProductListingAlternate) | **GET** /products/{productId} | Get Product Listing (alternate) | +| [**getProductListings**](EconomyApi.md#getProductListings) | **GET** /user/{userId}/listings | Get User Product Listings | +| [**getProductPurchase**](EconomyApi.md#getProductPurchase) | **GET** /economy/purchases/{productPurchaseId} | Get Product Purchase | +| [**getProductPurchaseHistory**](EconomyApi.md#getProductPurchaseHistory) | **GET** /user/{userId}/economy/transactions | Get Product Purchase History | +| [**getProductPurchaseStacks**](EconomyApi.md#getProductPurchaseStacks) | **GET** /economy/purchases/{productPurchaseId}/stacks | Get Product Purchase Stacks | +| [**getProductPurchases**](EconomyApi.md#getProductPurchases) | **GET** /economy/purchases | Get Product Purchases | +| [**getRecentSubscription**](EconomyApi.md#getRecentSubscription) | **GET** /user/subscription/recent | Get Recent Subscription | +| [**getSellerEligibility**](EconomyApi.md#getSellerEligibility) | **GET** /economy/seller/eligibility | Get Seller Eligibility | +| [**getSteamTransaction**](EconomyApi.md#getSteamTransaction) | **GET** /Steam/transactions/{transactionId} | Get Steam Transaction | +| [**getSteamTransactions**](EconomyApi.md#getSteamTransactions) | **GET** /Steam/transactions | List Steam Transactions | +| [**getStore**](EconomyApi.md#getStore) | **GET** /economy/store | Get Store | +| [**getStoreShelves**](EconomyApi.md#getStoreShelves) | **GET** /economy/store/shelves | Get Store Shelves | +| [**getSubscriptions**](EconomyApi.md#getSubscriptions) | **GET** /subscriptions | List Subscriptions | +| [**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 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 | +| [**purchaseProductListing**](EconomyApi.md#purchaseProductListing) | **POST** /economy/purchase/listing | Purchase Product Listing | +| [**updateProduct**](EconomyApi.md#updateProduct) | **PUT** /products/{productId} | Update Product | +| [**updateProductListingDirect**](EconomyApi.md#updateProductListingDirect) | **PUT** /listing/{productId} | Update Product Listing | +| [**updateTiliaTos**](EconomyApi.md#updateTiliaTos) | **PUT** /user/{userId}/tilia/tos | Update Tilia TOS Agreement Status | + + + +# **createProduct** +> Product createProduct(createProductRequest) + +Create Product + +Creates a product and returns the new Product object. +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + CreateProductRequest createProductRequest = new CreateProductRequest(); // CreateProductRequest | + try { + Product result = apiInstance.createProduct(createProductRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#createProduct"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createProductRequest** | [**CreateProductRequest**](CreateProductRequest.md)| | | + +### Return type + +[**Product**](Product.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single Product object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **createProductListingDirect** +> ProductListing createProductListingDirect(createListingRequest) + +Create Product Listing + +Creates a listing and returns the new ProductListing object. The request body is based on observed fields and may be incomplete. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + CreateListingRequest createListingRequest = new CreateListingRequest(); // CreateListingRequest | + try { + ProductListing result = apiInstance.createProductListingDirect(createListingRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#createProductListingDirect"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createListingRequest** | [**CreateListingRequest**](CreateListingRequest.md)| | | + +### Return type + +[**ProductListing**](ProductListing.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single ProductListing object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **deleteProduct** +> SuccessFlag deleteProduct(productId) + +Delete Product + +Deletes a product. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String productId = "productId_example"; // String | Must be a valid product ID. + try { + SuccessFlag result = apiInstance.deleteProduct(productId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#deleteProduct"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **productId** | **String**| Must be a valid product ID. | | + +### Return type + +[**SuccessFlag**](SuccessFlag.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 an SuccessFlag object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **deleteProductListingDirect** +> SuccessFlag deleteProductListingDirect(productId, hydrate) + +Delete Product Listing + +Deletes a listing. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String productId = "productId_example"; // String | Must be a valid product ID. + Boolean hydrate = true; // Boolean | Populates some fields and changes types of others for certain objects. + try { + SuccessFlag result = apiInstance.deleteProductListingDirect(productId, hydrate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#deleteProductListingDirect"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **productId** | **String**| Must be a valid product ID. | | +| **hydrate** | **Boolean**| Populates some fields and changes types of others for certain objects. | [optional] | + +### Return type + +[**SuccessFlag**](SuccessFlag.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 an SuccessFlag object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getActiveLicenses** +> List<License> getActiveLicenses() + +Get Active Licenses + +Gets active licenses + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + List result = apiInstance.getActiveLicenses(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getActiveLicenses"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<License>**](License.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 list of License objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getBalance** +> Balance getBalance(userId) + +Get Balance + +Gets the balance of a 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + Balance result = apiInstance.getBalance(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getBalance"); + 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 + +[**Balance**](Balance.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 single Balance object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getBalanceEarnings** +> Balance getBalanceEarnings(userId) + +Get Balance Earnings + +Gets the balance of a user from earnings + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + Balance result = apiInstance.getBalanceEarnings(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getBalanceEarnings"); + 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 + +[**Balance**](Balance.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 single Balance object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getBulkGiftPurchases** +> List<Object> getBulkGiftPurchases(mostRecent) + +Get Bulk Gift Purchases + +Get bulk gift purchases made by the 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + Boolean mostRecent = true; // Boolean | + try { + List result = apiInstance.getBulkGiftPurchases(mostRecent); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getBulkGiftPurchases"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **mostRecent** | **Boolean**| | [optional] | + +### Return type + +**List<Object>** + +### 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 list of ??? objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getCurrentSubscriptions** +> List<UserSubscription> getCurrentSubscriptions() + +Get Current Subscriptions + +Get a list of all current user subscriptions. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + List result = apiInstance.getCurrentSubscriptions(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getCurrentSubscriptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<UserSubscription>**](UserSubscription.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 list of UserSubscription objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getEarningsMetrics** +> EarningsMetrics getEarningsMetrics(sellerId, metricDateStart, metricDateEnd, groupByDuration) + +Get Earnings Metrics + +Gets earnings totals and breakdown metrics for 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String sellerId = "sellerId_example"; // String | Seller to retrieve economy metrics for. + String metricDateStart = "2026-03-28T23:00:00.000Z"; // String | Lower bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. + String metricDateEnd = "2026-04-04T21:59:59.999Z"; // String | Upper bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. + String groupByDuration = "days"; // String | Time bucket size for economy metrics. Observed values include `days` and `years`. + try { + EarningsMetrics result = apiInstance.getEarningsMetrics(sellerId, metricDateStart, metricDateEnd, groupByDuration); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getEarningsMetrics"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **sellerId** | **String**| Seller to retrieve economy metrics for. | | +| **metricDateStart** | **String**| Lower bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. | [optional] | +| **metricDateEnd** | **String**| Upper bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. | [optional] | +| **groupByDuration** | **String**| Time bucket size for economy metrics. Observed values include `days` and `years`. | [optional] | + +### Return type + +[**EarningsMetrics**](EarningsMetrics.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 single EarningsMetrics object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getEconomyAccount** +> EconomyAccount getEconomyAccount(userId) + +Get Economy Account + +Gets the economy account of a 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + EconomyAccount result = apiInstance.getEconomyAccount(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getEconomyAccount"); + 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 + +[**EconomyAccount**](EconomyAccount.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 single EconomyAccount object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getEconomyBalances** +> EconomyBalances getEconomyBalances(userId) + +Get Economy Balances + +Gets the combined balances for a 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + EconomyBalances result = apiInstance.getEconomyBalances(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getEconomyBalances"); + 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 + +[**EconomyBalances**](EconomyBalances.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 an EconomyBalances object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getEconomyPayoutStatus** +> EconomyPayoutStatus getEconomyPayoutStatus(userId) + +Get Economy Payout Status + +Gets the current payout status and eligibility information for a 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + EconomyPayoutStatus result = apiInstance.getEconomyPayoutStatus(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getEconomyPayoutStatus"); + 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 + +[**EconomyPayoutStatus**](EconomyPayoutStatus.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 an EconomyPayoutStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getEconomyPayouts** +> EconomyPayoutList getEconomyPayouts(userId) + +Get Economy Payouts + +Gets the payout history for a 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + EconomyPayoutList result = apiInstance.getEconomyPayouts(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getEconomyPayouts"); + 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 + +[**EconomyPayoutList**](EconomyPayoutList.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 an EconomyPayoutList object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getLicenseGroup** +> LicenseGroup getLicenseGroup(licenseGroupId) + +Get License Group + +Get a single License Group by given ID. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String licenseGroupId = "licenseGroupId_example"; // String | Must be a valid license group ID. + try { + LicenseGroup result = apiInstance.getLicenseGroup(licenseGroupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getLicenseGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **licenseGroupId** | **String**| Must be a valid license group ID. | | + +### Return type + +[**LicenseGroup**](LicenseGroup.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 single LicenseGroup object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getProductListing** +> ProductListing getProductListing(productId, hydrate) + +Get Product Listing + +Gets a product listing + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String productId = "productId_example"; // String | Must be a valid product ID. + Boolean hydrate = true; // Boolean | Populates some fields and changes types of others for certain objects. + try { + ProductListing result = apiInstance.getProductListing(productId, hydrate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getProductListing"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **productId** | **String**| Must be a valid product ID. | | +| **hydrate** | **Boolean**| Populates some fields and changes types of others for certain objects. | [optional] | + +### Return type + +[**ProductListing**](ProductListing.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 single ProductListing object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getProductListingAlternate** +> ProductListing getProductListingAlternate(productId) + +Get Product Listing (alternate) + +Gets a product listing + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String productId = "productId_example"; // String | Must be a valid product ID. + try { + ProductListing result = apiInstance.getProductListingAlternate(productId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getProductListingAlternate"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **productId** | **String**| Must be a valid product ID. | | + +### Return type + +[**ProductListing**](ProductListing.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 single ProductListing object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getProductListings** +> List<ProductListing> getProductListings(userId, n, offset, hydrate, listingType, groupId, active) + +Get User Product Listings + +Gets the product listings of a given 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + 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. + Boolean hydrate = true; // Boolean | Populates some fields and changes types of others for certain objects. + String listingType = "otp"; // String | Filter user listings by category. Observed values include `otp` and `subscription`. + String groupId = "groupId_example"; // String | Must be a valid group ID. + Boolean active = true; // Boolean | Filter for users' listings and inventory bundles. + try { + List result = apiInstance.getProductListings(userId, n, offset, hydrate, listingType, groupId, active); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getProductListings"); + 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. | | +| **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] | +| **hydrate** | **Boolean**| Populates some fields and changes types of others for certain objects. | [optional] | +| **listingType** | **String**| Filter user listings by category. Observed values include `otp` and `subscription`. | [optional] | +| **groupId** | **String**| Must be a valid group ID. | [optional] | +| **active** | **Boolean**| Filter for users' listings and inventory bundles. | [optional] | + +### Return type + +[**List<ProductListing>**](ProductListing.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 list of ProductListing objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getProductPurchase** +> ProductPurchase getProductPurchase(productPurchaseId) + +Get Product Purchase + +Gets a single product purchase + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String productPurchaseId = "productPurchaseId_example"; // String | Must be a valid purchase ID. + try { + ProductPurchase result = apiInstance.getProductPurchase(productPurchaseId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getProductPurchase"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **productPurchaseId** | **String**| Must be a valid purchase ID. | | + +### Return type + +[**ProductPurchase**](ProductPurchase.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 single ProductPurchase object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getProductPurchaseHistory** +> ProductPurchaseHistory getProductPurchaseHistory(userId, n, dateMin, dateMax, fromUserId, toUserId, sort, order) + +Get Product Purchase History + +Gets a history of product purchases + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + Integer n = 60; // Integer | The number of objects to return. + OffsetDateTime dateMin = OffsetDateTime.now(); // OffsetDateTime | The start date of the search range. + OffsetDateTime dateMax = OffsetDateTime.now(); // OffsetDateTime | The end date of the search range. + String fromUserId = "fromUserId_example"; // String | Must be a valid user ID. + String toUserId = "toUserId_example"; // String | Must be a valid user ID. + SortOptionProductPurchase sort = SortOptionProductPurchase.fromValue("purchaseDate"); // SortOptionProductPurchase | The sort order of the results. + OrderOptionShort order = OrderOptionShort.fromValue("asc"); // OrderOptionShort | Result ordering + try { + ProductPurchaseHistory result = apiInstance.getProductPurchaseHistory(userId, n, dateMin, dateMax, fromUserId, toUserId, sort, order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getProductPurchaseHistory"); + 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. | | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **dateMin** | **OffsetDateTime**| The start date of the search range. | [optional] | +| **dateMax** | **OffsetDateTime**| The end date of the search range. | [optional] | +| **fromUserId** | **String**| Must be a valid user ID. | [optional] | +| **toUserId** | **String**| Must be a valid user ID. | [optional] | +| **sort** | [**SortOptionProductPurchase**](.md)| The sort order of the results. | [optional] [default to purchaseDate] [enum: purchaseDate] | +| **order** | [**OrderOptionShort**](.md)| Result ordering | [optional] [default to desc] [enum: asc, desc] | + +### Return type + +[**ProductPurchaseHistory**](ProductPurchaseHistory.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 single ProductPurchaseHistory object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getProductPurchaseStacks** +> List<Object> getProductPurchaseStacks(productPurchaseId) + +Get Product Purchase Stacks + +Gets stacks for a product purchase + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String productPurchaseId = "productPurchaseId_example"; // String | Must be a valid purchase ID. + try { + List result = apiInstance.getProductPurchaseStacks(productPurchaseId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getProductPurchaseStacks"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **productPurchaseId** | **String**| Must be a valid purchase ID. | | + +### Return type + +**List<Object>** + +### 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 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) + +Get Product Purchases + +Gets product purchases + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String buyerId = "buyerId_example"; // String | Must be a valid user ID. + String sellerId = "sellerId_example"; // String | Filter results by seller. + 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. + Boolean mostRecent = true; // Boolean | + SortOptionProductPurchase sort = SortOptionProductPurchase.fromValue("purchaseDate"); // SortOptionProductPurchase | The sort order of the results. + OrderOptionShort order = OrderOptionShort.fromValue("asc"); // OrderOptionShort | Result ordering + try { + List result = apiInstance.getProductPurchases(buyerId, sellerId, n, offset, mostRecent, sort, order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getProductPurchases"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **buyerId** | **String**| Must be a valid user ID. | | +| **sellerId** | **String**| Filter results by seller. | [optional] | +| **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] | +| **mostRecent** | **Boolean**| | [optional] | +| **sort** | [**SortOptionProductPurchase**](.md)| The sort order of the results. | [optional] [default to purchaseDate] [enum: purchaseDate] | +| **order** | [**OrderOptionShort**](.md)| Result ordering | [optional] [default to desc] [enum: asc, desc] | + +### Return type + +[**List<ProductPurchase>**](ProductPurchase.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 list of ProductPurchase objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getRecentSubscription** +> UserSubscription getRecentSubscription() + +Get Recent Subscription + +Get the most recent user subscription. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + UserSubscription result = apiInstance.getRecentSubscription(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getRecentSubscription"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserSubscription**](UserSubscription.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 UserSubscription object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getSellerEligibility** +> SellerEligibility getSellerEligibility() + +Get Seller Eligibility + +Get the eligibility of the currently authenticated user to become a seller + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + SellerEligibility result = apiInstance.getSellerEligibility(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getSellerEligibility"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SellerEligibility**](SellerEligibility.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 single SellerEligibility object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getSteamTransaction** +> Transaction getSteamTransaction(transactionId) + +Get Steam Transaction + +Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String transactionId = "transactionId_example"; // String | Must be a valid transaction ID. + try { + Transaction result = apiInstance.getSteamTransaction(transactionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getSteamTransaction"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **transactionId** | **String**| Must be a valid transaction ID. | | + +### Return type + +[**Transaction**](Transaction.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 single Transaction object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getSteamTransactions** +> List<Transaction> getSteamTransactions() + +List Steam Transactions + +Get all own Steam transactions. + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + List result = apiInstance.getSteamTransactions(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getSteamTransactions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<Transaction>**](Transaction.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 list of Transaction objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getStore** +> Store getStore(storeId, hydrateListings, hydrateProducts) + +Get Store + +Gets a store + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String storeId = "storeId_example"; // String | + Boolean hydrateListings = true; // Boolean | Listings fields will be populated. + Boolean hydrateProducts = true; // Boolean | Products fields will be populated. + try { + Store result = apiInstance.getStore(storeId, hydrateListings, hydrateProducts); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getStore"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **storeId** | **String**| | | +| **hydrateListings** | **Boolean**| Listings fields will be populated. | [optional] | +| **hydrateProducts** | **Boolean**| Products fields will be populated. | [optional] | + +### Return type + +[**Store**](Store.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 single Store object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getStoreShelves** +> List<StoreShelf> getStoreShelves(storeId, hydrateListings, fetch) + +Get Store Shelves + +Gets the shelves for a store + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String storeId = "storeId_example"; // String | + Boolean hydrateListings = true; // Boolean | Listings fields will be populated. + StoreView fetch = StoreView.fromValue("all"); // StoreView | + try { + List result = apiInstance.getStoreShelves(storeId, hydrateListings, fetch); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getStoreShelves"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **storeId** | **String**| | | +| **hydrateListings** | **Boolean**| Listings fields will be populated. | [optional] | +| **fetch** | [**StoreView**](.md)| | [optional] [default to public] [enum: all, draft, preview, public, publicPreview] | + +### Return type + +[**List<StoreShelf>**](StoreShelf.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 list of StoreShelf objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getSubscriptions** +> List<Subscription> getSubscriptions() + +List Subscriptions + +List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + List result = apiInstance.getSubscriptions(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getSubscriptions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<Subscription>**](Subscription.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 list of Subscription objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getTiliaStatus** +> TiliaStatus getTiliaStatus() + +Get Tilia Status + +Gets the status of Tilia integration + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + TiliaStatus result = apiInstance.getTiliaStatus(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getTiliaStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**TiliaStatus**](TiliaStatus.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 single TiliaStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getTiliaTos** +> TiliaTOS getTiliaTos(userId) + +Get Tilia TOS Agreement Status + +Gets the status of the agreement of a user to the Tilia TOS + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + TiliaTOS result = apiInstance.getTiliaTos(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getTiliaTos"); + 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 + +[**TiliaTOS**](TiliaTOS.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 single TiliaTOS object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getTokenBundles** +> List<TokenBundle> getTokenBundles() + +List Token Bundles + +Gets the list of token bundles + +### 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.EconomyApi; + +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"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + try { + List result = apiInstance.getTokenBundles(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getTokenBundles"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<TokenBundle>**](TokenBundle.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 list of TokenBundle objects. | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getCurrentSubscriptions** -> List<UserSubscription> getCurrentSubscriptions() + +# **getUserCreditsEligible** +> UserCreditsEligible getUserCreditsEligible(userId, subscriptionId) -Get Current Subscriptions +Get User Credits Eligibility -Get a list of all current user subscriptions. +Get the user's eligibility status for subscriptions based on available credits. ### Example ```java @@ -34,12 +2334,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -47,11 +2341,13 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + String subscriptionId = "subscriptionId_example"; // String | try { - List result = apiInstance.getCurrentSubscriptions(); + UserCreditsEligible result = apiInstance.getUserCreditsEligible(userId, subscriptionId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling EconomyApi#getCurrentSubscriptions"); + System.err.println("Exception when calling EconomyApi#getUserCreditsEligible"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -62,15 +2358,19 @@ public class Example { ``` ### Parameters -This endpoint does not need any parameter. + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **subscriptionId** | **String**| | | ### Return type -[**List<UserSubscription>**](UserSubscription.md) +[**UserCreditsEligible**](UserCreditsEligible.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -80,16 +2380,16 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of UserSubscription objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single UserCreditsEligible object. | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getLicenseGroup** -> LicenseGroup getLicenseGroup(licenseGroupId) + +# **getUserSubscriptionEligible** +> UserSubscriptionEligible getUserSubscriptionEligible(userId, steamId) -Get License Group +Get User Subscription Eligibility -Get a single License Group by given ID. +Get the user's eligibility status for subscriptions. ### Example ```java @@ -106,12 +2406,78 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + String steamId = "game night"; // String | The Steam ID of the user. + try { + UserSubscriptionEligible result = apiInstance.getUserSubscriptionEligible(userId, steamId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#getUserSubscriptionEligible"); + 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. | | +| **steamId** | **String**| The Steam ID of the user. | [optional] | + +### Return type + +[**UserSubscriptionEligible**](UserSubscriptionEligible.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 single UserSubscriptionEligible object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserTiliaKyc** +> TiliaKyc getUserTiliaKyc(userId) + +Get User Tilia KYC + +Gets KYC status details for a user's Tilia account. + +### 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.EconomyApi; +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"); @@ -119,12 +2485,12 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); EconomyApi apiInstance = new EconomyApi(defaultClient); - String licenseGroupId = "licenseGroupId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. try { - LicenseGroup result = apiInstance.getLicenseGroup(licenseGroupId); + TiliaKyc result = apiInstance.getUserTiliaKyc(userId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling EconomyApi#getLicenseGroup"); + System.err.println("Exception when calling EconomyApi#getUserTiliaKyc"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -136,17 +2502,17 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **licenseGroupId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | ### Return type -[**LicenseGroup**](LicenseGroup.md) +[**TiliaKyc**](TiliaKyc.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -156,16 +2522,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single LicenseGroup object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a TiliaKyc object. | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getSteamTransaction** -> Transaction getSteamTransaction(transactionId) + +# **listStores** +> List<Store> listStores(sellerId, managementPov, n, offset) -Get Steam Transaction +List Stores -Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. +Lists stores, optionally filtered to a seller and adjusted for management views. ### Example ```java @@ -182,12 +2548,82 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String sellerId = "sellerId_example"; // String | Filter results by seller. + Boolean managementPov = true; // Boolean | Return stores from the seller management point of view. + 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. + try { + List result = apiInstance.listStores(sellerId, managementPov, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#listStores"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **sellerId** | **String**| Filter results by seller. | [optional] | +| **managementPov** | **Boolean**| Return stores from the seller management point of view. | [optional] | +| **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] | +### Return type + +[**List<Store>**](Store.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 list of Store objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **listUserProducts** +> List<Product> listUserProducts(userId, n, offset) + +List User Products + +Gets the products of a given 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.EconomyApi; + +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"); @@ -195,12 +2631,14 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); EconomyApi apiInstance = new EconomyApi(defaultClient); - String transactionId = "transactionId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. + 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. try { - Transaction result = apiInstance.getSteamTransaction(transactionId); + List result = apiInstance.listUserProducts(userId, n, offset); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling EconomyApi#getSteamTransaction"); + System.err.println("Exception when calling EconomyApi#listUserProducts"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -212,17 +2650,19 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transactionId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **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] | ### Return type -[**Transaction**](Transaction.md) +[**List<Product>**](Product.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -232,16 +2672,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Transaction object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of Product objects. | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getSteamTransactions** -> List<Transaction> getSteamTransactions() + +# **purchaseProductListing** +> ProductPurchase purchaseProductListing(purchaseProductListingRequest) -List Steam Transactions +Purchase Product Listing -Get all own Steam transactions. +Purchases a product listing ### Example ```java @@ -258,12 +2698,76 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + PurchaseProductListingRequest purchaseProductListingRequest = new PurchaseProductListingRequest(); // PurchaseProductListingRequest | + try { + ProductPurchase result = apiInstance.purchaseProductListing(purchaseProductListingRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#purchaseProductListing"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **purchaseProductListingRequest** | [**PurchaseProductListingRequest**](PurchaseProductListingRequest.md)| | [optional] | + +### Return type + +[**ProductPurchase**](ProductPurchase.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single ProductPurchase object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **updateProduct** +> Product updateProduct(productId, updateProductRequest) + +Update Product + +Updates a product and returns the updated Product object. + +### 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.EconomyApi; +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"); @@ -271,11 +2775,13 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); EconomyApi apiInstance = new EconomyApi(defaultClient); + String productId = "productId_example"; // String | Must be a valid product ID. + UpdateProductRequest updateProductRequest = new UpdateProductRequest(); // UpdateProductRequest | try { - List result = apiInstance.getSteamTransactions(); + Product result = apiInstance.updateProduct(productId, updateProductRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling EconomyApi#getSteamTransactions"); + System.err.println("Exception when calling EconomyApi#updateProduct"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -286,34 +2792,38 @@ public class Example { ``` ### Parameters -This endpoint does not need any parameter. + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **productId** | **String**| Must be a valid product ID. | | +| **updateProductRequest** | [**UpdateProductRequest**](UpdateProductRequest.md)| | | ### Return type -[**List<Transaction>**](Transaction.md) +[**Product**](Product.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of Transaction objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single Product object. | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getSubscriptions** -> List<Subscription> getSubscriptions() + +# **updateProductListingDirect** +> ProductListing updateProductListingDirect(productId, updateListingRequest, hydrate) -List Subscriptions +Update Product Listing -List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". +Updates the active state of a listing. Setting `active` to `true` publishes the listing, while `false` unpublishes it. ### Example ```java @@ -330,12 +2840,80 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + EconomyApi apiInstance = new EconomyApi(defaultClient); + String productId = "productId_example"; // String | Must be a valid product ID. + UpdateListingRequest updateListingRequest = new UpdateListingRequest(); // UpdateListingRequest | + Boolean hydrate = true; // Boolean | Populates some fields and changes types of others for certain objects. + try { + ProductListing result = apiInstance.updateProductListingDirect(productId, updateListingRequest, hydrate); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling EconomyApi#updateProductListingDirect"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **productId** | **String**| Must be a valid product ID. | | +| **updateListingRequest** | [**UpdateListingRequest**](UpdateListingRequest.md)| | | +| **hydrate** | **Boolean**| Populates some fields and changes types of others for certain objects. | [optional] | + +### Return type + +[**ProductListing**](ProductListing.md) + +### Authorization + +[authCookie](../README.md#authCookie) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single ProductListing object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **updateTiliaTos** +> Object updateTiliaTos(userId, updateTiliaTOSRequest) + +Update Tilia TOS Agreement Status + +Updates the status of the agreement of a user to the Tilia TOS + +### 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.EconomyApi; + +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"); @@ -343,11 +2921,13 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); EconomyApi apiInstance = new EconomyApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + UpdateTiliaTOSRequest updateTiliaTOSRequest = new UpdateTiliaTOSRequest(); // UpdateTiliaTOSRequest | try { - List result = apiInstance.getSubscriptions(); + Object result = apiInstance.updateTiliaTos(userId, updateTiliaTOSRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling EconomyApi#getSubscriptions"); + System.err.println("Exception when calling EconomyApi#updateTiliaTos"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -358,24 +2938,28 @@ public class Example { ``` ### Parameters -This endpoint does not need any parameter. + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **updateTiliaTOSRequest** | [**UpdateTiliaTOSRequest**](UpdateTiliaTOSRequest.md)| | [optional] | ### Return type -[**List<Subscription>**](Subscription.md) +**Object** ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of Subscription objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a UserSubscription object. | - | +| **401** | Error response due to missing auth cookie. | - | diff --git a/docs/EconomyBalances.md b/docs/EconomyBalances.md new file mode 100644 index 00000000..c1a68e3b --- /dev/null +++ b/docs/EconomyBalances.md @@ -0,0 +1,15 @@ + + +# EconomyBalances + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**balance** | **Integer** | | | +|**earnings** | **Integer** | | | +|**standard** | **Integer** | | | + + + diff --git a/docs/EconomyPayout.md b/docs/EconomyPayout.md new file mode 100644 index 00000000..5e2aff4d --- /dev/null +++ b/docs/EconomyPayout.md @@ -0,0 +1,28 @@ + + +# EconomyPayout + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**paymentAmountTokens** | **Integer** | | | +|**paymentAmountUsd** | **Integer** | | | +|**paymentCreated** | **OffsetDateTime** | | | +|**paymentOutId** | **Integer** | | | +|**paymentPlatform** | **String** | | | +|**paymentPlatformCode** | **Integer** | | | +|**paymentStatus** | **String** | | | +|**paymentStatusCode** | **Integer** | | | +|**paymentUpdated** | **OffsetDateTime** | | | +|**platformPaymentGuid** | **String** | | [optional] | +|**platformPaymentMethod** | **String** | | [optional] | +|**reversalDate** | **OffsetDateTime** | | [optional] | +|**reversalReason** | **String** | | [optional] | +|**reversalReasonCode** | **Integer** | | [optional] | +|**reversalTransactionId** | **Integer** | | [optional] | +|**transactionId** | **Integer** | | | + + + diff --git a/docs/EconomyPayoutEligibility.md b/docs/EconomyPayoutEligibility.md new file mode 100644 index 00000000..a0f07604 --- /dev/null +++ b/docs/EconomyPayoutEligibility.md @@ -0,0 +1,17 @@ + + +# EconomyPayoutEligibility + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**issue** | **String** | | | +|**okBalance** | **Boolean** | | | +|**okFrequency** | **Boolean** | | | +|**okNotOngoing** | **Boolean** | | | +|**okStanding** | **Boolean** | | | + + + diff --git a/docs/EconomyPayoutList.md b/docs/EconomyPayoutList.md new file mode 100644 index 00000000..292e3aa0 --- /dev/null +++ b/docs/EconomyPayoutList.md @@ -0,0 +1,13 @@ + + +# EconomyPayoutList + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**payouts** | [**List<EconomyPayout>**](EconomyPayout.md) | | | + + + diff --git a/docs/EconomyPayoutStatus.md b/docs/EconomyPayoutStatus.md new file mode 100644 index 00000000..30a99ef5 --- /dev/null +++ b/docs/EconomyPayoutStatus.md @@ -0,0 +1,20 @@ + + +# EconomyPayoutStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountId** | **Integer** | | | +|**activePayout** | [**EconomyPayout**](EconomyPayout.md) | | [optional] | +|**activePayoutCancellable** | **Boolean** | | | +|**activePayoutTiliaAmount** | **Integer** | | | +|**earningsBalance** | **Integer** | | | +|**eligibility** | [**EconomyPayoutEligibility**](EconomyPayoutEligibility.md) | | | +|**payoutEligible** | **Boolean** | | | +|**tiliaId** | **String** | | | + + + diff --git a/docs/EditPrintRequest.md b/docs/EditPrintRequest.md new file mode 100644 index 00000000..57fad025 --- /dev/null +++ b/docs/EditPrintRequest.md @@ -0,0 +1,14 @@ + + +# EditPrintRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**image** | **File** | The binary blob of the png file. | | +|**note** | **String** | The caption for the image. | [optional] | + + + diff --git a/docs/EquipInventoryItemRequest.md b/docs/EquipInventoryItemRequest.md new file mode 100644 index 00000000..ba598b9b --- /dev/null +++ b/docs/EquipInventoryItemRequest.md @@ -0,0 +1,13 @@ + + +# EquipInventoryItemRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**equipSlot** | **InventoryEquipSlot** | | | + + + diff --git a/docs/Error.md b/docs/Error.md index 64c12997..a42d1b6d 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | [**Response**](Response.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**error** | [**Response**](Response.md) | | [optional] | diff --git a/docs/Favorite.md b/docs/Favorite.md index 4df61a57..80f21199 100644 --- a/docs/Favorite.md +++ b/docs/Favorite.md @@ -3,14 +3,15 @@ # Favorite + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**favoriteId** | **String** | MUST be either AvatarID, UserID or WorldID. | -**id** | **String** | | -**tags** | **List<String>** | | -**type** | **FavoriteType** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**favoriteId** | **String** | MUST be either AvatarID, UserID or WorldID. | | +|**id** | **String** | | | +|**tags** | **List<String>** | | | +|**type** | **FavoriteType** | | | diff --git a/docs/FavoriteGroup.md b/docs/FavoriteGroup.md index e0b5df9f..4b0a7563 100644 --- a/docs/FavoriteGroup.md +++ b/docs/FavoriteGroup.md @@ -3,18 +3,19 @@ # FavoriteGroup + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**displayName** | **String** | | -**id** | **String** | | -**name** | **String** | | -**ownerDisplayName** | **String** | | -**ownerId** | **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. | -**tags** | **List<String>** | | -**type** | **FavoriteType** | | -**visibility** | **FavoriteGroupVisibility** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**displayName** | **String** | | | +|**id** | **String** | | | +|**name** | **String** | | | +|**ownerDisplayName** | **String** | | | +|**ownerId** | **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. | | +|**tags** | **List<String>** | | | +|**type** | **FavoriteType** | | | +|**visibility** | **FavoriteGroupVisibility** | | | diff --git a/docs/FavoriteGroupLimits.md b/docs/FavoriteGroupLimits.md new file mode 100644 index 00000000..88223137 --- /dev/null +++ b/docs/FavoriteGroupLimits.md @@ -0,0 +1,16 @@ + + +# FavoriteGroupLimits + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatar** | **Integer** | | | +|**friend** | **Integer** | | | +|**vrcPlusWorld** | **Integer** | | | +|**world** | **Integer** | | | + + + diff --git a/docs/FavoriteGroupVisibility.md b/docs/FavoriteGroupVisibility.md index 8c82e01b..df7b0929 100644 --- a/docs/FavoriteGroupVisibility.md +++ b/docs/FavoriteGroupVisibility.md @@ -5,10 +5,10 @@ ## Enum -* `PRIVATE` (value: `"private"`) - * `FRIENDS` (value: `"friends"`) +* `PRIVATE` (value: `"private"`) + * `PUBLIC` (value: `"public"`) diff --git a/docs/FavoriteLimits.md b/docs/FavoriteLimits.md new file mode 100644 index 00000000..768ec527 --- /dev/null +++ b/docs/FavoriteLimits.md @@ -0,0 +1,16 @@ + + +# FavoriteLimits + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**defaultMaxFavoriteGroups** | **Integer** | | | +|**defaultMaxFavoritesPerGroup** | **Integer** | | | +|**maxFavoriteGroups** | [**FavoriteGroupLimits**](FavoriteGroupLimits.md) | | | +|**maxFavoritesPerGroup** | [**FavoriteGroupLimits**](FavoriteGroupLimits.md) | | | + + + diff --git a/docs/FavoriteType.md b/docs/FavoriteType.md index f5146511..257ba987 100644 --- a/docs/FavoriteType.md +++ b/docs/FavoriteType.md @@ -5,11 +5,13 @@ ## Enum -* `WORLD` (value: `"world"`) +* `AVATAR` (value: `"avatar"`) * `FRIEND` (value: `"friend"`) -* `AVATAR` (value: `"avatar"`) +* `VRC_PLUS_WORLD` (value: `"vrcPlusWorld"`) + +* `WORLD` (value: `"world"`) diff --git a/docs/FavoritedWorld.md b/docs/FavoritedWorld.md new file mode 100644 index 00000000..d9694d63 --- /dev/null +++ b/docs/FavoritedWorld.md @@ -0,0 +1,43 @@ + + +# FavoritedWorld + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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] | +|**authorName** | **String** | | | +|**capacity** | **Integer** | | | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**defaultContentSettings** | [**InstanceContentSettings**](InstanceContentSettings.md) | | [optional] | +|**description** | **String** | | [optional] | +|**favoriteGroup** | **String** | | | +|**favoriteId** | **String** | | | +|**favorites** | **Integer** | | [optional] | +|**featured** | **Boolean** | | [optional] | +|**heat** | **Integer** | | [optional] | +|**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**imageUrl** | **String** | | | +|**labsPublicationDate** | **String** | | [optional] | +|**name** | **String** | | | +|**occupants** | **Integer** | | | +|**organization** | **String** | | [optional] | +|**popularity** | **Integer** | | [optional] | +|**previewYoutubeId** | **String** | | [optional] | +|**publicationDate** | **String** | | [optional] | +|**recommendedCapacity** | **Integer** | | [optional] | +|**releaseStatus** | **ReleaseStatus** | | | +|**tags** | **List<String>** | | [optional] | +|**thumbnailImageUrl** | **String** | | | +|**udonProducts** | **List<String>** | | [optional] | +|**unityPackages** | [**List<UnityPackage>**](UnityPackage.md) | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**urlList** | **List<String>** | | [optional] | +|**version** | **Integer** | | [optional] | +|**visits** | **Integer** | | [optional] | + + + diff --git a/docs/FavoritesApi.md b/docs/FavoritesApi.md index fba23f18..80822497 100644 --- a/docs/FavoritesApi.md +++ b/docs/FavoritesApi.md @@ -2,19 +2,19 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addFavorite**](FavoritesApi.md#addFavorite) | **POST** /favorites | Add Favorite -[**clearFavoriteGroup**](FavoritesApi.md#clearFavoriteGroup) | **DELETE** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Clear Favorite Group -[**getFavorite**](FavoritesApi.md#getFavorite) | **GET** /favorites/{favoriteId} | Show Favorite -[**getFavoriteGroup**](FavoritesApi.md#getFavoriteGroup) | **GET** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Show Favorite Group -[**getFavoriteGroups**](FavoritesApi.md#getFavoriteGroups) | **GET** /favorite/groups | List Favorite Groups -[**getFavorites**](FavoritesApi.md#getFavorites) | **GET** /favorites | List Favorites -[**removeFavorite**](FavoritesApi.md#removeFavorite) | **DELETE** /favorites/{favoriteId} | Remove Favorite -[**updateFavoriteGroup**](FavoritesApi.md#updateFavoriteGroup) | **PUT** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Update Favorite Group - - - +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addFavorite**](FavoritesApi.md#addFavorite) | **POST** /favorites | Add Favorite | +| [**clearFavoriteGroup**](FavoritesApi.md#clearFavoriteGroup) | **DELETE** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Clear Favorite Group | +| [**getFavoriteGroup**](FavoritesApi.md#getFavoriteGroup) | **GET** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Show Favorite Group | +| [**getFavoriteGroups**](FavoritesApi.md#getFavoriteGroups) | **GET** /favorite/groups | List Favorite Groups | +| [**getFavoriteLimits**](FavoritesApi.md#getFavoriteLimits) | **GET** /auth/user/favoritelimits | Get Favorite Limits | +| [**getFavorites**](FavoritesApi.md#getFavorites) | **GET** /favorites | List Favorites | +| [**removeFavorite**](FavoritesApi.md#removeFavorite) | **DELETE** /favorites/{favoriteId} | Remove Favorite | +| [**updateFavoriteGroup**](FavoritesApi.md#updateFavoriteGroup) | **PUT** /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId} | Update Favorite Group | + + + # **addFavorite** > Favorite addFavorite(addFavoriteRequest) @@ -37,12 +37,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -67,9 +61,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **addFavoriteRequest** | [**AddFavoriteRequest**](AddFavoriteRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addFavoriteRequest** | [**AddFavoriteRequest**](AddFavoriteRequest.md)| | [optional] | ### Return type @@ -77,7 +71,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -87,11 +81,11 @@ Name | Type | Description | Notes ### HTTP 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. | - | +| **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. | - | - + # **clearFavoriteGroup** > Success clearFavoriteGroup(favoriteGroupType, favoriteGroupName, userId) @@ -114,12 +108,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -127,9 +115,9 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String favoriteGroupType = "world"; // String | The type of group to fetch, must be a valid FavoriteType. - String favoriteGroupName = "favoriteGroupName_example"; // String | - String userId = "userId_example"; // String | + FavoriteType favoriteGroupType = FavoriteType.fromValue("avatar"); // FavoriteType | The type of group to fetch, must be a valid FavoriteType. + String favoriteGroupName = "group_0"; // String | The name of the group to fetch, must be a name of a FavoriteGroup. + String userId = "userId_example"; // String | Must be a valid user ID. try { Success result = apiInstance.clearFavoriteGroup(favoriteGroupType, favoriteGroupName, userId); System.out.println(result); @@ -146,11 +134,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **favoriteGroupType** | **String**| The type of group to fetch, must be a valid FavoriteType. | [enum: world, friend, avatar] - **favoriteGroupName** | **String**| | - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **favoriteGroupType** | [**FavoriteType**](.md)| The type of group to fetch, must be a valid FavoriteType. | [default to friend] [enum: avatar, friend, vrcPlusWorld, world] | +| **favoriteGroupName** | **String**| The name of the group to fetch, must be a name of a FavoriteGroup. | [default to group_0] | +| **userId** | **String**| Must be a valid user ID. | | ### Return type @@ -158,7 +146,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -168,15 +156,15 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success response after clearing a favorite group. | - | +| **200** | Success response after clearing a favorite group. | - | - -# **getFavorite** -> Favorite getFavorite(favoriteId) + +# **getFavoriteGroup** +> FavoriteGroup getFavoriteGroup(favoriteGroupType, favoriteGroupName, userId) -Show Favorite +Show Favorite Group -Return information about a specific Favorite. +Fetch information about a specific favorite group. ### Example ```java @@ -193,12 +181,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -206,12 +188,14 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String favoriteId = "favoriteId_example"; // String | + FavoriteType favoriteGroupType = FavoriteType.fromValue("avatar"); // FavoriteType | The type of group to fetch, must be a valid FavoriteType. + String favoriteGroupName = "group_0"; // String | The name of the group to fetch, must be a name of a FavoriteGroup. + String userId = "userId_example"; // String | Must be a valid user ID. try { - Favorite result = apiInstance.getFavorite(favoriteId); + FavoriteGroup result = apiInstance.getFavoriteGroup(favoriteGroupType, favoriteGroupName, userId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#getFavorite"); + System.err.println("Exception when calling FavoritesApi#getFavoriteGroup"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -223,17 +207,19 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **favoriteId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **favoriteGroupType** | [**FavoriteType**](.md)| The type of group to fetch, must be a valid FavoriteType. | [default to friend] [enum: avatar, friend, vrcPlusWorld, world] | +| **favoriteGroupName** | **String**| The name of the group to fetch, must be a name of a FavoriteGroup. | [default to group_0] | +| **userId** | **String**| Must be a valid user ID. | | ### Return type -[**Favorite**](Favorite.md) +[**FavoriteGroup**](FavoriteGroup.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -243,17 +229,15 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Favorite object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to show information about a non-existent favorite. | - | +| **200** | Returns a single FavoriteGroup object. | - | - -# **getFavoriteGroup** -> FavoriteGroup getFavoriteGroup(favoriteGroupType, favoriteGroupName, userId) + +# **getFavoriteGroups** +> List<FavoriteGroup> getFavoriteGroups(n, offset, userId, ownerId) -Show Favorite Group +List Favorite Groups -Fetch information about a specific favorite group. +Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`. ### Example ```java @@ -270,12 +254,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -283,14 +261,15 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String favoriteGroupType = "world"; // String | The type of group to fetch, must be a valid FavoriteType. - String favoriteGroupName = "favoriteGroupName_example"; // String | - String userId = "userId_example"; // String | + 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 whose favorite groups to return. Must be a UserID. try { - FavoriteGroup result = apiInstance.getFavoriteGroup(favoriteGroupType, favoriteGroupName, userId); + List result = apiInstance.getFavoriteGroups(n, offset, userId, ownerId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#getFavoriteGroup"); + System.err.println("Exception when calling FavoritesApi#getFavoriteGroups"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -302,19 +281,20 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **favoriteGroupType** | **String**| The type of group to fetch, must be a valid FavoriteType. | [enum: world, friend, avatar] - **favoriteGroupName** | **String**| | - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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 whose favorite groups to return. Must be a UserID. | [optional] | ### Return type -[**FavoriteGroup**](FavoriteGroup.md) +[**List<FavoriteGroup>**](FavoriteGroup.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -324,15 +304,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single FavoriteGroup object. | - | +| **200** | Returns a list of FavoriteGroup objects. | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getFavoriteGroups** -> List<FavoriteGroup> getFavoriteGroups(n, offset, ownerId) + +# **getFavoriteLimits** +> FavoriteLimits getFavoriteLimits() -List Favorite Groups +Get Favorite Limits -Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`. +Return information about a specific Favorite. ### Example ```java @@ -349,12 +330,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -362,14 +337,11 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FavoritesApi apiInstance = new FavoritesApi(defaultClient); - 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 ownerId = "ownerId_example"; // String | The owner of whoms favorite groups to return. Must be a UserID. try { - List result = apiInstance.getFavoriteGroups(n, offset, ownerId); + FavoriteLimits result = apiInstance.getFavoriteLimits(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FavoritesApi#getFavoriteGroups"); + System.err.println("Exception when calling FavoritesApi#getFavoriteLimits"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -380,20 +352,15 @@ public class Example { ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **ownerId** | **String**| The owner of whoms favorite groups to return. Must be a UserID. | [optional] +This endpoint does not need any parameter. ### Return type -[**List<FavoriteGroup>**](FavoriteGroup.md) +[**FavoriteLimits**](FavoriteLimits.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -403,10 +370,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of FavoriteGroup objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single FavoriteLimits object. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **getFavorites** > List<Favorite> getFavorites(n, offset, type, tag) @@ -429,12 +396,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -462,12 +423,12 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **type** | **String**| The type of favorites to return, FavoriteType. | [optional] - **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **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] | +| **type** | **String**| The type of favorites to return, FavoriteType. | [optional] | +| **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | ### Return type @@ -475,7 +436,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -485,10 +446,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of Favorite objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of Favorite objects. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **removeFavorite** > Success removeFavorite(favoriteId) @@ -511,12 +472,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -524,7 +479,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String favoriteId = "favoriteId_example"; // String | + String favoriteId = "favoriteId_example"; // String | Must be a valid favorite ID. try { Success result = apiInstance.removeFavorite(favoriteId); System.out.println(result); @@ -541,9 +496,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **favoriteId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **favoriteId** | **String**| Must be a valid favorite ID. | | ### Return type @@ -551,7 +506,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -561,11 +516,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success response after removing a favorite. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to show information about a non-existent favorite. | - | +| **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. | - | - + # **updateFavoriteGroup** > updateFavoriteGroup(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest) @@ -588,12 +543,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -601,9 +550,9 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FavoritesApi apiInstance = new FavoritesApi(defaultClient); - String favoriteGroupType = "world"; // String | The type of group to fetch, must be a valid FavoriteType. - String favoriteGroupName = "favoriteGroupName_example"; // String | - String userId = "userId_example"; // String | + FavoriteType favoriteGroupType = FavoriteType.fromValue("avatar"); // FavoriteType | The type of group to fetch, must be a valid FavoriteType. + String favoriteGroupName = "group_0"; // String | The name of the group to fetch, must be a name of a FavoriteGroup. + String userId = "userId_example"; // String | Must be a valid user ID. UpdateFavoriteGroupRequest updateFavoriteGroupRequest = new UpdateFavoriteGroupRequest(); // UpdateFavoriteGroupRequest | try { apiInstance.updateFavoriteGroup(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest); @@ -620,12 +569,12 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **favoriteGroupType** | **String**| The type of group to fetch, must be a valid FavoriteType. | [enum: world, friend, avatar] - **favoriteGroupName** | **String**| | - **userId** | **String**| | - **updateFavoriteGroupRequest** | [**UpdateFavoriteGroupRequest**](UpdateFavoriteGroupRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **favoriteGroupType** | [**FavoriteType**](.md)| The type of group to fetch, must be a valid FavoriteType. | [default to friend] [enum: avatar, friend, vrcPlusWorld, world] | +| **favoriteGroupName** | **String**| The name of the group to fetch, must be a name of a FavoriteGroup. | [default to group_0] | +| **userId** | **String**| Must be a valid user ID. | | +| **updateFavoriteGroupRequest** | [**UpdateFavoriteGroupRequest**](UpdateFavoriteGroupRequest.md)| | [optional] | ### Return type @@ -633,7 +582,7 @@ null (empty response body) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -643,5 +592,5 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | +| **200** | OK | - | diff --git a/docs/Feedback.md b/docs/Feedback.md new file mode 100644 index 00000000..53d0c844 --- /dev/null +++ b/docs/Feedback.md @@ -0,0 +1,25 @@ + + +# Feedback + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**commenterId** | **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. | | +|**commenterName** | **String** | | | +|**contentAuthorId** | **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. | | +|**contentAuthorName** | **String** | | | +|**contentId** | **String** | | | +|**contentName** | **String** | | [optional] | +|**contentType** | **String** | | | +|**contentVersion** | **Integer** | | | +|**description** | **String** | | [optional] | +|**id** | **String** | | | +|**reason** | **String** | | | +|**tags** | **List<String>** | | | +|**type** | **String** | | | + + + diff --git a/docs/FileAnalysis.md b/docs/FileAnalysis.md new file mode 100644 index 00000000..ad52672d --- /dev/null +++ b/docs/FileAnalysis.md @@ -0,0 +1,19 @@ + + +# FileAnalysis + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarStats** | [**FileAnalysisAvatarStats**](FileAnalysisAvatarStats.md) | | | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**encryptionKey** | **String** | | [optional] | +|**fileSize** | **Integer** | | | +|**performanceRating** | **String** | | [optional] | +|**success** | **Boolean** | | | +|**uncompressedSize** | **Integer** | | | + + + diff --git a/docs/FileAnalysisAvatarStats.md b/docs/FileAnalysisAvatarStats.md new file mode 100644 index 00000000..05496fe0 --- /dev/null +++ b/docs/FileAnalysisAvatarStats.md @@ -0,0 +1,56 @@ + + +# FileAnalysisAvatarStats + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**animatorCount** | **Integer** | | | +|**audioSourceCount** | **Integer** | | | +|**blendShapeCount** | **Integer** | | | +|**boneCount** | **Integer** | | | +|**bounds** | **List<BigDecimal>** | | | +|**cameraCount** | **Integer** | | [optional] | +|**clothCount** | **Integer** | | | +|**constraintCount** | **Integer** | | | +|**constraintDepth** | **Integer** | | | +|**contactCount** | **Integer** | | | +|**customExpressions** | **Boolean** | | | +|**customizeAnimationLayers** | **Boolean** | | | +|**enableEyeLook** | **Boolean** | | | +|**lightCount** | **Integer** | | | +|**lineRendererCount** | **Integer** | | | +|**lipSync** | **Integer** | | | +|**materialCount** | **Integer** | | | +|**materialSlotsUsed** | **Integer** | | | +|**meshCount** | **Integer** | | | +|**meshIndices** | **Integer** | | | +|**meshParticleMaxPolygons** | **Integer** | | | +|**meshPolygons** | **Integer** | | | +|**meshVertices** | **Integer** | | | +|**particleCollisionEnabled** | **Boolean** | | | +|**particleSystemCount** | **Integer** | | | +|**particleTrailsEnabled** | **Boolean** | | | +|**physBoneColliderCount** | **Integer** | | | +|**physBoneCollisionCheckCount** | **Integer** | | | +|**physBoneComponentCount** | **Integer** | | | +|**physBoneTransformCount** | **Integer** | | | +|**physicsColliders** | **Integer** | | | +|**physicsRigidbodies** | **Integer** | | | +|**skinnedMeshCount** | **Integer** | | | +|**skinnedMeshIndices** | **Integer** | | | +|**skinnedMeshPolygons** | **Integer** | | | +|**skinnedMeshVertices** | **Integer** | | | +|**totalClothVertices** | **Integer** | | | +|**totalIndices** | **Integer** | | | +|**totalMaxParticles** | **Integer** | | | +|**totalPolygons** | **Integer** | | | +|**totalTextureUsage** | **Integer** | | | +|**totalVertices** | **Integer** | | | +|**trailRendererCount** | **Integer** | | | +|**writeDefaultsUsed** | **Boolean** | | | + + + diff --git a/docs/FileData.md b/docs/FileData.md index a7c558c0..97c7cd58 100644 --- a/docs/FileData.md +++ b/docs/FileData.md @@ -3,27 +3,28 @@ # FileData + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | [**CategoryEnum**](#CategoryEnum) | | -**fileName** | **String** | | -**md5** | **String** | | -**sizeInBytes** | **Integer** | | -**status** | **FileStatus** | | -**uploadId** | **String** | | -**url** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**category** | [**CategoryEnum**](#CategoryEnum) | | | +|**fileName** | **String** | | | +|**md5** | **String** | | [optional] | +|**sizeInBytes** | **Integer** | | | +|**status** | **FileStatus** | | | +|**uploadId** | **String** | | | +|**url** | **String** | | | ## Enum: CategoryEnum -Name | Value ----- | ----- -MULTIPART | "multipart" -QUEUED | "queued" -SIMPLE | "simple" +| Name | Value | +|---- | -----| +| MULTIPART | "multipart" | +| QUEUED | "queued" | +| SIMPLE | "simple" | diff --git a/docs/FileStatus.md b/docs/FileStatus.md index c5cacc89..a971241d 100644 --- a/docs/FileStatus.md +++ b/docs/FileStatus.md @@ -5,13 +5,13 @@ ## Enum -* `WAITING` (value: `"waiting"`) - * `COMPLETE` (value: `"complete"`) * `NONE` (value: `"none"`) * `QUEUED` (value: `"queued"`) +* `WAITING` (value: `"waiting"`) + diff --git a/docs/FileUploadURL.md b/docs/FileUploadURL.md index 54f46bf0..5029eca7 100644 --- a/docs/FileUploadURL.md +++ b/docs/FileUploadURL.md @@ -3,11 +3,12 @@ # FileUploadURL + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | | | diff --git a/docs/FileVersion.md b/docs/FileVersion.md index 6c461b00..8dd510af 100644 --- a/docs/FileVersion.md +++ b/docs/FileVersion.md @@ -3,17 +3,18 @@ # FileVersion + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createdAt** | **OffsetDateTime** | | -**deleted** | **Boolean** | Usually only present if `true` | [optional] -**delta** | [**FileData**](FileData.md) | | [optional] -**file** | [**FileData**](FileData.md) | | [optional] -**signature** | [**FileData**](FileData.md) | | [optional] -**status** | **FileStatus** | | -**version** | **Integer** | Incremental version counter, can only be increased. | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**deleted** | **Boolean** | Usually only present if `true` | [optional] | +|**delta** | [**FileData**](FileData.md) | | [optional] | +|**_file** | [**FileData**](FileData.md) | | [optional] | +|**signature** | [**FileData**](FileData.md) | | [optional] | +|**status** | **FileStatus** | | | +|**version** | **Integer** | Incremental version counter, can only be increased. | | diff --git a/docs/FileVersionUploadStatus.md b/docs/FileVersionUploadStatus.md index 6e2da375..d762a520 100644 --- a/docs/FileVersionUploadStatus.md +++ b/docs/FileVersionUploadStatus.md @@ -3,16 +3,17 @@ # FileVersionUploadStatus + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uploadId** | **String** | | -**fileName** | **String** | | -**nextPartNumber** | **BigDecimal** | | -**maxParts** | **BigDecimal** | | -**parts** | **List<Object>** | | -**etags** | **List<Object>** | Unknown | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**etags** | **List<Object>** | Unknown | | +|**fileName** | **String** | | | +|**maxParts** | **Integer** | | | +|**nextPartNumber** | **Integer** | | | +|**parts** | **List<Object>** | | | +|**uploadId** | **String** | | | diff --git a/docs/FilesApi.md b/docs/FilesApi.md index dcbfa792..0bddf777 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -2,23 +2,34 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createFile**](FilesApi.md#createFile) | **POST** /file | Create File -[**createFileVersion**](FilesApi.md#createFileVersion) | **POST** /file/{fileId} | Create File Version -[**deleteFile**](FilesApi.md#deleteFile) | **DELETE** /file/{fileId} | Delete File -[**deleteFileVersion**](FilesApi.md#deleteFileVersion) | **DELETE** /file/{fileId}/{versionId} | Delete File Version -[**downloadFileVersion**](FilesApi.md#downloadFileVersion) | **GET** /file/{fileId}/{versionId} | Download File Version -[**finishFileDataUpload**](FilesApi.md#finishFileDataUpload) | **PUT** /file/{fileId}/{versionId}/{fileType}/finish | Finish FileData Upload -[**getFile**](FilesApi.md#getFile) | **GET** /file/{fileId} | Show File -[**getFileDataUploadStatus**](FilesApi.md#getFileDataUploadStatus) | **GET** /file/{fileId}/{versionId}/{fileType}/status | Check FileData Upload Status -[**getFiles**](FilesApi.md#getFiles) | **GET** /files | List Files -[**startFileDataUpload**](FilesApi.md#startFileDataUpload) | **PUT** /file/{fileId}/{versionId}/{fileType}/start | Start FileData Upload - - - +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createFile**](FilesApi.md#createFile) | **POST** /file | Create File | +| [**createFileVersion**](FilesApi.md#createFileVersion) | **POST** /file/{fileId} | Create File Version | +| [**deleteFile**](FilesApi.md#deleteFile) | **DELETE** /file/{fileId} | Delete File | +| [**deleteFileVersion**](FilesApi.md#deleteFileVersion) | **DELETE** /file/{fileId}/{versionId} | Delete File Version | +| [**downloadFileVersion**](FilesApi.md#downloadFileVersion) | **GET** /file/{fileId}/{versionId} | Download File Version | +| [**finishFileDataUpload**](FilesApi.md#finishFileDataUpload) | **PUT** /file/{fileId}/{versionId}/{fileType}/finish | Finish FileData Upload | +| [**getAdminAssetBundle**](FilesApi.md#getAdminAssetBundle) | **GET** /adminassetbundles/{adminAssetBundleId} | Get AdminAssetBundle | +| [**getContentAgreementStatus**](FilesApi.md#getContentAgreementStatus) | **GET** /agreement | Get Content Agreement Status | +| [**getFile**](FilesApi.md#getFile) | **GET** /file/{fileId} | Show File | +| [**getFileAnalysis**](FilesApi.md#getFileAnalysis) | **GET** /analysis/{fileId}/{versionId} | Get File Version Analysis | +| [**getFileAnalysisSecurity**](FilesApi.md#getFileAnalysisSecurity) | **GET** /analysis/{fileId}/{versionId}/security | Get File Version Analysis Security | +| [**getFileAnalysisStandard**](FilesApi.md#getFileAnalysisStandard) | **GET** /analysis/{fileId}/{versionId}/standard | Get File Version Analysis Standard | +| [**getFileDataUploadStatus**](FilesApi.md#getFileDataUploadStatus) | **GET** /file/{fileId}/{versionId}/{fileType}/status | Check FileData Upload Status | +| [**getFiles**](FilesApi.md#getFiles) | **GET** /files | List Files | +| [**setGroupGalleryFileOrder**](FilesApi.md#setGroupGalleryFileOrder) | **PUT** /files/order | Set Group Gallery File Order | +| [**startFileDataUpload**](FilesApi.md#startFileDataUpload) | **PUT** /file/{fileId}/{versionId}/{fileType}/start | Start FileData Upload | +| [**submitContentAgreement**](FilesApi.md#submitContentAgreement) | **POST** /agreement | Submit Content Agreement | +| [**updateAssetReviewNotes**](FilesApi.md#updateAssetReviewNotes) | **PUT** /assetReview/{assetReviewId}/notes | Update Asset Review Notes | +| [**uploadGalleryImage**](FilesApi.md#uploadGalleryImage) | **POST** /gallery | Upload gallery image | +| [**uploadIcon**](FilesApi.md#uploadIcon) | **POST** /icon | Upload icon | +| [**uploadImage**](FilesApi.md#uploadImage) | **POST** /file/image | Upload gallery image, icon, emoji or sticker | + + + # **createFile** -> java.io.File createFile(createFileRequest) +> ModelFile createFile(createFileRequest) Create File @@ -39,12 +50,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -54,7 +59,7 @@ public class Example { FilesApi apiInstance = new FilesApi(defaultClient); CreateFileRequest createFileRequest = new CreateFileRequest(); // CreateFileRequest | try { - java.io.File result = apiInstance.createFile(createFileRequest); + ModelFile result = apiInstance.createFile(createFileRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#createFile"); @@ -69,17 +74,17 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createFileRequest** | [**CreateFileRequest**](CreateFileRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createFileRequest** | [**CreateFileRequest**](CreateFileRequest.md)| | [optional] | ### Return type -[**java.io.File**](java.io.File.md) +[**ModelFile**](ModelFile.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -89,11 +94,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single File object. | - | +| **200** | Returns a single File object. | - | - + # **createFileVersion** -> java.io.File createFileVersion(fileId, createFileVersionRequest) +> ModelFile createFileVersion(fileId, createFileVersionRequest) Create File Version @@ -114,12 +119,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -127,10 +126,10 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | + String fileId = "fileId_example"; // String | Must be a valid file ID. CreateFileVersionRequest createFileVersionRequest = new CreateFileVersionRequest(); // CreateFileVersionRequest | try { - java.io.File result = apiInstance.createFileVersion(fileId, createFileVersionRequest); + ModelFile result = apiInstance.createFileVersion(fileId, createFileVersionRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#createFileVersion"); @@ -145,18 +144,18 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | - **createFileVersionRequest** | [**CreateFileVersionRequest**](CreateFileVersionRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **createFileVersionRequest** | [**CreateFileVersionRequest**](CreateFileVersionRequest.md)| | [optional] | ### Return type -[**java.io.File**](java.io.File.md) +[**ModelFile**](ModelFile.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -166,11 +165,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single File object. | - | +| **200** | Returns a single File object. | - | - + # **deleteFile** -> Success deleteFile(fileId) +> ModelFile deleteFile(fileId) Delete File @@ -191,12 +190,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -204,9 +197,9 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | + String fileId = "fileId_example"; // String | Must be a valid file ID. try { - Success result = apiInstance.deleteFile(fileId); + ModelFile result = apiInstance.deleteFile(fileId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#deleteFile"); @@ -221,17 +214,17 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | ### Return type -[**Success**](Success.md) +[**ModelFile**](ModelFile.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -241,12 +234,12 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response after deleting a File. | - | -**404** | Error response when trying to delete a non-existent file. | - | +| **200** | Returns a single File object. | - | +| **404** | Error response when trying to delete a non-existent file. | - | - + # **deleteFileVersion** -> java.io.File deleteFileVersion(fileId, versionId) +> ModelFile deleteFileVersion(fileId, versionId) Delete File Version @@ -267,12 +260,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -280,10 +267,10 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | - Integer versionId = 1; // Integer | + String fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. try { - java.io.File result = apiInstance.deleteFileVersion(fileId, versionId); + ModelFile result = apiInstance.deleteFileVersion(fileId, versionId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#deleteFileVersion"); @@ -298,18 +285,18 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | - **versionId** | **Integer**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | ### Return type -[**java.io.File**](java.io.File.md) +[**ModelFile**](ModelFile.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -319,17 +306,17 @@ Name | Type | Description | Notes ### HTTP 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 hte last one. | - | +| **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. | - | - + # **downloadFileVersion** -> downloadFileVersion(fileId, versionId) +> 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 @@ -346,12 +333,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -359,10 +340,11 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | - Integer versionId = 1; // Integer | + String fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. try { - apiInstance.downloadFileVersion(fileId, versionId); + File result = apiInstance.downloadFileVersion(fileId, versionId); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#downloadFileVersion"); System.err.println("Status code: " + e.getCode()); @@ -376,32 +358,33 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | - **versionId** | **Integer**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | ### Return type -null (empty response body) +[**File**](File.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: image/*, application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Raw file | - | +| **200** | Raw file | - | +| **404** | Error response when trying to show information about a non-existent file. | - | - + # **finishFileDataUpload** -> java.io.File finishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest) +> ModelFile finishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest) Finish FileData Upload @@ -422,12 +405,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -435,12 +412,12 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | - Integer versionId = 1; // Integer | - String fileType = "file"; // String | + String fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. + String fileType = "delta"; // String | Type of file. FinishFileDataUploadRequest finishFileDataUploadRequest = new FinishFileDataUploadRequest(); // FinishFileDataUploadRequest | Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. try { - java.io.File result = apiInstance.finishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest); + ModelFile result = apiInstance.finishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#finishFileDataUpload"); @@ -455,20 +432,20 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | - **versionId** | **Integer**| | - **fileType** | **String**| | [enum: file, signature, delta] - **finishFileDataUploadRequest** | [**FinishFileDataUploadRequest**](FinishFileDataUploadRequest.md)| Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | +| **fileType** | **String**| Type of file. | [enum: delta, file, signature] | +| **finishFileDataUploadRequest** | [**FinishFileDataUploadRequest**](FinishFileDataUploadRequest.md)| Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. | [optional] | ### Return type -[**java.io.File**](java.io.File.md) +[**ModelFile**](ModelFile.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -478,15 +455,15 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single File object. | - | +| **200** | Returns a single File object. | - | - -# **getFile** -> java.io.File getFile(fileId) + +# **getAdminAssetBundle** +> AdminAssetBundle getAdminAssetBundle(adminAssetBundleId) -Show File +Get AdminAssetBundle -Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. +Returns an AdminAssetBundle ### Example ```java @@ -503,12 +480,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -516,12 +487,12 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | + String adminAssetBundleId = "aab_e159e72c-ce54-4fbe-8c37-96af02f6d18d"; // String | Must be a valid admin asset bundle ID. try { - java.io.File result = apiInstance.getFile(fileId); + AdminAssetBundle result = apiInstance.getAdminAssetBundle(adminAssetBundleId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FilesApi#getFile"); + System.err.println("Exception when calling FilesApi#getAdminAssetBundle"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -533,17 +504,17 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **adminAssetBundleId** | **String**| Must be a valid admin asset bundle ID. | | ### Return type -[**java.io.File**](java.io.File.md) +[**AdminAssetBundle**](AdminAssetBundle.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -553,16 +524,15 @@ Name | Type | Description | Notes ### HTTP 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. | - | +| **200** | Returns a single AdminAssetBundle object. | - | - -# **getFileDataUploadStatus** -> FileVersionUploadStatus getFileDataUploadStatus(fileId, versionId, fileType) + +# **getContentAgreementStatus** +> AgreementStatus getContentAgreementStatus(agreementCode, contentId, version) -Check FileData Upload Status +Get Content Agreement Status -Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. +Returns the agreement status of the currently authenticated user for the given agreementCode, contentId, and version. ### Example ```java @@ -579,12 +549,80 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + FilesApi apiInstance = new FilesApi(defaultClient); + AgreementCode agreementCode = AgreementCode.fromValue("content.copyright.owned"); // AgreementCode | The type of agreement (currently content.copyright.owned) + String contentId = "avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11"; // String | The id of the content being uploaded, such as a WorldID, AvatarID, or PropID + Integer version = 1; // Integer | The version of the agreement (currently 1) + try { + AgreementStatus result = apiInstance.getContentAgreementStatus(agreementCode, contentId, version); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#getContentAgreementStatus"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **agreementCode** | [**AgreementCode**](.md)| The type of agreement (currently content.copyright.owned) | [default to content.copyright.owned] [enum: content.copyright.owned] | +| **contentId** | **String**| The id of the content being uploaded, such as a WorldID, AvatarID, or PropID | | +| **version** | **Integer**| The version of the agreement (currently 1) | | + +### Return type + +[**AgreementStatus**](AgreementStatus.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 single AgreementStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getFile** +> ModelFile getFile(fileId) + +Show File + +Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. + +### 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.FilesApi; +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"); @@ -592,14 +630,12 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | - Integer versionId = 1; // Integer | - String fileType = "file"; // String | + String fileId = "fileId_example"; // String | Must be a valid file ID. try { - FileVersionUploadStatus result = apiInstance.getFileDataUploadStatus(fileId, versionId, fileType); + ModelFile result = apiInstance.getFile(fileId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FilesApi#getFileDataUploadStatus"); + System.err.println("Exception when calling FilesApi#getFile"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -611,19 +647,17 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | - **versionId** | **Integer**| | - **fileType** | **String**| | [enum: file, signature, delta] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | ### Return type -[**FileVersionUploadStatus**](FileVersionUploadStatus.md) +[**ModelFile**](ModelFile.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -633,15 +667,16 @@ Name | Type | Description | Notes ### HTTP 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. | - | +| **200** | Returns a single File object. | - | +| **404** | Error response when trying to show information about a non-existent file. | - | - -# **getFiles** -> List<java.io.File> getFiles(tag, userId, n, offset) + +# **getFileAnalysis** +> FileAnalysis getFileAnalysis(fileId, versionId) -List Files +Get File Version Analysis -Returns a list of files +Get the performance analysis for the uploaded assets of an avatar ### Example ```java @@ -658,12 +693,79 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. + try { + FileAnalysis result = apiInstance.getFileAnalysis(fileId, versionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#getFileAnalysis"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | + +### Return type + +[**FileAnalysis**](FileAnalysis.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 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. | - | + + +# **getFileAnalysisSecurity** +> FileAnalysis getFileAnalysisSecurity(fileId, versionId) + +Get File Version Analysis Security + +Get the security performance analysis for the uploaded assets of an avatar + +### 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.FilesApi; +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"); @@ -671,15 +773,13 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String tag = "tag_example"; // String | Tag, for example \"icon\" or \"gallery\", not included by default. - String userId = "userId_example"; // String | UserID, will always generate a 500 permission error. - 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 fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. try { - List result = apiInstance.getFiles(tag, userId, n, offset); + FileAnalysis result = apiInstance.getFileAnalysisSecurity(fileId, versionId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FilesApi#getFiles"); + System.err.println("Exception when calling FilesApi#getFileAnalysisSecurity"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -691,20 +791,18 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tag** | **String**| Tag, for example \"icon\" or \"gallery\", not included by default. | [optional] - **userId** | **String**| UserID, will always generate a 500 permission error. | [optional] - **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] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | ### Return type -[**List<java.io.File>**](java.io.File.md) +[**FileAnalysis**](FileAnalysis.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -714,15 +812,17 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of File objects. | - | +| **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. | - | - -# **startFileDataUpload** -> FileUploadURL startFileDataUpload(fileId, versionId, fileType, partNumber) + +# **getFileAnalysisStandard** +> FileAnalysis getFileAnalysisStandard(fileId, versionId) -Start FileData Upload +Get File Version Analysis Standard -Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. +Get the standard performance analysis for the uploaded assets of an avatar ### Example ```java @@ -739,12 +839,79 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. + try { + FileAnalysis result = apiInstance.getFileAnalysisStandard(fileId, versionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#getFileAnalysisStandard"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | + +### Return type + +[**FileAnalysis**](FileAnalysis.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 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. | - | + + +# **getFileDataUploadStatus** +> FileVersionUploadStatus getFileDataUploadStatus(fileId, versionId, fileType) + +Check FileData Upload Status + +Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. + +### 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.FilesApi; +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"); @@ -752,15 +919,14 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FilesApi apiInstance = new FilesApi(defaultClient); - String fileId = "file_00000000-0000-0000-0000-000000000000"; // String | - Integer versionId = 1; // Integer | - String fileType = "file"; // String | - Integer partNumber = 1; // Integer | + String fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. + String fileType = "delta"; // String | Type of file. try { - FileUploadURL result = apiInstance.startFileDataUpload(fileId, versionId, fileType, partNumber); + FileVersionUploadStatus result = apiInstance.getFileDataUploadStatus(fileId, versionId, fileType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FilesApi#startFileDataUpload"); + System.err.println("Exception when calling FilesApi#getFileDataUploadStatus"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -772,20 +938,19 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileId** | **String**| | - **versionId** | **Integer**| | - **fileType** | **String**| | [enum: file, signature, delta] - **partNumber** | **Integer**| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | +| **fileType** | **String**| Type of file. | [enum: delta, file, signature] | ### Return type -[**FileUploadURL**](FileUploadURL.md) +[**FileVersionUploadStatus**](FileVersionUploadStatus.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -795,6 +960,586 @@ Name | Type | Description | Notes ### HTTP 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`. | - | +| **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) + +List Files + +Returns a list of files + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String tag = "tag_example"; // String | Tag, for example \"icon\" or \"gallery\", not included by default. + String userId = "userId_example"; // String | UserID, will always generate a 500 permission error. + 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. + try { + List result = apiInstance.getFiles(tag, userId, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#getFiles"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **tag** | **String**| Tag, for example \"icon\" or \"gallery\", not included by default. | [optional] | +| **userId** | **String**| UserID, will always generate a 500 permission error. | [optional] | +| **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] | + +### Return type + +[**List<ModelFile>**](ModelFile.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 list of File objects. | - | + + +# **setGroupGalleryFileOrder** +> GroupGalleryFileOrder setGroupGalleryFileOrder(groupGalleryFileOrderRequest) + +Set Group Gallery File Order + +Set the order of the files in a group gallery + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + GroupGalleryFileOrderRequest groupGalleryFileOrderRequest = new GroupGalleryFileOrderRequest(); // GroupGalleryFileOrderRequest | + try { + GroupGalleryFileOrder result = apiInstance.setGroupGalleryFileOrder(groupGalleryFileOrderRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#setGroupGalleryFileOrder"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupGalleryFileOrderRequest** | [**GroupGalleryFileOrderRequest**](GroupGalleryFileOrderRequest.md)| | [optional] | + +### Return type + +[**GroupGalleryFileOrder**](GroupGalleryFileOrder.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **startFileDataUpload** +> FileUploadURL startFileDataUpload(fileId, versionId, fileType, partNumber) + +Start FileData Upload + +Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String fileId = "fileId_example"; // String | Must be a valid file ID. + Integer versionId = 1; // Integer | Version ID of the asset. + String fileType = "delta"; // String | Type of file. + Integer partNumber = 1; // Integer | The part number to start uploading. If not provided, the first part will be started. + try { + FileUploadURL result = apiInstance.startFileDataUpload(fileId, versionId, fileType, partNumber); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#startFileDataUpload"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **fileId** | **String**| Must be a valid file ID. | | +| **versionId** | **Integer**| Version ID of the asset. | | +| **fileType** | **String**| Type of file. | [enum: delta, file, signature] | +| **partNumber** | **Integer**| The part number to start uploading. If not provided, the first part will be started. | [optional] | + +### Return type + +[**FileUploadURL**](FileUploadURL.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** | 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) + +Submit Content Agreement + +Returns the agreement of the currently authenticated user for the given agreementCode, contentId, and version. + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + AgreementRequest agreementRequest = new AgreementRequest(); // AgreementRequest | + try { + Agreement result = apiInstance.submitContentAgreement(agreementRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#submitContentAgreement"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **agreementRequest** | [**AgreementRequest**](AgreementRequest.md)| | [optional] | + +### Return type + +[**Agreement**](Agreement.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single Agreement object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **updateAssetReviewNotes** +> updateAssetReviewNotes(assetReviewId, updateAssetReviewNotesRequest) + +Update Asset Review Notes + +Update notes regarding an asset review. + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String assetReviewId = "assetReviewId_example"; // String | Must be an valid asset review ID. + UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest = new UpdateAssetReviewNotesRequest(); // UpdateAssetReviewNotesRequest | + try { + apiInstance.updateAssetReviewNotes(assetReviewId, updateAssetReviewNotesRequest); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#updateAssetReviewNotes"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **assetReviewId** | **String**| Must be an valid asset review ID. | | +| **updateAssetReviewNotesRequest** | [**UpdateAssetReviewNotesRequest**](UpdateAssetReviewNotesRequest.md)| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The asset review notes are submitted. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **uploadGalleryImage** +> ModelFile uploadGalleryImage(_file) + +Upload gallery image + +Upload a gallery image + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + File _file = new File("/path/to/file"); // File | The binary blob of the png file. + try { + ModelFile result = apiInstance.uploadGalleryImage(_file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#uploadGalleryImage"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **_file** | **File**| The binary blob of the png file. | | + +### Return type + +[**ModelFile**](ModelFile.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single File object. | - | + + +# **uploadIcon** +> ModelFile uploadIcon(_file) + +Upload icon + +Upload an icon + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + File _file = new File("/path/to/file"); // File | The binary blob of the png file. + try { + ModelFile result = apiInstance.uploadIcon(_file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#uploadIcon"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **_file** | **File**| The binary blob of the png file. | | + +### Return type + +[**ModelFile**](ModelFile.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single File object. | - | + + +# **uploadImage** +> ModelFile uploadImage(_file, tag, animationStyle, frames, framesOverTime, loopStyle, maskTag) + +Upload gallery image, icon, emoji or sticker + +Upload an image, which can be an icon, gallery image, sticker or emoji + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + File _file = new File("/path/to/file"); // File | The binary blob of the png file. + ImagePurpose tag = ImagePurpose.fromValue("admin"); // ImagePurpose | + ImageAnimationStyle animationStyle = ImageAnimationStyle.fromValue("aura"); // ImageAnimationStyle | + Integer frames = 56; // Integer | Required for animated images. Total number of frames of the spritesheet to be animated. + Integer framesOverTime = 56; // Integer | Required for animated images. Animation frames per second. + ImageLoopStyle loopStyle = ImageLoopStyle.fromValue("linear"); // ImageLoopStyle | + ImageMask maskTag = ImageMask.fromValue("circle"); // ImageMask | + try { + ModelFile result = apiInstance.uploadImage(_file, tag, animationStyle, frames, framesOverTime, loopStyle, maskTag); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#uploadImage"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **_file** | **File**| The binary blob of the png file. | | +| **tag** | [**ImagePurpose**](ImagePurpose.md)| | [default to gallery] [enum: admin, avatargallery, avatarimage, bundle, emoji, emojianimated, gallery, icon, listinggallery, product, sticker] | +| **animationStyle** | [**ImageAnimationStyle**](ImageAnimationStyle.md)| | [optional] [enum: aura, bats, bees, bounce, cloud, confetti, crying, dislike, fire, idea, lasers, like, magnet, mistletoe, money, noise, orbit, pizza, rain, rotate, shake, snow, snowball, spin, splash, stop, zzz] | +| **frames** | **Integer**| Required for animated images. Total number of frames of the spritesheet to be animated. | [optional] | +| **framesOverTime** | **Integer**| Required for animated images. Animation frames per second. | [optional] | +| **loopStyle** | [**ImageLoopStyle**](ImageLoopStyle.md)| | [optional] [default to linear] [enum: linear, pingpong] | +| **maskTag** | [**ImageMask**](ImageMask.md)| | [optional] [default to square] [enum: circle, flower, heart, pow, square, star] | + +### Return type + +[**ModelFile**](ModelFile.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single File object. | - | diff --git a/docs/FinishFileDataUploadRequest.md b/docs/FinishFileDataUploadRequest.md index 2d764b90..a388bb87 100644 --- a/docs/FinishFileDataUploadRequest.md +++ b/docs/FinishFileDataUploadRequest.md @@ -3,13 +3,14 @@ # FinishFileDataUploadRequest + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**etags** | **Set<String>** | Array of ETags uploaded. | [optional] -**nextPartNumber** | **String** | Always a zero in string form, despite how many parts uploaded. | -**maxParts** | **String** | Always a zero in string form, despite how many parts uploaded. | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**etags** | **Set<String>** | Array of ETags uploaded. | [optional] | +|**maxParts** | **String** | Always a zero in string form, despite how many parts uploaded. | | +|**nextPartNumber** | **String** | Always a zero in string form, despite how many parts uploaded. | | diff --git a/docs/FollowCalendarEventRequest.md b/docs/FollowCalendarEventRequest.md new file mode 100644 index 00000000..1bc49a6b --- /dev/null +++ b/docs/FollowCalendarEventRequest.md @@ -0,0 +1,13 @@ + + +# FollowCalendarEventRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isFollowing** | **Boolean** | | | + + + diff --git a/docs/FriendStatus.md b/docs/FriendStatus.md index 5547d6fa..a1a493eb 100644 --- a/docs/FriendStatus.md +++ b/docs/FriendStatus.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**incomingRequest** | **Boolean** | | -**isFriend** | **Boolean** | | -**outgoingRequest** | **Boolean** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**incomingRequest** | **Boolean** | | | +|**isFriend** | **Boolean** | | | +|**outgoingRequest** | **Boolean** | | | diff --git a/docs/FriendsApi.md b/docs/FriendsApi.md index d8072c35..deeda858 100644 --- a/docs/FriendsApi.md +++ b/docs/FriendsApi.md @@ -2,16 +2,91 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteFriendRequest**](FriendsApi.md#deleteFriendRequest) | **DELETE** /user/{userId}/friendRequest | Delete Friend Request -[**friend**](FriendsApi.md#friend) | **POST** /user/{userId}/friendRequest | Send Friend Request -[**getFriendStatus**](FriendsApi.md#getFriendStatus) | **GET** /user/{userId}/friendStatus | Check Friend Status -[**getFriends**](FriendsApi.md#getFriends) | **GET** /auth/user/friends | List Friends -[**unfriend**](FriendsApi.md#unfriend) | **DELETE** /auth/user/friends/{userId} | Unfriend +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**boop**](FriendsApi.md#boop) | **POST** /users/{userId}/boop | Send Boop | +| [**deleteFriendRequest**](FriendsApi.md#deleteFriendRequest) | **DELETE** /user/{userId}/friendRequest | Delete Friend Request | +| [**friend**](FriendsApi.md#friend) | **POST** /user/{userId}/friendRequest | Send Friend Request | +| [**getFriendStatus**](FriendsApi.md#getFriendStatus) | **GET** /user/{userId}/friendStatus | Check Friend Status | +| [**getFriends**](FriendsApi.md#getFriends) | **GET** /auth/user/friends | List Friends | +| [**unfriend**](FriendsApi.md#unfriend) | **DELETE** /auth/user/friends/{userId} | Unfriend | - + +# **boop** +> Success boop(userId, boopRequest) + +Send Boop + +Send a boop to another 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.FriendsApi; + +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"); + + FriendsApi apiInstance = new FriendsApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + BoopRequest boopRequest = new BoopRequest(); // BoopRequest | + try { + Success result = apiInstance.boop(userId, boopRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FriendsApi#boop"); + 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. | | +| **boopRequest** | [**BoopRequest**](BoopRequest.md)| | | + +### Return type + +[**Success**](Success.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | +| **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) @@ -34,12 +109,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -47,7 +116,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FriendsApi apiInstance = new FriendsApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. try { Success result = apiInstance.deleteFriendRequest(userId); System.out.println(result); @@ -64,9 +133,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | ### Return type @@ -74,7 +143,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -84,11 +153,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response after cancelling a friend request. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to delete a non-existent friend-request. | - | +| **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. | - | - + # **friend** > Notification friend(userId) @@ -111,12 +180,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -124,7 +187,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FriendsApi apiInstance = new FriendsApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. try { Notification result = apiInstance.friend(userId); System.out.println(result); @@ -141,9 +204,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | ### Return type @@ -151,7 +214,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -161,11 +224,12 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Notifcation object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to send a friend request to a user which doesn't exist. | - | +| **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) @@ -188,12 +252,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -201,7 +259,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FriendsApi apiInstance = new FriendsApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. try { FriendStatus result = apiInstance.getFriendStatus(userId); System.out.println(result); @@ -218,9 +276,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | ### Return type @@ -228,7 +286,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -238,12 +296,12 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a users Friend Status. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a users Friend Status. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **getFriends** -> List<LimitedUser> getFriends(offset, n, offline) +> List<LimitedUserFriend> getFriends(offset, n, offline) List Friends @@ -264,12 +322,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -281,7 +333,7 @@ public class Example { Integer n = 60; // Integer | The number of objects to return. Boolean offline = true; // Boolean | Returns *only* offline users if true, returns only online and active users if false try { - List result = apiInstance.getFriends(offset, n, offline); + List result = apiInstance.getFriends(offset, n, offline); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FriendsApi#getFriends"); @@ -296,19 +348,19 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] - **n** | **Integer**| The number of objects to return. | [optional] [default to 60] - **offline** | **Boolean**| Returns *only* offline users if true, returns only online and active users if false | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **offline** | **Boolean**| Returns *only* offline users if true, returns only online and active users if false | [optional] | ### Return type -[**List<LimitedUser>**](LimitedUser.md) +[**List<LimitedUserFriend>**](LimitedUserFriend.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -318,10 +370,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of LimitedUser objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of LimitedUserFriend objects. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **unfriend** > Success unfriend(userId) @@ -344,12 +396,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -357,7 +403,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); FriendsApi apiInstance = new FriendsApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. try { Success result = apiInstance.unfriend(userId); System.out.println(result); @@ -374,9 +420,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | ### Return type @@ -384,7 +430,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -394,7 +440,7 @@ Name | Type | Description | Notes ### HTTP 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 apiKey or auth cookie. | - | +| **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. | - | diff --git a/docs/GetGroupPosts200Response.md b/docs/GetGroupPosts200Response.md new file mode 100644 index 00000000..73a985b7 --- /dev/null +++ b/docs/GetGroupPosts200Response.md @@ -0,0 +1,13 @@ + + +# GetGroupPosts200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**posts** | [**List<GroupPost>**](GroupPost.md) | | [optional] | + + + diff --git a/docs/GetUserGroupInstances200Response.md b/docs/GetUserGroupInstances200Response.md new file mode 100644 index 00000000..9b46a9a1 --- /dev/null +++ b/docs/GetUserGroupInstances200Response.md @@ -0,0 +1,14 @@ + + +# GetUserGroupInstances200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fetchedAt** | **OffsetDateTime** | | [optional] | +|**instances** | [**List<Instance>**](Instance.md) | | [optional] | + + + diff --git a/docs/Group.md b/docs/Group.md new file mode 100644 index 00000000..fb8cee15 --- /dev/null +++ b/docs/Group.md @@ -0,0 +1,45 @@ + + +# Group + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ageVerificationBetaCode** | **String** | | [optional] | +|**ageVerificationBetaSlots** | **BigDecimal** | | [optional] | +|**ageVerificationSlotsAvailable** | **Boolean** | | [optional] | +|**allowGroupJoinPrompt** | **Boolean** | | [optional] | +|**badges** | **List<String>** | | [optional] | +|**bannerId** | **String** | | [optional] | +|**bannerUrl** | **String** | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**description** | **String** | | [optional] | +|**discriminator** | **String** | | [optional] | +|**galleries** | [**List<GroupGallery>**](GroupGallery.md) | | [optional] | +|**iconId** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**isVerified** | **Boolean** | | [optional] | +|**joinState** | **GroupJoinState** | | [optional] | +|**languages** | **List<String>** | | [optional] | +|**lastPostCreatedAt** | **OffsetDateTime** | | [optional] | +|**links** | **List<String>** | | [optional] | +|**memberCount** | **Integer** | | [optional] | +|**memberCountSyncedAt** | **OffsetDateTime** | | [optional] | +|**membershipStatus** | **GroupMemberStatus** | | [optional] | +|**myMember** | [**GroupMyMember**](GroupMyMember.md) | | [optional] | +|**name** | **String** | | [optional] | +|**onlineMemberCount** | **Integer** | | [optional] | +|**ownerId** | **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] | +|**privacy** | **GroupPrivacy** | | [optional] | +|**roles** | [**List<GroupRole>**](GroupRole.md) | Only returned if ?includeRoles=true is specified. | [optional] | +|**rules** | **String** | | [optional] | +|**shortCode** | **String** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**transferTargetId** | **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] | +|**updatedAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/GroupAccessType.md b/docs/GroupAccessType.md new file mode 100644 index 00000000..ef2bb9c5 --- /dev/null +++ b/docs/GroupAccessType.md @@ -0,0 +1,15 @@ + + +# GroupAccessType + +## Enum + + +* `MEMBERS` (value: `"members"`) + +* `PLUS` (value: `"plus"`) + +* `PUBLIC` (value: `"public"`) + + + diff --git a/docs/GroupAnnouncement.md b/docs/GroupAnnouncement.md new file mode 100644 index 00000000..aa327e79 --- /dev/null +++ b/docs/GroupAnnouncement.md @@ -0,0 +1,21 @@ + + +# GroupAnnouncement + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**groupId** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**imageId** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**text** | **String** | | [optional] | +|**title** | **String** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/GroupAuditLogEntry.md b/docs/GroupAuditLogEntry.md new file mode 100644 index 00000000..cf858a2d --- /dev/null +++ b/docs/GroupAuditLogEntry.md @@ -0,0 +1,21 @@ + + +# GroupAuditLogEntry + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**actorDisplayName** | **String** | | [optional] | +|**actorId** | **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] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**data** | **Object** | The data associated with the event. The format of this data is dependent on the event type. | [optional] | +|**description** | **String** | A human-readable description of the event. | [optional] | +|**eventType** | **String** | 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`. | [optional] | +|**groupId** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**targetId** | **String** | Typically a UserID, GroupID, GroupRoleID, or Location, but could be other types of IDs. | [optional] | + + + diff --git a/docs/GroupGallery.md b/docs/GroupGallery.md new file mode 100644 index 00000000..a531ee25 --- /dev/null +++ b/docs/GroupGallery.md @@ -0,0 +1,22 @@ + + +# GroupGallery + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | [optional] | +|**description** | **String** | Description of the gallery. | [optional] | +|**id** | **String** | | [optional] | +|**membersOnly** | **Boolean** | Whether the gallery is members only. | [optional] | +|**name** | **String** | Name of the gallery. | [optional] | +|**roleIdsToAutoApprove** | **List<String>** | | [optional] | +|**roleIdsToManage** | **List<String>** | | [optional] | +|**roleIdsToSubmit** | **List<String>** | | [optional] | +|**roleIdsToView** | **List<String>** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/GroupGalleryFileOrder.md b/docs/GroupGalleryFileOrder.md new file mode 100644 index 00000000..8a391c8c --- /dev/null +++ b/docs/GroupGalleryFileOrder.md @@ -0,0 +1,13 @@ + + +# GroupGalleryFileOrder + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ids** | **List<String>** | | | + + + diff --git a/docs/GroupGalleryFileOrderRequest.md b/docs/GroupGalleryFileOrderRequest.md new file mode 100644 index 00000000..683efbfa --- /dev/null +++ b/docs/GroupGalleryFileOrderRequest.md @@ -0,0 +1,14 @@ + + +# GroupGalleryFileOrderRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**galleryId** | **String** | | | +|**ids** | **List<String>** | | | + + + diff --git a/docs/GroupGalleryImage.md b/docs/GroupGalleryImage.md new file mode 100644 index 00000000..464c4a0b --- /dev/null +++ b/docs/GroupGalleryImage.md @@ -0,0 +1,22 @@ + + +# GroupGalleryImage + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**approved** | **Boolean** | | [optional] | +|**approvedAt** | **OffsetDateTime** | | [optional] | +|**approvedByUserId** | **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] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**fileId** | **String** | | [optional] | +|**galleryId** | **String** | | [optional] | +|**groupId** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**imageUrl** | **URI** | | [optional] | +|**submittedByUserId** | **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] | + + + diff --git a/docs/GroupInstance.md b/docs/GroupInstance.md new file mode 100644 index 00000000..993282f9 --- /dev/null +++ b/docs/GroupInstance.md @@ -0,0 +1,16 @@ + + +# GroupInstance + + +## 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. | | +|**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. | | +|**memberCount** | **Integer** | | | +|**world** | [**World**](World.md) | | | + + + diff --git a/docs/GroupJoinRequestAction.md b/docs/GroupJoinRequestAction.md new file mode 100644 index 00000000..46122f4b --- /dev/null +++ b/docs/GroupJoinRequestAction.md @@ -0,0 +1,13 @@ + + +# GroupJoinRequestAction + +## Enum + + +* `ACCEPT` (value: `"accept"`) + +* `REJECT` (value: `"reject"`) + + + diff --git a/docs/GroupJoinState.md b/docs/GroupJoinState.md new file mode 100644 index 00000000..cb91b95b --- /dev/null +++ b/docs/GroupJoinState.md @@ -0,0 +1,17 @@ + + +# GroupJoinState + +## Enum + + +* `CLOSED` (value: `"closed"`) + +* `INVITE` (value: `"invite"`) + +* `OPEN` (value: `"open"`) + +* `REQUEST` (value: `"request"`) + + + diff --git a/docs/GroupMember.md b/docs/GroupMember.md new file mode 100644 index 00000000..5b308bb9 --- /dev/null +++ b/docs/GroupMember.md @@ -0,0 +1,32 @@ + + +# GroupMember + +May be null when attempting to retrieve group membership for a user who is not part of the group + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acceptedByDisplayName** | **String** | Only missing when explicitly fetching own user. | [optional] | +|**acceptedById** | **String** | Only missing when explicitly fetching own user. | [optional] | +|**bannedAt** | **OffsetDateTime** | Only missing when explicitly fetching own user. | [optional] | +|**createdAt** | **OffsetDateTime** | Only missing when explicitly fetching own user. | [optional] | +|**groupId** | **String** | | | +|**hasJoinedFromPurchase** | **Boolean** | Missing when explicitly fetching own user, or when group isn't linked to a purchase. | [optional] | +|**id** | **String** | | | +|**isRepresenting** | **Boolean** | Whether the user is representing the group. This makes the group show up above the name tag in-game. | | +|**isSubscribedToAnnouncements** | **Boolean** | | | +|**isSubscribedToEventAnnouncements** | **Boolean** | Only missing when explicitly fetching own user. | [optional] | +|**joinedAt** | **OffsetDateTime** | | | +|**lastPostReadAt** | **OffsetDateTime** | | | +|**mRoleIds** | **List<String>** | | | +|**managerNotes** | **String** | Only missing when explicitly fetching own user. | [optional] | +|**membershipStatus** | **GroupMemberStatus** | | | +|**roleIds** | **List<String>** | | | +|**user** | [**GroupMemberLimitedUser**](GroupMemberLimitedUser.md) | | [optional] | +|**userId** | **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. | | +|**visibility** | **String** | | | + + + diff --git a/docs/GroupMemberLimitedUser.md b/docs/GroupMemberLimitedUser.md new file mode 100644 index 00000000..d22cb35f --- /dev/null +++ b/docs/GroupMemberLimitedUser.md @@ -0,0 +1,20 @@ + + +# GroupMemberLimitedUser + +Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**currentAvatarTags** | **List<String>** | | [optional] | +|**currentAvatarThumbnailImageUrl** | **String** | | [optional] | +|**displayName** | **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] | +|**profilePicOverride** | **String** | | [optional] | +|**thumbnailUrl** | **String** | | [optional] | + + + diff --git a/docs/GroupMemberStatus.md b/docs/GroupMemberStatus.md new file mode 100644 index 00000000..9aca1533 --- /dev/null +++ b/docs/GroupMemberStatus.md @@ -0,0 +1,21 @@ + + +# GroupMemberStatus + +## Enum + + +* `BANNED` (value: `"banned"`) + +* `INACTIVE` (value: `"inactive"`) + +* `INVITED` (value: `"invited"`) + +* `MEMBER` (value: `"member"`) + +* `REQUESTED` (value: `"requested"`) + +* `USERBLOCKED` (value: `"userblocked"`) + + + diff --git a/docs/GroupMyMember.md b/docs/GroupMyMember.md new file mode 100644 index 00000000..7c2196e2 --- /dev/null +++ b/docs/GroupMyMember.md @@ -0,0 +1,32 @@ + + +# GroupMyMember + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acceptedByDisplayName** | **String** | | [optional] | +|**acceptedById** | **String** | | [optional] | +|**bannedAt** | **String** | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**groupId** | **String** | | [optional] | +|**has2FA** | **Boolean** | | [optional] | +|**hasJoinedFromPurchase** | **Boolean** | | [optional] | +|**id** | **String** | | [optional] | +|**isRepresenting** | **Boolean** | | [optional] | +|**isSubscribedToAnnouncements** | **Boolean** | | [optional] | +|**isSubscribedToEventAnnouncements** | **Boolean** | | [optional] | +|**joinedAt** | **OffsetDateTime** | | [optional] | +|**lastPostReadAt** | **OffsetDateTime** | | [optional] | +|**mRoleIds** | **List<String>** | | [optional] | +|**managerNotes** | **String** | | [optional] | +|**membershipStatus** | **String** | | [optional] | +|**permissions** | **List<GroupPermissions>** | | [optional] | +|**roleIds** | **List<String>** | | [optional] | +|**userId** | **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] | +|**visibility** | **String** | | [optional] | + + + diff --git a/docs/GroupPermission.md b/docs/GroupPermission.md new file mode 100644 index 00000000..e12c912e --- /dev/null +++ b/docs/GroupPermission.md @@ -0,0 +1,18 @@ + + +# GroupPermission + +A permission that can be granted to a role in a group. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**allowedToAdd** | **Boolean** | Whether the user is allowed to add this permission to a role. | [optional] | +|**displayName** | **String** | The display name of the permission. | [optional] | +|**help** | **String** | Human-readable description of the permission. | [optional] | +|**isManagementPermission** | **Boolean** | Whether this permission is a \"management\" permission. | [optional] | +|**name** | **String** | The name of the permission. | [optional] | + + + diff --git a/docs/GroupPermissions.md b/docs/GroupPermissions.md new file mode 100644 index 00000000..a209f4b3 --- /dev/null +++ b/docs/GroupPermissions.md @@ -0,0 +1,65 @@ + + +# GroupPermissions + +## Enum + + +* `group_all` (value: `"*"`) + +* `group_announcement_manage` (value: `"group-announcement-manage"`) + +* `group_audit_view` (value: `"group-audit-view"`) + +* `group_bans_manage` (value: `"group-bans-manage"`) + +* `group_calendar_manage` (value: `"group-calendar-manage"`) + +* `group_data_manage` (value: `"group-data-manage"`) + +* `group_default_role_manage` (value: `"group-default-role-manage"`) + +* `group_galleries_manage` (value: `"group-galleries-manage"`) + +* `group_instance_age_gated_create` (value: `"group-instance-age-gated-create"`) + +* `group_instance_announcement_create` (value: `"group-instance-announcement-create"`) + +* `group_instance_bypass_avatar_performance` (value: `"group-instance-bypass-avatar-performance"`) + +* `group_instance_calendar_link` (value: `"group-instance-calendar-link"`) + +* `group_instance_join` (value: `"group-instance-join"`) + +* `group_instance_manage` (value: `"group-instance-manage"`) + +* `group_instance_moderate` (value: `"group-instance-moderate"`) + +* `group_instance_open_create` (value: `"group-instance-open-create"`) + +* `group_instance_plus_create` (value: `"group-instance-plus-create"`) + +* `group_instance_plus_portal` (value: `"group-instance-plus-portal"`) + +* `group_instance_plus_portal_unlocked` (value: `"group-instance-plus-portal-unlocked"`) + +* `group_instance_public_create` (value: `"group-instance-public-create"`) + +* `group_instance_queue_priority` (value: `"group-instance-queue-priority"`) + +* `group_instance_restricted_create` (value: `"group-instance-restricted-create"`) + +* `group_invites_manage` (value: `"group-invites-manage"`) + +* `group_members_manage` (value: `"group-members-manage"`) + +* `group_members_remove` (value: `"group-members-remove"`) + +* `group_members_viewall` (value: `"group-members-viewall"`) + +* `group_roles_assign` (value: `"group-roles-assign"`) + +* `group_roles_manage` (value: `"group-roles-manage"`) + + + diff --git a/docs/GroupPost.md b/docs/GroupPost.md new file mode 100644 index 00000000..05403ebe --- /dev/null +++ b/docs/GroupPost.md @@ -0,0 +1,24 @@ + + +# GroupPost + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**editorId** | **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] | +|**groupId** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**imageId** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**roleId** | **List<String>** | | [optional] | +|**text** | **String** | | [optional] | +|**title** | **String** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**visibility** | **GroupPostVisibility** | | [optional] | + + + diff --git a/docs/GroupPostVisibility.md b/docs/GroupPostVisibility.md new file mode 100644 index 00000000..19b66491 --- /dev/null +++ b/docs/GroupPostVisibility.md @@ -0,0 +1,13 @@ + + +# GroupPostVisibility + +## Enum + + +* `GROUP` (value: `"group"`) + +* `PUBLIC` (value: `"public"`) + + + diff --git a/docs/GroupPrivacy.md b/docs/GroupPrivacy.md new file mode 100644 index 00000000..e897f855 --- /dev/null +++ b/docs/GroupPrivacy.md @@ -0,0 +1,13 @@ + + +# GroupPrivacy + +## Enum + + +* `DEFAULT` (value: `"default"`) + +* `PRIVATE` (value: `"private"`) + + + diff --git a/docs/GroupRole.md b/docs/GroupRole.md new file mode 100644 index 00000000..2380af92 --- /dev/null +++ b/docs/GroupRole.md @@ -0,0 +1,24 @@ + + +# GroupRole + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | [optional] | +|**description** | **String** | | [optional] | +|**groupId** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**isManagementRole** | **Boolean** | | [optional] | +|**isSelfAssignable** | **Boolean** | | [optional] | +|**name** | **String** | | [optional] | +|**order** | **Integer** | | [optional] | +|**permissions** | **List<GroupPermissions>** | | [optional] | +|**requiresPurchase** | **Boolean** | | [optional] | +|**requiresTwoFactor** | **Boolean** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/GroupRoleTemplate.md b/docs/GroupRoleTemplate.md new file mode 100644 index 00000000..585b9939 --- /dev/null +++ b/docs/GroupRoleTemplate.md @@ -0,0 +1,17 @@ + + +# GroupRoleTemplate + +## Enum + + +* `DEFAULT` (value: `"default"`) + +* `MANAGED_FREE` (value: `"managedFree"`) + +* `MANAGED_INVITE` (value: `"managedInvite"`) + +* `MANAGED_REQUEST` (value: `"managedRequest"`) + + + diff --git a/docs/GroupRoleTemplateValues.md b/docs/GroupRoleTemplateValues.md new file mode 100644 index 00000000..2e4ee0fa --- /dev/null +++ b/docs/GroupRoleTemplateValues.md @@ -0,0 +1,16 @@ + + +# GroupRoleTemplateValues + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**basePermissions** | **List<GroupPermissions>** | | | +|**description** | **String** | | | +|**name** | **String** | | | +|**roles** | [**GroupRoleTemplateValuesRoles**](GroupRoleTemplateValuesRoles.md) | | | + + + diff --git a/docs/GroupRoleTemplateValuesRoles.md b/docs/GroupRoleTemplateValuesRoles.md new file mode 100644 index 00000000..7e472b55 --- /dev/null +++ b/docs/GroupRoleTemplateValuesRoles.md @@ -0,0 +1,16 @@ + + +# GroupRoleTemplateValuesRoles + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**basePermissions** | **List<GroupPermissions>** | | [optional] | +|**isAddedOnJoin** | **Boolean** | | [optional] | + + + diff --git a/docs/GroupSearchSort.md b/docs/GroupSearchSort.md new file mode 100644 index 00000000..634c512b --- /dev/null +++ b/docs/GroupSearchSort.md @@ -0,0 +1,13 @@ + + +# GroupSearchSort + +## Enum + + +* `JOINED_AT_ASC` (value: `"joinedAt:asc"`) + +* `JOINED_AT_DESC` (value: `"joinedAt:desc"`) + + + diff --git a/docs/GroupTransferable.md b/docs/GroupTransferable.md new file mode 100644 index 00000000..3b43ec69 --- /dev/null +++ b/docs/GroupTransferable.md @@ -0,0 +1,13 @@ + + +# GroupTransferable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requirements** | [**GroupTransferableRequirements**](GroupTransferableRequirements.md) | | | + + + diff --git a/docs/GroupTransferableRequirements.md b/docs/GroupTransferableRequirements.md new file mode 100644 index 00000000..7806097a --- /dev/null +++ b/docs/GroupTransferableRequirements.md @@ -0,0 +1,17 @@ + + +# GroupTransferableRequirements + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**groupNotMonetized** | **Boolean** | | | +|**hasVRCPlus** | **Boolean** | | | +|**hasVerifiedEmail** | **Boolean** | | | +|**targetCanOwnMoreGroups** | **Boolean** | | | +|**targetIsGroupMember** | **Boolean** | | | + + + diff --git a/docs/GroupUserVisibility.md b/docs/GroupUserVisibility.md new file mode 100644 index 00000000..225fc6ce --- /dev/null +++ b/docs/GroupUserVisibility.md @@ -0,0 +1,15 @@ + + +# GroupUserVisibility + +## Enum + + +* `FRIENDS` (value: `"friends"`) + +* `HIDDEN` (value: `"hidden"`) + +* `VISIBLE` (value: `"visible"`) + + + diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md new file mode 100644 index 00000000..d56e6570 --- /dev/null +++ b/docs/GroupsApi.md @@ -0,0 +1,3818 @@ +# GroupsApi + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addGroupGalleryImage**](GroupsApi.md#addGroupGalleryImage) | **POST** /groups/{groupId}/galleries/{groupGalleryId}/images | Add Group Gallery Image | +| [**addGroupMemberRole**](GroupsApi.md#addGroupMemberRole) | **PUT** /groups/{groupId}/members/{userId}/roles/{groupRoleId} | Add Role to GroupMember | +| [**addGroupPost**](GroupsApi.md#addGroupPost) | **POST** /groups/{groupId}/posts | Create a post in a Group | +| [**banGroupMember**](GroupsApi.md#banGroupMember) | **POST** /groups/{groupId}/bans | Ban Group Member | +| [**blockGroup**](GroupsApi.md#blockGroup) | **POST** /groups/{groupId}/block | Block Group | +| [**cancelGroupRequest**](GroupsApi.md#cancelGroupRequest) | **DELETE** /groups/{groupId}/requests | Cancel Group Join Request | +| [**cancelGroupTransfer**](GroupsApi.md#cancelGroupTransfer) | **DELETE** /groups/{groupId}/transfer | Cancel Group Transfer | +| [**createGroup**](GroupsApi.md#createGroup) | **POST** /groups | Create Group | +| [**createGroupAnnouncement**](GroupsApi.md#createGroupAnnouncement) | **POST** /groups/{groupId}/announcement | Create Group Announcement | +| [**createGroupGallery**](GroupsApi.md#createGroupGallery) | **POST** /groups/{groupId}/galleries | Create Group Gallery | +| [**createGroupInvite**](GroupsApi.md#createGroupInvite) | **POST** /groups/{groupId}/invites | Invite User to Group | +| [**createGroupRole**](GroupsApi.md#createGroupRole) | **POST** /groups/{groupId}/roles | Create GroupRole | +| [**declineGroupInvite**](GroupsApi.md#declineGroupInvite) | **PUT** /groups/{groupId}/invites | Decline Invite from Group | +| [**deleteGroup**](GroupsApi.md#deleteGroup) | **DELETE** /groups/{groupId} | Delete Group | +| [**deleteGroupAnnouncement**](GroupsApi.md#deleteGroupAnnouncement) | **DELETE** /groups/{groupId}/announcement | Delete Group Announcement | +| [**deleteGroupGallery**](GroupsApi.md#deleteGroupGallery) | **DELETE** /groups/{groupId}/galleries/{groupGalleryId} | Delete Group Gallery | +| [**deleteGroupGalleryImage**](GroupsApi.md#deleteGroupGalleryImage) | **DELETE** /groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId} | Delete Group Gallery Image | +| [**deleteGroupInvite**](GroupsApi.md#deleteGroupInvite) | **DELETE** /groups/{groupId}/invites/{userId} | Delete User Invite | +| [**deleteGroupPost**](GroupsApi.md#deleteGroupPost) | **DELETE** /groups/{groupId}/posts/{notificationId} | Delete a Group post | +| [**deleteGroupRole**](GroupsApi.md#deleteGroupRole) | **DELETE** /groups/{groupId}/roles/{groupRoleId} | Delete Group Role | +| [**getGroup**](GroupsApi.md#getGroup) | **GET** /groups/{groupId} | Get Group by ID | +| [**getGroupAnnouncements**](GroupsApi.md#getGroupAnnouncements) | **GET** /groups/{groupId}/announcement | Get Group Announcement | +| [**getGroupAuditLogEntryTypes**](GroupsApi.md#getGroupAuditLogEntryTypes) | **GET** /groups/{groupId}/auditLogTypes | Get Group Audit Log Entry Types | +| [**getGroupAuditLogs**](GroupsApi.md#getGroupAuditLogs) | **GET** /groups/{groupId}/auditLogs | Get Group Audit Logs | +| [**getGroupBans**](GroupsApi.md#getGroupBans) | **GET** /groups/{groupId}/bans | Get Group Bans | +| [**getGroupGalleryImages**](GroupsApi.md#getGroupGalleryImages) | **GET** /groups/{groupId}/galleries/{groupGalleryId} | Get Group Gallery Images | +| [**getGroupInstances**](GroupsApi.md#getGroupInstances) | **GET** /groups/{groupId}/instances | Get Group Instances | +| [**getGroupInvites**](GroupsApi.md#getGroupInvites) | **GET** /groups/{groupId}/invites | Get Group Invites Sent | +| [**getGroupMember**](GroupsApi.md#getGroupMember) | **GET** /groups/{groupId}/members/{userId} | Get Group Member | +| [**getGroupMembers**](GroupsApi.md#getGroupMembers) | **GET** /groups/{groupId}/members | List Group Members | +| [**getGroupPermissions**](GroupsApi.md#getGroupPermissions) | **GET** /groups/{groupId}/permissions | List Group Permissions | +| [**getGroupPosts**](GroupsApi.md#getGroupPosts) | **GET** /groups/{groupId}/posts | Get posts from a Group | +| [**getGroupRequests**](GroupsApi.md#getGroupRequests) | **GET** /groups/{groupId}/requests | Get Group Join Requests | +| [**getGroupRoleTemplates**](GroupsApi.md#getGroupRoleTemplates) | **GET** /groups/roleTemplates | Get Group Role Templates | +| [**getGroupRoles**](GroupsApi.md#getGroupRoles) | **GET** /groups/{groupId}/roles | Get Group Roles | +| [**getGroupTransferability**](GroupsApi.md#getGroupTransferability) | **GET** /groups/{groupId}/transfer | Get Group Transferability | +| [**initiateOrAcceptGroupTransfer**](GroupsApi.md#initiateOrAcceptGroupTransfer) | **POST** /groups/{groupId}/transfer | Initiate or Accept Group Transfer | +| [**joinGroup**](GroupsApi.md#joinGroup) | **POST** /groups/{groupId}/join | Join Group | +| [**kickGroupMember**](GroupsApi.md#kickGroupMember) | **DELETE** /groups/{groupId}/members/{userId} | Kick Group Member | +| [**leaveGroup**](GroupsApi.md#leaveGroup) | **POST** /groups/{groupId}/leave | Leave Group | +| [**removeGroupMemberRole**](GroupsApi.md#removeGroupMemberRole) | **DELETE** /groups/{groupId}/members/{userId}/roles/{groupRoleId} | Remove Role from GroupMember | +| [**respondGroupJoinRequest**](GroupsApi.md#respondGroupJoinRequest) | **PUT** /groups/{groupId}/requests/{userId} | Respond Group Join request | +| [**searchGroupMembers**](GroupsApi.md#searchGroupMembers) | **GET** /groups/{groupId}/members/search | Search Group Members | +| [**searchGroups**](GroupsApi.md#searchGroups) | **GET** /groups | Search Group | +| [**unbanGroupMember**](GroupsApi.md#unbanGroupMember) | **DELETE** /groups/{groupId}/bans/{userId} | Unban Group Member | +| [**updateGroup**](GroupsApi.md#updateGroup) | **PUT** /groups/{groupId} | Update Group | +| [**updateGroupGallery**](GroupsApi.md#updateGroupGallery) | **PUT** /groups/{groupId}/galleries/{groupGalleryId} | Update Group Gallery | +| [**updateGroupMember**](GroupsApi.md#updateGroupMember) | **PUT** /groups/{groupId}/members/{userId} | Update Group Member | +| [**updateGroupPost**](GroupsApi.md#updateGroupPost) | **PUT** /groups/{groupId}/posts/{notificationId} | Edits a Group post | +| [**updateGroupRepresentation**](GroupsApi.md#updateGroupRepresentation) | **PUT** /groups/{groupId}/representation | Update Group Representation | +| [**updateGroupRole**](GroupsApi.md#updateGroupRole) | **PUT** /groups/{groupId}/roles/{groupRoleId} | Update Group Role | + + + +# **addGroupGalleryImage** +> GroupGalleryImage addGroupGalleryImage(groupId, groupGalleryId, addGroupGalleryImageRequest) + +Add Group Gallery Image + +Adds an image to a Group gallery. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String groupGalleryId = "groupGalleryId_example"; // String | Must be a valid group gallery ID. + AddGroupGalleryImageRequest addGroupGalleryImageRequest = new AddGroupGalleryImageRequest(); // AddGroupGalleryImageRequest | + try { + GroupGalleryImage result = apiInstance.addGroupGalleryImage(groupId, groupGalleryId, addGroupGalleryImageRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#addGroupGalleryImage"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **groupGalleryId** | **String**| Must be a valid group gallery ID. | | +| **addGroupGalleryImageRequest** | [**AddGroupGalleryImageRequest**](AddGroupGalleryImageRequest.md)| | | + +### Return type + +[**GroupGalleryImage**](GroupGalleryImage.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **addGroupMemberRole** +> List<String> addGroupMemberRole(groupId, userId, groupRoleId) + +Add Role to GroupMember + +Adds a Role to a Group Member + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + String groupRoleId = "groupRoleId_example"; // String | Must be a valid group role ID. + try { + List result = apiInstance.addGroupMemberRole(groupId, userId, groupRoleId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#addGroupMemberRole"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | +| **groupRoleId** | **String**| Must be a valid group role ID. | | + +### Return type + +**List<String>** + +### 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 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. | - | + + +# **addGroupPost** +> GroupPost addGroupPost(groupId, createGroupPostRequest) + +Create a post in a Group + +Create a post in a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + CreateGroupPostRequest createGroupPostRequest = new CreateGroupPostRequest(); // CreateGroupPostRequest | + try { + GroupPost result = apiInstance.addGroupPost(groupId, createGroupPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#addGroupPost"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **createGroupPostRequest** | [**CreateGroupPostRequest**](CreateGroupPostRequest.md)| | | + +### Return type + +[**GroupPost**](GroupPost.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a GroupPost object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **banGroupMember** +> GroupMember banGroupMember(groupId, banGroupMemberRequest) + +Ban Group Member + +Bans a user from a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + BanGroupMemberRequest banGroupMemberRequest = new BanGroupMemberRequest(); // BanGroupMemberRequest | + try { + GroupMember result = apiInstance.banGroupMember(groupId, banGroupMemberRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#banGroupMember"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **banGroupMemberRequest** | [**BanGroupMemberRequest**](BanGroupMemberRequest.md)| | | + +### Return type + +[**GroupMember**](GroupMember.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a list of GroupMember objects. | - | +| **400** | Bad request error response when banning a user | - | +| **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) + +Block Group + +Blocks a Group for the current user. To unblock a group, call kickGroupMember (DELETE /groups/{groupId}/members/{userId}). + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + Success result = apiInstance.blockGroup(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#blockGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**Success**](Success.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** | Successful response after blocking a Group. | - | +| **400** | Bad request error response when banning a user | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +Cancel Group Join Request + +Cancels a request sent to join the group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + apiInstance.cancelGroupRequest(groupId); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#cancelGroupRequest"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | You can't cancel a join request if you didn't request to join․ | - | +| **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) + +Cancel Group Transfer + +Cancel a Group Transfer. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + Success result = apiInstance.cancelGroupTransfer(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#cancelGroupTransfer"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**Success**](Success.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** | Successful response after cancelling a group transfer. | - | +| **400** | Error response when trying to cancel a transfer for a group without a pending transfer. | - | +| **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) + +Create Group + +Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + CreateGroupRequest createGroupRequest = new CreateGroupRequest(); // CreateGroupRequest | + try { + Group result = apiInstance.createGroup(createGroupRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#createGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createGroupRequest** | [**CreateGroupRequest**](CreateGroupRequest.md)| | | + +### Return type + +[**Group**](Group.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single Group object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **createGroupAnnouncement** +> GroupAnnouncement createGroupAnnouncement(groupId, createGroupAnnouncementRequest) + +Create Group Announcement + +Creates an Announcement for a Group. Warning: This will also remove all announcements. To make proper announcements, use the posts endpoint instead + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + CreateGroupAnnouncementRequest createGroupAnnouncementRequest = new CreateGroupAnnouncementRequest(); // CreateGroupAnnouncementRequest | + try { + GroupAnnouncement result = apiInstance.createGroupAnnouncement(groupId, createGroupAnnouncementRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#createGroupAnnouncement"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **createGroupAnnouncementRequest** | [**CreateGroupAnnouncementRequest**](CreateGroupAnnouncementRequest.md)| | | + +### Return type + +[**GroupAnnouncement**](GroupAnnouncement.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **createGroupGallery** +> GroupGallery createGroupGallery(groupId, createGroupGalleryRequest) + +Create Group Gallery + +Creates a gallery for a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + CreateGroupGalleryRequest createGroupGalleryRequest = new CreateGroupGalleryRequest(); // CreateGroupGalleryRequest | + try { + GroupGallery result = apiInstance.createGroupGallery(groupId, createGroupGalleryRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#createGroupGallery"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **createGroupGalleryRequest** | [**CreateGroupGalleryRequest**](CreateGroupGalleryRequest.md)| | | + +### Return type + +[**GroupGallery**](GroupGallery.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **createGroupInvite** +> createGroupInvite(groupId, createGroupInviteRequest) + +Invite User to Group + +Sends an invite to a user to join the group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + CreateGroupInviteRequest createGroupInviteRequest = new CreateGroupInviteRequest(); // CreateGroupInviteRequest | + try { + apiInstance.createGroupInvite(groupId, createGroupInviteRequest); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#createGroupInvite"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **createGroupInviteRequest** | [**CreateGroupInviteRequest**](CreateGroupInviteRequest.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad request error response when creating a group invite. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +Create GroupRole + +Create a Group role. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + CreateGroupRoleRequest createGroupRoleRequest = new CreateGroupRoleRequest(); // CreateGroupRoleRequest | + try { + GroupRole result = apiInstance.createGroupRole(groupId, createGroupRoleRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#createGroupRole"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **createGroupRoleRequest** | [**CreateGroupRoleRequest**](CreateGroupRoleRequest.md)| | | + +### Return type + +[**GroupRole**](GroupRole.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **declineGroupInvite** +> Success declineGroupInvite(groupId, declineGroupInviteRequest) + +Decline Invite from Group + +Declines an invite to the user from a group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + DeclineGroupInviteRequest declineGroupInviteRequest = new DeclineGroupInviteRequest(); // DeclineGroupInviteRequest | + try { + Success result = apiInstance.declineGroupInvite(groupId, declineGroupInviteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#declineGroupInvite"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **declineGroupInviteRequest** | [**DeclineGroupInviteRequest**](DeclineGroupInviteRequest.md)| | [optional] | + +### Return type + +[**Success**](Success.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | +| **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) + +Delete Group + +Deletes a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + Boolean hardDelete = true; // Boolean | + try { + Success result = apiInstance.deleteGroup(groupId, hardDelete); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **hardDelete** | **Boolean**| | [optional] | + +### Return type + +[**Success**](Success.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** | 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. | - | + + +# **deleteGroupAnnouncement** +> Success deleteGroupAnnouncement(groupId) + +Delete Group Announcement + +Deletes the announcement for a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + Success result = apiInstance.deleteGroupAnnouncement(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroupAnnouncement"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**Success**](Success.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** | 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. | - | + + +# **deleteGroupGallery** +> Success deleteGroupGallery(groupId, groupGalleryId) + +Delete Group Gallery + +Deletes a gallery for a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String groupGalleryId = "groupGalleryId_example"; // String | Must be a valid group gallery ID. + try { + Success result = apiInstance.deleteGroupGallery(groupId, groupGalleryId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroupGallery"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **groupGalleryId** | **String**| Must be a valid group gallery ID. | | + +### Return type + +[**Success**](Success.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** | 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. | - | + + +# **deleteGroupGalleryImage** +> Success deleteGroupGalleryImage(groupId, groupGalleryId, groupGalleryImageId) + +Delete Group Gallery Image + +Deletes an image from a Group gallery. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String groupGalleryId = "groupGalleryId_example"; // String | Must be a valid group gallery ID. + String groupGalleryImageId = "groupGalleryImageId_example"; // String | Must be a valid group gallery image ID. + try { + Success result = apiInstance.deleteGroupGalleryImage(groupId, groupGalleryId, groupGalleryImageId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroupGalleryImage"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **groupGalleryId** | **String**| Must be a valid group gallery ID. | | +| **groupGalleryImageId** | **String**| Must be a valid group gallery image ID. | | + +### Return type + +[**Success**](Success.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** | Successful response after deleting a group gallery image. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +Delete User Invite + +Deletes an Group invite sent to a 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + try { + apiInstance.deleteGroupInvite(groupId, userId); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroupInvite"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **deleteGroupPost** +> Success deleteGroupPost(groupId, notificationId) + +Delete a Group post + +Delete a Group post + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + try { + Success result = apiInstance.deleteGroupPost(groupId, notificationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroupPost"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **notificationId** | **String**| Must be a valid notification ID. | | + +### Return type + +[**Success**](Success.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** | Response after deleting a group post. | - | +| **401** | Error response due to missing auth cookie. | - | +| **404** | Response after deleting a group post. | - | + + +# **deleteGroupRole** +> List<GroupRole> deleteGroupRole(groupId, groupRoleId) + +Delete Group Role + +Deletes a Group Role by ID and returns the remaining roles. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String groupRoleId = "groupRoleId_example"; // String | Must be a valid group role ID. + try { + List result = apiInstance.deleteGroupRole(groupId, groupRoleId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#deleteGroupRole"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **groupRoleId** | **String**| Must be a valid group role ID. | | + +### Return type + +[**List<GroupRole>**](GroupRole.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 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. | - | + + +# **getGroup** +> Group getGroup(groupId, includeRoles) + +Get Group by ID + +Returns a single Group by ID. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + Boolean includeRoles = true; // Boolean | Include roles for the Group object. Defaults to false. + try { + Group result = apiInstance.getGroup(groupId, includeRoles); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **includeRoles** | **Boolean**| Include roles for the Group object. Defaults to false. | [optional] | + +### Return type + +[**Group**](Group.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 single Group object. | - | +| **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) + +Get Group Announcement + +Returns the announcement for a Group. If no announcement has been made, then it returns **empty object**. If an announcement exists, then it will always return all fields except `imageId` and `imageUrl` which may be null. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + GroupAnnouncement result = apiInstance.getGroupAnnouncements(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupAnnouncements"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**GroupAnnouncement**](GroupAnnouncement.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 single GroupAnnouncement object. | - | +| **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) + +Get Group Audit Log Entry Types + +Returns a list of audit log entry types for which the group has entries. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + List result = apiInstance.getGroupAuditLogEntryTypes(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupAuditLogEntryTypes"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +**List<String>** + +### 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 list of GroupAuditLogEntryTypes. | - | +| **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) + +Get Group Audit Logs + +Returns a list of audit logs for a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + 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. + OffsetDateTime startDate = OffsetDateTime.now(); // OffsetDateTime | The start date of the search range. + OffsetDateTime endDate = OffsetDateTime.now(); // OffsetDateTime | The end date of the search range. + String actorIds = "usr_00000000-0000-0000-0000-000000000000,usr_11111111-1111-1111-1111-111111111111"; // String | The comma-separated actor ids to search for. + String eventTypes = "group.member.remove,group.instance.kick"; // String | The comma-separated event types to search for. + String targetIds = "usr_00000000-0000-0000-0000-000000000000,usr_11111111-1111-1111-1111-111111111111"; // String | The comma-separated target ids to search for. + try { + PaginatedGroupAuditLogEntryList result = apiInstance.getGroupAuditLogs(groupId, n, offset, startDate, endDate, actorIds, eventTypes, targetIds); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupAuditLogs"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **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] | +| **startDate** | **OffsetDateTime**| The start date of the search range. | [optional] | +| **endDate** | **OffsetDateTime**| The end date of the search range. | [optional] | +| **actorIds** | **String**| The comma-separated actor ids to search for. | [optional] | +| **eventTypes** | **String**| The comma-separated event types to search for. | [optional] | +| **targetIds** | **String**| The comma-separated target ids to search for. | [optional] | + +### Return type + +[**PaginatedGroupAuditLogEntryList**](PaginatedGroupAuditLogEntryList.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 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. | - | + + +# **getGroupBans** +> List<GroupMember> getGroupBans(groupId, n, offset) + +Get Group Bans + +Returns a list of banned users for a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + 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. + try { + List result = apiInstance.getGroupBans(groupId, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupBans"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **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] | + +### Return type + +[**List<GroupMember>**](GroupMember.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 list of GroupMember objects. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +Get Group Gallery Images + +Returns a list of images for a Group gallery. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String groupGalleryId = "groupGalleryId_example"; // String | Must be a valid group gallery ID. + 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. + Boolean approved = true; // Boolean | If specified, only returns images that have been approved or not approved. + try { + List result = apiInstance.getGroupGalleryImages(groupId, groupGalleryId, n, offset, approved); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupGalleryImages"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **groupGalleryId** | **String**| Must be a valid group gallery ID. | | +| **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] | +| **approved** | **Boolean**| If specified, only returns images that have been approved or not approved. | [optional] | + +### Return type + +[**List<GroupGalleryImage>**](GroupGalleryImage.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 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. | - | + + +# **getGroupInstances** +> List<GroupInstance> getGroupInstances(groupId) + +Get Group Instances + +Returns a list of group instances + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + List result = apiInstance.getGroupInstances(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupInstances"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**List<GroupInstance>**](GroupInstance.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 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. | - | + + +# **getGroupInvites** +> List<GroupMember> getGroupInvites(groupId, n, offset) + +Get Group Invites Sent + +Returns a list of members that have been invited to the Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + 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. + try { + List result = apiInstance.getGroupInvites(groupId, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupInvites"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **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] | + +### Return type + +[**List<GroupMember>**](GroupMember.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 list of GroupMember objects. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +Get Group Member + +Returns a GroupMember. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + try { + GroupMember result = apiInstance.getGroupMember(groupId, userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupMember"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | + +### Return type + +[**GroupMember**](GroupMember.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 list of GroupMember objects. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +List Group Members + +Returns a List of all **other** Group Members. This endpoint will never return the user calling the endpoint. Information about the user calling the endpoint must be found in the `myMember` field of the Group object. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + 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. + GroupSearchSort sort = GroupSearchSort.fromValue("joinedAt:asc"); // GroupSearchSort | The sort order of Group Member results + String roleId = "roleId_example"; // String | Only returns members with a specific groupRoleId + try { + List result = apiInstance.getGroupMembers(groupId, n, offset, sort, roleId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupMembers"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **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] | +| **sort** | [**GroupSearchSort**](.md)| The sort order of Group Member results | [optional] [enum: joinedAt:asc, joinedAt:desc] | +| **roleId** | **String**| Only returns members with a specific groupRoleId | [optional] | + +### Return type + +[**List<GroupMember>**](GroupMember.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 list of GroupMember objects. | - | +| **400** | Error response when trying to search list of users with an invalid request. | - | +| **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) + +List Group Permissions + +Returns a List of all possible/available permissions for a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + List result = apiInstance.getGroupPermissions(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupPermissions"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**List<GroupPermission>**](GroupPermission.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 list of GroupPermission objects. | - | +| **400** | Error response when trying to search list of users with an invalid request. | - | +| **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) + +Get posts from a Group + +Get posts from a Group + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + 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. + Boolean publicOnly = true; // Boolean | See public posts only. + try { + GetGroupPosts200Response result = apiInstance.getGroupPosts(groupId, n, offset, publicOnly); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupPosts"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **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] | +| **publicOnly** | **Boolean**| See public posts only. | [optional] | + +### Return type + +[**GetGroupPosts200Response**](GetGroupPosts200Response.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 GroupPost Array. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getGroupRequests** +> List<GroupMember> getGroupRequests(groupId, n, offset, blocked) + +Get Group Join Requests + +Returns a list of members that have requested to join the Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + 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. + Boolean blocked = true; // Boolean | See blocked join requests + try { + List result = apiInstance.getGroupRequests(groupId, n, offset, blocked); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupRequests"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **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] | +| **blocked** | **Boolean**| See blocked join requests | [optional] | + +### Return type + +[**List<GroupMember>**](GroupMember.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 list of GroupMember objects. | - | +| **400** | Bad request error response when responding to a group join request | - | +| **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() + +Get Group Role Templates + +Obtain predefined templates for group roles + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + try { + Map result = apiInstance.getGroupRoleTemplates(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupRoleTemplates"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Map<String, GroupRoleTemplateValues>**](GroupRoleTemplateValues.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 dictionary of GroupRoleTemplate objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getGroupRoles** +> List<GroupRole> getGroupRoles(groupId) + +Get Group Roles + +Returns a Group Role by ID. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + List result = apiInstance.getGroupRoles(groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupRoles"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**List<GroupRole>**](GroupRole.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 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. | - | + + +# **getGroupTransferability** +> GroupTransferable getGroupTransferability(groupId, transferTargetId) + +Get Group Transferability + +Returns the transferability of the group to a given 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String transferTargetId = "transferTargetId_example"; // String | The UserID of the prospective transferee. + try { + GroupTransferable result = apiInstance.getGroupTransferability(groupId, transferTargetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#getGroupTransferability"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **transferTargetId** | **String**| The UserID of the prospective transferee. | [optional] | + +### Return type + +[**GroupTransferable**](GroupTransferable.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 single GroupTransferable object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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 targeted by a pending transfer, no body is required. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + TransferGroupRequest transferGroupRequest = new TransferGroupRequest(); // TransferGroupRequest | + try { + Success result = apiInstance.initiateOrAcceptGroupTransfer(groupId, transferGroupRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#initiateOrAcceptGroupTransfer"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **transferGroupRequest** | [**TransferGroupRequest**](TransferGroupRequest.md)| | [optional] | + +### Return type + +[**Success**](Success.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | +| **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) + +Join Group + +Join a Group by ID and returns the member object. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + Boolean confirmOverrideBlock = true; // Boolean | Manually override the failure that would occur if the user has blocked the group. + JoinGroupRequest joinGroupRequest = new JoinGroupRequest(); // JoinGroupRequest | + try { + GroupMember result = apiInstance.joinGroup(groupId, confirmOverrideBlock, joinGroupRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#joinGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **confirmOverrideBlock** | **Boolean**| Manually override the failure that would occur if the user has blocked the group. | [optional] | +| **joinGroupRequest** | [**JoinGroupRequest**](JoinGroupRequest.md)| | [optional] | + +### Return type + +[**GroupMember**](GroupMember.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | +| **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) + +Kick Group Member + +Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. Also used for unblocking groups. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + try { + Success result = apiInstance.kickGroupMember(groupId, userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#kickGroupMember"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | + +### Return type + +[**Success**](Success.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** | Successful response after deleting a group member. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +Leave Group + +Leave a group by ID. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + apiInstance.leaveGroup(groupId); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#leaveGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **removeGroupMemberRole** +> List<String> removeGroupMemberRole(groupId, userId, groupRoleId) + +Remove Role from GroupMember + +Removes a Role from a Group Member + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + String groupRoleId = "groupRoleId_example"; // String | Must be a valid group role ID. + try { + List result = apiInstance.removeGroupMemberRole(groupId, userId, groupRoleId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#removeGroupMemberRole"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | +| **groupRoleId** | **String**| Must be a valid group role ID. | | + +### Return type + +**List<String>** + +### 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 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. | - | + + +# **respondGroupJoinRequest** +> respondGroupJoinRequest(groupId, userId, respondGroupJoinRequest) + +Respond Group Join request + +Responds to a Group Join Request with Accept/Deny + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + RespondGroupJoinRequest respondGroupJoinRequest = new RespondGroupJoinRequest(); // RespondGroupJoinRequest | + try { + apiInstance.respondGroupJoinRequest(groupId, userId, respondGroupJoinRequest); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#respondGroupJoinRequest"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | +| **respondGroupJoinRequest** | [**RespondGroupJoinRequest**](RespondGroupJoinRequest.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **searchGroupMembers** +> SearchGroupMembers200Response searchGroupMembers(groupId, query, n, offset) + +Search Group Members + +Search for members in the group by displayName. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String query = "query_example"; // String | Filter for member displayName. + 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. + try { + SearchGroupMembers200Response result = apiInstance.searchGroupMembers(groupId, query, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#searchGroupMembers"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **query** | **String**| Filter for member displayName. | | +| **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] | + +### Return type + +[**SearchGroupMembers200Response**](SearchGroupMembers200Response.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 list of GroupMember objects from a search. | - | +| **400** | Error response when trying to search list of users with an invalid request. | - | +| **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) + +Search Group + +Searches Groups by name or shortCode + +### Example +```java +// Import classes: +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.models.*; +import io.github.vrchatapi.api.GroupsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String query = "query_example"; // String | Query to search for, can be either Group Name or Group shortCode + Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. + Integer n = 60; // Integer | The number of objects to return. + try { + List result = apiInstance.searchGroups(query, offset, n); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#searchGroups"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **query** | **String**| Query to search for, can be either Group Name or Group shortCode | [optional] | +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | + +### Return type + +[**List<LimitedGroup>**](LimitedGroup.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a list of LimitedGroup objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **unbanGroupMember** +> GroupMember unbanGroupMember(groupId, userId) + +Unban Group Member + +Unbans a user from a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + try { + GroupMember result = apiInstance.unbanGroupMember(groupId, userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#unbanGroupMember"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | + +### Return type + +[**GroupMember**](GroupMember.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 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. | - | + + +# **updateGroup** +> Group updateGroup(groupId, updateGroupRequest) + +Update Group + +Updates a Group and returns it. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + UpdateGroupRequest updateGroupRequest = new UpdateGroupRequest(); // UpdateGroupRequest | + try { + Group result = apiInstance.updateGroup(groupId, updateGroupRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#updateGroup"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **updateGroupRequest** | [**UpdateGroupRequest**](UpdateGroupRequest.md)| | [optional] | + +### Return type + +[**Group**](Group.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **updateGroupGallery** +> GroupGallery updateGroupGallery(groupId, groupGalleryId, updateGroupGalleryRequest) + +Update Group Gallery + +Updates a gallery for a Group. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String groupGalleryId = "groupGalleryId_example"; // String | Must be a valid group gallery ID. + UpdateGroupGalleryRequest updateGroupGalleryRequest = new UpdateGroupGalleryRequest(); // UpdateGroupGalleryRequest | + try { + GroupGallery result = apiInstance.updateGroupGallery(groupId, groupGalleryId, updateGroupGalleryRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#updateGroupGallery"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **groupGalleryId** | **String**| Must be a valid group gallery ID. | | +| **updateGroupGalleryRequest** | [**UpdateGroupGalleryRequest**](UpdateGroupGalleryRequest.md)| | [optional] | + +### Return type + +[**GroupGallery**](GroupGallery.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **updateGroupMember** +> GroupMember updateGroupMember(groupId, userId, updateGroupMemberRequest) + +Update Group Member + +Updates a Group Member + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String userId = "userId_example"; // String | Must be a valid user ID. + UpdateGroupMemberRequest updateGroupMemberRequest = new UpdateGroupMemberRequest(); // UpdateGroupMemberRequest | + try { + GroupMember result = apiInstance.updateGroupMember(groupId, userId, updateGroupMemberRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#updateGroupMember"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **userId** | **String**| Must be a valid user ID. | | +| **updateGroupMemberRequest** | [**UpdateGroupMemberRequest**](UpdateGroupMemberRequest.md)| | [optional] | + +### Return type + +[**GroupMember**](GroupMember.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **updateGroupPost** +> GroupPost updateGroupPost(groupId, notificationId, createGroupPostRequest) + +Edits a Group post + +Edits a Group post + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + CreateGroupPostRequest createGroupPostRequest = new CreateGroupPostRequest(); // CreateGroupPostRequest | + try { + GroupPost result = apiInstance.updateGroupPost(groupId, notificationId, createGroupPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#updateGroupPost"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **notificationId** | **String**| Must be a valid notification ID. | | +| **createGroupPostRequest** | [**CreateGroupPostRequest**](CreateGroupPostRequest.md)| | | + +### Return type + +[**GroupPost**](GroupPost.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **updateGroupRepresentation** +> Success updateGroupRepresentation(groupId, updateGroupRepresentationRequest) + +Update Group Representation + +Updates whether the user is representing the group. When `isRepresenting` is set to `true`, this flag will be set to `false` for all other groups + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + UpdateGroupRepresentationRequest updateGroupRepresentationRequest = new UpdateGroupRepresentationRequest(); // UpdateGroupRepresentationRequest | + try { + Success result = apiInstance.updateGroupRepresentation(groupId, updateGroupRepresentationRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#updateGroupRepresentation"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **updateGroupRepresentationRequest** | [**UpdateGroupRepresentationRequest**](UpdateGroupRepresentationRequest.md)| | | + +### Return type + +[**Success**](Success.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **updateGroupRole** +> List<GroupRole> updateGroupRole(groupId, groupRoleId, updateGroupRoleRequest) + +Update Group Role + +Updates a group role by ID. + +### 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.GroupsApi; + +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"); + + GroupsApi apiInstance = new GroupsApi(defaultClient); + String groupId = "groupId_example"; // String | Must be a valid group ID. + String groupRoleId = "groupRoleId_example"; // String | Must be a valid group role ID. + UpdateGroupRoleRequest updateGroupRoleRequest = new UpdateGroupRoleRequest(); // UpdateGroupRoleRequest | + try { + List result = apiInstance.updateGroupRole(groupId, groupRoleId, updateGroupRoleRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GroupsApi#updateGroupRole"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **groupId** | **String**| Must be a valid group ID. | | +| **groupRoleId** | **String**| Must be a valid group role ID. | | +| **updateGroupRoleRequest** | [**UpdateGroupRoleRequest**](UpdateGroupRoleRequest.md)| | [optional] | + +### Return type + +[**List<GroupRole>**](GroupRole.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a list of GroupRole objects. | - | +| **401** | Error response due to missing auth cookie. | - | + diff --git a/docs/ImageAnimationStyle.md b/docs/ImageAnimationStyle.md new file mode 100644 index 00000000..8914a6e2 --- /dev/null +++ b/docs/ImageAnimationStyle.md @@ -0,0 +1,63 @@ + + +# ImageAnimationStyle + +## Enum + + +* `AURA` (value: `"aura"`) + +* `BATS` (value: `"bats"`) + +* `BEES` (value: `"bees"`) + +* `BOUNCE` (value: `"bounce"`) + +* `CLOUD` (value: `"cloud"`) + +* `CONFETTI` (value: `"confetti"`) + +* `CRYING` (value: `"crying"`) + +* `DISLIKE` (value: `"dislike"`) + +* `FIRE` (value: `"fire"`) + +* `IDEA` (value: `"idea"`) + +* `LASERS` (value: `"lasers"`) + +* `LIKE` (value: `"like"`) + +* `MAGNET` (value: `"magnet"`) + +* `MISTLETOE` (value: `"mistletoe"`) + +* `MONEY` (value: `"money"`) + +* `NOISE` (value: `"noise"`) + +* `ORBIT` (value: `"orbit"`) + +* `PIZZA` (value: `"pizza"`) + +* `RAIN` (value: `"rain"`) + +* `ROTATE` (value: `"rotate"`) + +* `SHAKE` (value: `"shake"`) + +* `SNOW` (value: `"snow"`) + +* `SNOWBALL` (value: `"snowball"`) + +* `SPIN` (value: `"spin"`) + +* `SPLASH` (value: `"splash"`) + +* `STOP` (value: `"stop"`) + +* `ZZZ` (value: `"zzz"`) + + + diff --git a/docs/ImageLoopStyle.md b/docs/ImageLoopStyle.md new file mode 100644 index 00000000..b6990483 --- /dev/null +++ b/docs/ImageLoopStyle.md @@ -0,0 +1,13 @@ + + +# ImageLoopStyle + +## Enum + + +* `LINEAR` (value: `"linear"`) + +* `PINGPONG` (value: `"pingpong"`) + + + diff --git a/docs/ImageMask.md b/docs/ImageMask.md new file mode 100644 index 00000000..6a847325 --- /dev/null +++ b/docs/ImageMask.md @@ -0,0 +1,21 @@ + + +# ImageMask + +## Enum + + +* `CIRCLE` (value: `"circle"`) + +* `FLOWER` (value: `"flower"`) + +* `HEART` (value: `"heart"`) + +* `POW` (value: `"pow"`) + +* `SQUARE` (value: `"square"`) + +* `STAR` (value: `"star"`) + + + diff --git a/docs/ImagePurpose.md b/docs/ImagePurpose.md new file mode 100644 index 00000000..73ff1e32 --- /dev/null +++ b/docs/ImagePurpose.md @@ -0,0 +1,31 @@ + + +# ImagePurpose + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `AVATARGALLERY` (value: `"avatargallery"`) + +* `AVATARIMAGE` (value: `"avatarimage"`) + +* `BUNDLE` (value: `"bundle"`) + +* `EMOJI` (value: `"emoji"`) + +* `EMOJIANIMATED` (value: `"emojianimated"`) + +* `GALLERY` (value: `"gallery"`) + +* `ICON` (value: `"icon"`) + +* `LISTINGGALLERY` (value: `"listinggallery"`) + +* `PRODUCT` (value: `"product"`) + +* `STICKER` (value: `"sticker"`) + + + diff --git a/docs/InfoPush.md b/docs/InfoPush.md index 5b414b96..ed4d68bd 100644 --- a/docs/InfoPush.md +++ b/docs/InfoPush.md @@ -3,21 +3,22 @@ # InfoPush + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**isEnabled** | **Boolean** | | -**releaseStatus** | **ReleaseStatus** | | -**priority** | **Integer** | | -**tags** | **List<String>** | | -**data** | [**InfoPushData**](InfoPushData.md) | | -**hash** | **String** | Unknown usage, MD5 | -**createdAt** | **OffsetDateTime** | | -**updatedAt** | **OffsetDateTime** | | -**startDate** | **OffsetDateTime** | | [optional] -**endDate** | **OffsetDateTime** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**data** | [**InfoPushData**](InfoPushData.md) | | | +|**endDate** | **OffsetDateTime** | | [optional] | +|**hash** | **String** | Unknown usage, MD5 | | +|**id** | **String** | | | +|**isEnabled** | **Boolean** | | | +|**priority** | **Integer** | | | +|**releaseStatus** | **ReleaseStatus** | | | +|**startDate** | **OffsetDateTime** | | [optional] | +|**tags** | **List<String>** | | | +|**updatedAt** | **OffsetDateTime** | | | diff --git a/docs/InfoPushData.md b/docs/InfoPushData.md index 26bcea85..5f50e261 100644 --- a/docs/InfoPushData.md +++ b/docs/InfoPushData.md @@ -3,18 +3,19 @@ # InfoPushData + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contentList** | [**DynamicContentRow**](DynamicContentRow.md) | | [optional] -**description** | **String** | | [optional] -**imageUrl** | **String** | | [optional] -**name** | **String** | | [optional] -**onPressed** | [**InfoPushDataClickable**](InfoPushDataClickable.md) | | [optional] -**template** | **String** | | [optional] -**version** | **String** | | [optional] -**article** | [**InfoPushDataArticle**](InfoPushDataArticle.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**article** | [**InfoPushDataArticle**](InfoPushDataArticle.md) | | [optional] | +|**contentList** | [**DynamicContentRow**](DynamicContentRow.md) | | [optional] | +|**description** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**onPressed** | [**InfoPushDataClickable**](InfoPushDataClickable.md) | | [optional] | +|**template** | **String** | | [optional] | +|**version** | **String** | | [optional] | diff --git a/docs/InfoPushDataArticle.md b/docs/InfoPushDataArticle.md index bae8f14d..ec81cdd2 100644 --- a/docs/InfoPushDataArticle.md +++ b/docs/InfoPushDataArticle.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | [**InfoPushDataArticleContent**](InfoPushDataArticleContent.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**content** | [**InfoPushDataArticleContent**](InfoPushDataArticleContent.md) | | [optional] | diff --git a/docs/InfoPushDataArticleContent.md b/docs/InfoPushDataArticleContent.md index 1d4d9fe7..ddce63a4 100644 --- a/docs/InfoPushDataArticleContent.md +++ b/docs/InfoPushDataArticleContent.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**text** | **String** | | [optional] -**imageUrl** | **String** | | [optional] -**onPressed** | [**InfoPushDataClickable**](InfoPushDataClickable.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**imageUrl** | **String** | | [optional] | +|**onPressed** | [**InfoPushDataClickable**](InfoPushDataClickable.md) | | [optional] | +|**text** | **String** | | [optional] | diff --git a/docs/InfoPushDataClickable.md b/docs/InfoPushDataClickable.md index 8bb97c69..4a80b464 100644 --- a/docs/InfoPushDataClickable.md +++ b/docs/InfoPushDataClickable.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**command** | [**CommandEnum**](#CommandEnum) | | -**parameters** | **List<String>** | In case of OpenURL, this would contain the link. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**parameters** | **List<String>** | In case of OpenURL, this would contain the link. | [optional] | +|**command** | [**CommandEnum**](#CommandEnum) | | | ## Enum: CommandEnum -Name | Value ----- | ----- -OPENURL | "OpenURL" -OPENVRCPLUSMENU | "OpenVRCPlusMenu" -OPENSAFETYMENU | "OpenSafetyMenu" -CANNEDWORLDSEARCH | "CannedWorldSearch" +| Name | Value | +|---- | -----| +| CANNED_WORLD_SEARCH | "CannedWorldSearch" | +| OPEN_SAFETY_MENU | "OpenSafetyMenu" | +| OPEN_URL | "OpenURL" | +| OPEN_VRC_PLUS_MENU | "OpenVRCPlusMenu" | diff --git a/docs/Instance.md b/docs/Instance.md index 13108343..9e53e5fb 100644 --- a/docs/Instance.md +++ b/docs/Instance.md @@ -6,30 +6,52 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | **Boolean** | | -**canRequestInvite** | **Boolean** | | -**capacity** | **Integer** | | -**clientNumber** | **String** | Always returns \"unknown\". | -**full** | **Boolean** | | -**id** | **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. | -**instanceId** | **String** | | -**location** | **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. | -**nUsers** | **Integer** | | -**name** | **String** | | -**ownerId** | **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] -**permanent** | **Boolean** | | -**photonRegion** | **Region** | | -**platforms** | [**InstancePlatforms**](InstancePlatforms.md) | | -**region** | **Region** | | -**shortName** | **String** | | -**tags** | **List<String>** | The tags array on Instances usually contain the language tags of the people in the instance. | -**type** | **InstanceType** | | -**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**hidden** | **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] -**friends** | **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] -**_private** | **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] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**active** | **Boolean** | | [optional] | +|**ageGate** | **Boolean** | | [optional] | +|**calendarEntryId** | **String** | | [optional] | +|**canRequestInvite** | **Boolean** | | [optional] | +|**capacity** | **Integer** | | [optional] | +|**clientNumber** | **String** | Always returns \"unknown\". | | +|**closedAt** | **OffsetDateTime** | | [optional] | +|**contentSettings** | [**InstanceContentSettings**](InstanceContentSettings.md) | | [optional] | +|**creatorId** | **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] | +|**displayName** | **String** | | [optional] | +|**friends** | **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] | +|**full** | **Boolean** | | | +|**gameServerVersion** | **Integer** | | [optional] | +|**groupAccessType** | **GroupAccessType** | | [optional] | +|**hardClose** | **Boolean** | | [optional] | +|**hasCapacityForYou** | **Boolean** | | [optional] | +|**hidden** | **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] | +|**id** | **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. | | +|**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. | | +|**instancePersistenceEnabled** | **Boolean** | | [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. | | +|**nUsers** | **Integer** | | | +|**name** | **String** | | | +|**nonce** | **String** | | [optional] | +|**ownerId** | **String** | A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise | [optional] | +|**permanent** | **Boolean** | | | +|**photonRegion** | **Region** | | | +|**platforms** | [**InstancePlatforms**](InstancePlatforms.md) | | | +|**playerPersistenceEnabled** | **Boolean** | | [optional] | +|**_private** | **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] | +|**queueEnabled** | **Boolean** | | | +|**queueSize** | **Integer** | | | +|**recommendedCapacity** | **Integer** | | | +|**region** | **InstanceRegion** | | | +|**roleRestricted** | **Boolean** | | [optional] | +|**secureName** | **String** | | | +|**shortName** | **String** | | [optional] | +|**strict** | **Boolean** | | | +|**tags** | **List<String>** | The tags array on Instances usually contain the language tags of the people in the instance. | | +|**type** | **InstanceType** | | | +|**userCount** | **Integer** | | | +|**users** | [**List<LimitedUserInstance>**](LimitedUserInstance.md) | The users field is present on instances created by the requesting user. | [optional] | +|**world** | [**World**](World.md) | | | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | diff --git a/docs/InstanceContentSettings.md b/docs/InstanceContentSettings.md new file mode 100644 index 00000000..f44e9a90 --- /dev/null +++ b/docs/InstanceContentSettings.md @@ -0,0 +1,19 @@ + + +# InstanceContentSettings + +Types of dynamic user content permitted in an instance + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**drones** | **Boolean** | | [optional] | +|**emoji** | **Boolean** | | [optional] | +|**pedestals** | **Boolean** | | [optional] | +|**prints** | **Boolean** | | [optional] | +|**props** | **Boolean** | | [optional] | +|**stickers** | **Boolean** | | [optional] | + + + diff --git a/docs/InstancePlatforms.md b/docs/InstancePlatforms.md index 0cf40e8f..55805f6d 100644 --- a/docs/InstancePlatforms.md +++ b/docs/InstancePlatforms.md @@ -5,10 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**android** | **Integer** | | -**standalonewindows** | **Integer** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**android** | **Integer** | | | +|**ios** | **Integer** | | [optional] | +|**standalonewindows** | **Integer** | | | diff --git a/docs/InstanceRegion.md b/docs/InstanceRegion.md new file mode 100644 index 00000000..bd512892 --- /dev/null +++ b/docs/InstanceRegion.md @@ -0,0 +1,19 @@ + + +# InstanceRegion + +## Enum + + +* `EU` (value: `"eu"`) + +* `JP` (value: `"jp"`) + +* `UNKNOWN` (value: `"unknown"`) + +* `US` (value: `"us"`) + +* `USE` (value: `"use"`) + + + diff --git a/docs/InstanceShortNameResponse.md b/docs/InstanceShortNameResponse.md new file mode 100644 index 00000000..15fd8b6b --- /dev/null +++ b/docs/InstanceShortNameResponse.md @@ -0,0 +1,14 @@ + + +# InstanceShortNameResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**secureName** | **String** | | | +|**shortName** | **String** | | [optional] | + + + diff --git a/docs/InstanceType.md b/docs/InstanceType.md index 7c0b8df7..2e5fe251 100644 --- a/docs/InstanceType.md +++ b/docs/InstanceType.md @@ -5,13 +5,15 @@ ## Enum -* `PUBLIC` (value: `"public"`) +* `FRIENDS` (value: `"friends"`) -* `HIDDEN` (value: `"hidden"`) +* `GROUP` (value: `"group"`) -* `FRIENDS` (value: `"friends"`) +* `HIDDEN` (value: `"hidden"`) * `PRIVATE` (value: `"private"`) +* `PUBLIC` (value: `"public"`) + diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md index 5e2d3ac0..8fdef998 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -2,14 +2,165 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getInstance**](InstancesApi.md#getInstance) | **GET** /instances/{worldId}:{instanceId} | Get Instance -[**getShortName**](InstancesApi.md#getShortName) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name -[**sendSelfInvite**](InstancesApi.md#sendSelfInvite) | **POST** /instances/{worldId}:{instanceId}/invite | Send Self Invite +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**closeInstance**](InstancesApi.md#closeInstance) | **DELETE** /instances/{worldId}:{instanceId} | Close Instance | +| [**createInstance**](InstancesApi.md#createInstance) | **POST** /instances | Create Instance | +| [**getInstance**](InstancesApi.md#getInstance) | **GET** /instances/{worldId}:{instanceId} | Get Instance | +| [**getInstanceByShortName**](InstancesApi.md#getInstanceByShortName) | **GET** /instances/s/{shortName} | Get Instance By Short Name | +| [**getRecentLocations**](InstancesApi.md#getRecentLocations) | **GET** /instances/recent | List Recent Locations | +| [**getShortName**](InstancesApi.md#getShortName) | **GET** /instances/{worldId}:{instanceId}/shortName | Get Instance Short Name | - + +# **closeInstance** +> Instance closeInstance(worldId, instanceId, hardClose, closedAt) + +Close Instance + +Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-manage` permission. + +### 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.InstancesApi; + +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"); + + InstancesApi apiInstance = new InstancesApi(defaultClient); + String worldId = "worldId_example"; // String | Must be a valid world ID. + String instanceId = "instanceId_example"; // String | Must be a valid instance ID. + Boolean hardClose = true; // Boolean | Whether to hard close the instance. Defaults to false. + OffsetDateTime closedAt = OffsetDateTime.now(); // OffsetDateTime | The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. + try { + Instance result = apiInstance.closeInstance(worldId, instanceId, hardClose, closedAt); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InstancesApi#closeInstance"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **instanceId** | **String**| Must be a valid instance ID. | | +| **hardClose** | **Boolean**| Whether to hard close the instance. Defaults to false. | [optional] | +| **closedAt** | **OffsetDateTime**| The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. | [optional] | + +### Return type + +[**Instance**](Instance.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 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 existent instance | - | + + +# **createInstance** +> Instance createInstance(createInstanceRequest) + +Create Instance + +Create an instance + +### 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.InstancesApi; + +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"); + + InstancesApi apiInstance = new InstancesApi(defaultClient); + CreateInstanceRequest createInstanceRequest = new CreateInstanceRequest(); // CreateInstanceRequest | + try { + Instance result = apiInstance.createInstance(createInstanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InstancesApi#createInstance"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createInstanceRequest** | [**CreateInstanceRequest**](CreateInstanceRequest.md)| | | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single Instance object. | - | +| **401** | Error response due to missing auth cookie. | - | + + # **getInstance** > Instance getInstance(worldId, instanceId) @@ -32,12 +183,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -45,8 +190,8 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InstancesApi apiInstance = new InstancesApi(defaultClient); - String worldId = "worldId_example"; // String | - String instanceId = "instanceId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. + String instanceId = "instanceId_example"; // String | Must be a valid instance ID. try { Instance result = apiInstance.getInstance(worldId, instanceId); System.out.println(result); @@ -63,10 +208,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | - **instanceId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **instanceId** | **String**| Must be a valid instance ID. | | ### Return type @@ -74,7 +219,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -84,16 +229,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Instance object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single Instance object. | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getShortName** -> String getShortName(worldId, instanceId) + +# **getInstanceByShortName** +> Instance getInstanceByShortName(shortName) -Get Instance Short Name +Get Instance By Short Name -Returns an instance short name. +Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. ### Example ```java @@ -110,12 +255,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -123,13 +262,12 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InstancesApi apiInstance = new InstancesApi(defaultClient); - String worldId = "worldId_example"; // String | - String instanceId = "instanceId_example"; // String | + String shortName = "shortName_example"; // String | Must be a valid instance short name. try { - String result = apiInstance.getShortName(worldId, instanceId); + Instance result = apiInstance.getInstanceByShortName(shortName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstancesApi#getShortName"); + System.err.println("Exception when calling InstancesApi#getInstanceByShortName"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -141,37 +279,37 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | - **instanceId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **shortName** | **String**| Must be a valid instance short name. | | ### Return type -**String** +[**Instance**](Instance.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns an instance short name. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single Instance object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **404** | Error response due to non existent instance | - | - -# **sendSelfInvite** -> Success sendSelfInvite(worldId, instanceId) + +# **getRecentLocations** +> List<String> getRecentLocations(n, offset) -Send Self Invite +List Recent Locations -Sends an invite to the instance to yourself. +Returns a list of recently visited locations. ### Example ```java @@ -188,12 +326,78 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + InstancesApi apiInstance = new InstancesApi(defaultClient); + 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. + try { + List result = apiInstance.getRecentLocations(n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InstancesApi#getRecentLocations"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **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] | + +### Return type + +**List<String>** + +### 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 list of LocationIDs. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getShortName** +> InstanceShortNameResponse getShortName(worldId, instanceId) + +Get Instance Short Name + +Returns an instance short name. + +### 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.InstancesApi; + +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"); @@ -201,13 +405,13 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InstancesApi apiInstance = new InstancesApi(defaultClient); - String worldId = "worldId_example"; // String | - String instanceId = "instanceId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. + String instanceId = "instanceId_example"; // String | Must be a valid instance ID. try { - Success result = apiInstance.sendSelfInvite(worldId, instanceId); + InstanceShortNameResponse result = apiInstance.getShortName(worldId, instanceId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstancesApi#sendSelfInvite"); + System.err.println("Exception when calling InstancesApi#getShortName"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -219,18 +423,18 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | - **instanceId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **instanceId** | **String**| Must be a valid instance ID. | | ### Return type -[**Success**](Success.md) +[**InstanceShortNameResponse**](InstanceShortNameResponse.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -240,6 +444,6 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success response after sending an invite to yourself to the instance. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns an instance secureName and/or shortName. | - | +| **401** | Error response due to missing auth cookie. | - | diff --git a/docs/Inventory.md b/docs/Inventory.md new file mode 100644 index 00000000..36c8eb26 --- /dev/null +++ b/docs/Inventory.md @@ -0,0 +1,14 @@ + + +# Inventory + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<InventoryItem>**](InventoryItem.md) | | | +|**totalCount** | **Integer** | | | + + + diff --git a/docs/InventoryApi.md b/docs/InventoryApi.md new file mode 100644 index 00000000..04d40d0a --- /dev/null +++ b/docs/InventoryApi.md @@ -0,0 +1,1104 @@ +# InventoryApi + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**consumeOwnInventoryItem**](InventoryApi.md#consumeOwnInventoryItem) | **PUT** /inventory/{inventoryItemId}/consume | Consume Own Inventory Item | +| [**deleteOwnInventoryItem**](InventoryApi.md#deleteOwnInventoryItem) | **DELETE** /inventory/{inventoryItemId} | Delete Own Inventory Item | +| [**equipOwnInventoryItem**](InventoryApi.md#equipOwnInventoryItem) | **PUT** /inventory/{inventoryItemId}/equip | Equip Own Inventory Item | +| [**getInventory**](InventoryApi.md#getInventory) | **GET** /inventory | Get Inventory | +| [**getInventoryCollections**](InventoryApi.md#getInventoryCollections) | **GET** /inventory/collections | List Inventory Collections | +| [**getInventoryDrops**](InventoryApi.md#getInventoryDrops) | **GET** /inventory/drops | List Inventory Drops | +| [**getInventoryTemplate**](InventoryApi.md#getInventoryTemplate) | **GET** /inventory/template/{inventoryTemplateId} | Get Inventory Template | +| [**getOwnInventoryItem**](InventoryApi.md#getOwnInventoryItem) | **GET** /inventory/{inventoryItemId} | Get Own Inventory Item | +| [**getUserInventoryItem**](InventoryApi.md#getUserInventoryItem) | **GET** /user/{userId}/inventory/{inventoryItemId} | Get User Inventory Item | +| [**redeemReward**](InventoryApi.md#redeemReward) | **POST** /reward/redeem | Redeem Reward | +| [**shareInventoryItemDirect**](InventoryApi.md#shareInventoryItemDirect) | **POST** /inventory/cloning/direct | Share Inventory Item Direct | +| [**shareInventoryItemPedestal**](InventoryApi.md#shareInventoryItemPedestal) | **GET** /inventory/cloning/pedestal | Share Inventory Item by Pedestal | +| [**spawnInventoryItem**](InventoryApi.md#spawnInventoryItem) | **GET** /inventory/spawn | Spawn Inventory Item | +| [**unequipOwnInventorySlot**](InventoryApi.md#unequipOwnInventorySlot) | **DELETE** /inventory/{inventoryItemId}/equip | Unequip Own Inventory Slot | +| [**updateOwnInventoryItem**](InventoryApi.md#updateOwnInventoryItem) | **PUT** /inventory/{inventoryItemId} | Update Own Inventory Item | + + + +# **consumeOwnInventoryItem** +> InventoryConsumptionResults consumeOwnInventoryItem(inventoryItemId) + +Consume Own Inventory Item + +Returns the modified InventoryItem object as held by the currently logged in 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String inventoryItemId = "inventoryItemId_example"; // String | Must be a valid inventory item ID. + try { + InventoryConsumptionResults result = apiInstance.consumeOwnInventoryItem(inventoryItemId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#consumeOwnInventoryItem"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **inventoryItemId** | **String**| Must be a valid inventory item ID. | | + +### Return type + +[**InventoryConsumptionResults**](InventoryConsumptionResults.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 an InventoryConsumptionResults object. | - | +| **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) + +Delete Own Inventory Item + +Deletes an InventoryItem from the inventory of the currently logged in 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String inventoryItemId = "inventoryItemId_example"; // String | Must be a valid inventory item ID. + try { + SuccessFlag result = apiInstance.deleteOwnInventoryItem(inventoryItemId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#deleteOwnInventoryItem"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **inventoryItemId** | **String**| Must be a valid inventory item ID. | | + +### Return type + +[**SuccessFlag**](SuccessFlag.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 an SuccessFlag object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **equipOwnInventoryItem** +> InventoryItem equipOwnInventoryItem(inventoryItemId, equipInventoryItemRequest) + +Equip Own Inventory Item + +Returns the modified InventoryItem object as held by the currently logged in 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String inventoryItemId = "inventoryItemId_example"; // String | Must be a valid inventory item ID. + EquipInventoryItemRequest equipInventoryItemRequest = new EquipInventoryItemRequest(); // EquipInventoryItemRequest | + try { + InventoryItem result = apiInstance.equipOwnInventoryItem(inventoryItemId, equipInventoryItemRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#equipOwnInventoryItem"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **inventoryItemId** | **String**| Must be a valid inventory item ID. | | +| **equipInventoryItemRequest** | [**EquipInventoryItemRequest**](EquipInventoryItemRequest.md)| | [optional] | + +### Return type + +[**InventoryItem**](InventoryItem.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **getInventory** +> Inventory getInventory(n, offset, holderId, equipSlot, order, tags, types, flags, notTypes, notFlags, archived) + +Get Inventory + +Returns an Inventory object. + +### 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + 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 holderId = "holderId_example"; // String | The UserID of the owner of the inventory; defaults to the currently authenticated user. + InventoryEquipSlot equipSlot = InventoryEquipSlot.fromValue(""); // InventoryEquipSlot | Filter for inventory retrieval. + String order = "newest"; // String | Sort order for inventory retrieval. + String tags = "tags_example"; // String | Filter tags for inventory retrieval (comma-separated). + InventoryItemType types = InventoryItemType.fromValue("bundle"); // InventoryItemType | Filter for inventory retrieval. + InventoryFlag flags = InventoryFlag.fromValue("archivable"); // InventoryFlag | Filter flags for inventory retrieval (comma-separated). + InventoryItemType notTypes = InventoryItemType.fromValue("bundle"); // InventoryItemType | Filter out types for inventory retrieval (comma-separated). + InventoryFlag notFlags = InventoryFlag.fromValue("archivable"); // InventoryFlag | Filter out flags for inventory retrieval (comma-separated). + Boolean archived = true; // Boolean | Filter archived status for inventory retrieval. + try { + Inventory result = apiInstance.getInventory(n, offset, holderId, equipSlot, order, tags, types, flags, notTypes, notFlags, archived); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#getInventory"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **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] | +| **holderId** | **String**| The UserID of the owner of the inventory; defaults to the currently authenticated user. | [optional] | +| **equipSlot** | [**InventoryEquipSlot**](.md)| Filter for inventory retrieval. | [optional] [default to ] [enum: , drone, portal, warp] | +| **order** | **String**| Sort order for inventory retrieval. | [optional] [enum: newest, newest_created, oldest, oldest_created] | +| **tags** | **String**| Filter tags for inventory retrieval (comma-separated). | [optional] | +| **types** | [**InventoryItemType**](.md)| Filter for inventory retrieval. | [optional] [default to bundle] [enum: bundle, droneskin, emoji, portalskin, prop, sticker, warpeffect] | +| **flags** | [**InventoryFlag**](.md)| Filter flags for inventory retrieval (comma-separated). | [optional] [default to instantiatable] [enum: archivable, cloneable, consumable, equippable, instantiatable, trashable, ugc, unique] | +| **notTypes** | [**InventoryItemType**](.md)| Filter out types for inventory retrieval (comma-separated). | [optional] [default to bundle] [enum: bundle, droneskin, emoji, portalskin, prop, sticker, warpeffect] | +| **notFlags** | [**InventoryFlag**](.md)| Filter out flags for inventory retrieval (comma-separated). | [optional] [default to instantiatable] [enum: archivable, cloneable, consumable, equippable, instantiatable, trashable, ugc, unique] | +| **archived** | **Boolean**| Filter archived status for inventory retrieval. | [optional] | + +### Return type + +[**Inventory**](Inventory.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 an Inventory object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response due to missing permissions. | - | + + +# **getInventoryCollections** +> List<String> getInventoryCollections() + +List Inventory Collections + +Returns a list of collection names. + +### 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + try { + List result = apiInstance.getInventoryCollections(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#getInventoryCollections"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**List<String>** + +### 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 list of strings. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getInventoryDrops** +> List<InventoryDrop> getInventoryDrops(active) + +List Inventory Drops + +Returns a list of InventoryDrop objects. + +### 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + Boolean active = true; // Boolean | Filter for users' listings and inventory bundles. + try { + List result = apiInstance.getInventoryDrops(active); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#getInventoryDrops"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **active** | **Boolean**| Filter for users' listings and inventory bundles. | [optional] | + +### Return type + +[**List<InventoryDrop>**](InventoryDrop.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 list of InventoryDrop objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getInventoryTemplate** +> InventoryTemplate getInventoryTemplate(inventoryTemplateId) + +Get Inventory Template + +Returns an InventoryTemplate object. + +### 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String inventoryTemplateId = "inventoryTemplateId_example"; // String | Must be a valid inventory template ID. + try { + InventoryTemplate result = apiInstance.getInventoryTemplate(inventoryTemplateId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#getInventoryTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **inventoryTemplateId** | **String**| Must be a valid inventory template ID. | | + +### Return type + +[**InventoryTemplate**](InventoryTemplate.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 an InventoryTemplate object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getOwnInventoryItem** +> InventoryItem getOwnInventoryItem(inventoryItemId) + +Get Own Inventory Item + +Returns an InventoryItem object held by the currently logged in 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String inventoryItemId = "inventoryItemId_example"; // String | Must be a valid inventory item ID. + try { + InventoryItem result = apiInstance.getOwnInventoryItem(inventoryItemId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#getOwnInventoryItem"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **inventoryItemId** | **String**| Must be a valid inventory item ID. | | + +### Return type + +[**InventoryItem**](InventoryItem.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 an InventoryItem object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserInventoryItem** +> InventoryItem getUserInventoryItem(userId, inventoryItemId) + +Get User Inventory Item + +Returns an InventoryItem object held by the given 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + String inventoryItemId = "inventoryItemId_example"; // String | Must be a valid inventory item ID. + try { + InventoryItem result = apiInstance.getUserInventoryItem(userId, inventoryItemId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#getUserInventoryItem"); + 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. | | +| **inventoryItemId** | **String**| Must be a valid inventory item ID. | | + +### Return type + +[**InventoryItem**](InventoryItem.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 an InventoryItem object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **redeemReward** +> List<RewardRedemptionResult> redeemReward(rewardRedemptionRequest) + +Redeem Reward + +Redeem a reward for the currently logged in 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + RewardRedemptionRequest rewardRedemptionRequest = new RewardRedemptionRequest(); // RewardRedemptionRequest | + try { + List result = apiInstance.redeemReward(rewardRedemptionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#redeemReward"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **rewardRedemptionRequest** | [**RewardRedemptionRequest**](RewardRedemptionRequest.md)| | | + +### Return type + +[**List<RewardRedemptionResult>**](RewardRedemptionResult.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single RewardRedemptionResult object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **shareInventoryItemDirect** +> OkStatus shareInventoryItemDirect(itemId, duration, shareInventoryItemDirectRequest) + +Share Inventory Item Direct + +Share content directly with other users. + +### 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String itemId = "itemId_example"; // String | Id for inventory item sharing. + Integer duration = 90; // Integer | The duration before the sharing pedestal despawns. + ShareInventoryItemDirectRequest shareInventoryItemDirectRequest = new ShareInventoryItemDirectRequest(); // ShareInventoryItemDirectRequest | + try { + OkStatus result = apiInstance.shareInventoryItemDirect(itemId, duration, shareInventoryItemDirectRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#shareInventoryItemDirect"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **itemId** | **String**| Id for inventory item sharing. | | +| **duration** | **Integer**| The duration before the sharing pedestal despawns. | [default to 90] | +| **shareInventoryItemDirectRequest** | [**ShareInventoryItemDirectRequest**](ShareInventoryItemDirectRequest.md)| | | + +### Return type + +[**OkStatus**](OkStatus.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns an OkStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **shareInventoryItemPedestal** +> InventorySpawn shareInventoryItemPedestal(itemId, duration) + +Share Inventory Item by Pedestal + +Returns an InventorySpawn object. + +### 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String itemId = "itemId_example"; // String | Id for inventory item sharing. + Integer duration = 90; // Integer | The duration before the sharing pedestal despawns. + try { + InventorySpawn result = apiInstance.shareInventoryItemPedestal(itemId, duration); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#shareInventoryItemPedestal"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **itemId** | **String**| Id for inventory item sharing. | | +| **duration** | **Integer**| The duration before the sharing pedestal despawns. | [default to 90] | + +### Return type + +[**InventorySpawn**](InventorySpawn.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 an InventorySpawn object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **spawnInventoryItem** +> InventorySpawn spawnInventoryItem(id) + +Spawn Inventory Item + +Returns an InventorySpawn object. + +### 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String id = "id_example"; // String | Id for inventory item spawning. + try { + InventorySpawn result = apiInstance.spawnInventoryItem(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#spawnInventoryItem"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| Id for inventory item spawning. | | + +### Return type + +[**InventorySpawn**](InventorySpawn.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 an InventorySpawn object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **unequipOwnInventorySlot** +> String unequipOwnInventorySlot(inventoryItemId) + +Unequip Own Inventory Slot + +Unequips the InventoryItem in the given slot of the inventory of the currently logged in 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + InventoryEquipSlot inventoryItemId = InventoryEquipSlot.fromValue(""); // InventoryEquipSlot | Selector for inventory slot management. + try { + String result = apiInstance.unequipOwnInventorySlot(inventoryItemId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#unequipOwnInventorySlot"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **inventoryItemId** | [**InventoryEquipSlot**](.md)| Selector for inventory slot management. | [default to ] [enum: , drone, portal, warp] | + +### Return type + +**String** + +### 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 string. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **updateOwnInventoryItem** +> InventoryItem updateOwnInventoryItem(inventoryItemId, updateInventoryItemRequest) + +Update Own Inventory Item + +Returns the modified InventoryItem object as held by the currently logged in 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.InventoryApi; + +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"); + + InventoryApi apiInstance = new InventoryApi(defaultClient); + String inventoryItemId = "inventoryItemId_example"; // String | Must be a valid inventory item ID. + UpdateInventoryItemRequest updateInventoryItemRequest = new UpdateInventoryItemRequest(); // UpdateInventoryItemRequest | + try { + InventoryItem result = apiInstance.updateOwnInventoryItem(inventoryItemId, updateInventoryItemRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InventoryApi#updateOwnInventoryItem"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **inventoryItemId** | **String**| Must be a valid inventory item ID. | | +| **updateInventoryItemRequest** | [**UpdateInventoryItemRequest**](UpdateInventoryItemRequest.md)| | [optional] | + +### Return type + +[**InventoryItem**](InventoryItem.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns an InventoryItem object. | - | +| **401** | Error response due to missing auth cookie. | - | + diff --git a/docs/InventoryConsumptionResults.md b/docs/InventoryConsumptionResults.md new file mode 100644 index 00000000..04b9c54a --- /dev/null +++ b/docs/InventoryConsumptionResults.md @@ -0,0 +1,15 @@ + + +# InventoryConsumptionResults + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**errors** | **List<Object>** | | | +|**inventoryItems** | [**List<InventoryItem>**](InventoryItem.md) | | | +|**inventoryItemsCreated** | **Integer** | | | + + + diff --git a/docs/InventoryDefaultAttributesValue.md b/docs/InventoryDefaultAttributesValue.md new file mode 100644 index 00000000..5b9bcc95 --- /dev/null +++ b/docs/InventoryDefaultAttributesValue.md @@ -0,0 +1,14 @@ + + +# InventoryDefaultAttributesValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**defaultValue** | **String** | | [optional] | +|**validator** | [**InventoryDefaultAttributesValueValidator**](InventoryDefaultAttributesValueValidator.md) | | [optional] | + + + diff --git a/docs/InventoryDefaultAttributesValueValidator.md b/docs/InventoryDefaultAttributesValueValidator.md new file mode 100644 index 00000000..d5823c18 --- /dev/null +++ b/docs/InventoryDefaultAttributesValueValidator.md @@ -0,0 +1,13 @@ + + +# InventoryDefaultAttributesValueValidator + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | + + + diff --git a/docs/InventoryDrop.md b/docs/InventoryDrop.md new file mode 100644 index 00000000..979f6ce4 --- /dev/null +++ b/docs/InventoryDrop.md @@ -0,0 +1,26 @@ + + +# InventoryDrop + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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. | | +|**createdAt** | **OffsetDateTime** | | | +|**dropExpiryDate** | **OffsetDateTime** | | | +|**endDropDate** | **OffsetDateTime** | | | +|**id** | **String** | | | +|**isDisabled** | **Boolean** | | | +|**name** | **String** | | | +|**notificationDetails** | [**InventoryNotificationDetails**](InventoryNotificationDetails.md) | | | +|**startDropDate** | **OffsetDateTime** | | | +|**status** | **String** | | | +|**tags** | **List<String>** | | | +|**targetGroup** | **String** | | | +|**templateIds** | **List<String>** | | | +|**updatedAt** | **OffsetDateTime** | | | + + + diff --git a/docs/InventoryEquipSlot.md b/docs/InventoryEquipSlot.md new file mode 100644 index 00000000..68d297cd --- /dev/null +++ b/docs/InventoryEquipSlot.md @@ -0,0 +1,17 @@ + + +# InventoryEquipSlot + +## Enum + + +* `EMPTY` (value: `""`) + +* `DRONE` (value: `"drone"`) + +* `PORTAL` (value: `"portal"`) + +* `WARP` (value: `"warp"`) + + + diff --git a/docs/InventoryFlag.md b/docs/InventoryFlag.md new file mode 100644 index 00000000..b321f41f --- /dev/null +++ b/docs/InventoryFlag.md @@ -0,0 +1,25 @@ + + +# InventoryFlag + +## Enum + + +* `ARCHIVABLE` (value: `"archivable"`) + +* `CLONEABLE` (value: `"cloneable"`) + +* `CONSUMABLE` (value: `"consumable"`) + +* `EQUIPPABLE` (value: `"equippable"`) + +* `INSTANTIATABLE` (value: `"instantiatable"`) + +* `TRASHABLE` (value: `"trashable"`) + +* `UGC` (value: `"ugc"`) + +* `UNIQUE` (value: `"unique"`) + + + diff --git a/docs/InventoryItem.md b/docs/InventoryItem.md new file mode 100644 index 00000000..5e6da27b --- /dev/null +++ b/docs/InventoryItem.md @@ -0,0 +1,37 @@ + + +# InventoryItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**collections** | **List<String>** | | | +|**createdAt** | **OffsetDateTime** | | | +|**defaultAttributes** | [**Map<String, InventoryDefaultAttributesValue>**](InventoryDefaultAttributesValue.md) | | | +|**description** | **String** | | | +|**equipSlot** | **InventoryEquipSlot** | | [optional] | +|**equipSlots** | **List<InventoryEquipSlot>** | | [optional] | +|**expiryDate** | **OffsetDateTime** | | [optional] | +|**flags** | **List<String>** | | | +|**holderId** | **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. | | +|**id** | **String** | | | +|**imageUrl** | **String** | | | +|**isArchived** | **Boolean** | | | +|**isSeen** | **Boolean** | | | +|**itemType** | **InventoryItemType** | | | +|**itemTypeLabel** | **String** | | | +|**metadata** | [**InventoryMetadata**](InventoryMetadata.md) | | | +|**name** | **String** | | | +|**quantifiable** | **Boolean** | | | +|**tags** | **List<String>** | | | +|**templateId** | **String** | | | +|**templateCreatedAt** | **OffsetDateTime** | | | +|**templateUpdatedAt** | **OffsetDateTime** | | | +|**updatedAt** | **OffsetDateTime** | | | +|**userAttributes** | [**InventoryUserAttributes**](InventoryUserAttributes.md) | | | +|**validateUserAttributes** | **Boolean** | | | + + + diff --git a/docs/InventoryItemType.md b/docs/InventoryItemType.md new file mode 100644 index 00000000..c0d6b262 --- /dev/null +++ b/docs/InventoryItemType.md @@ -0,0 +1,23 @@ + + +# InventoryItemType + +## Enum + + +* `BUNDLE` (value: `"bundle"`) + +* `DRONESKIN` (value: `"droneskin"`) + +* `EMOJI` (value: `"emoji"`) + +* `PORTALSKIN` (value: `"portalskin"`) + +* `PROP` (value: `"prop"`) + +* `STICKER` (value: `"sticker"`) + +* `WARPEFFECT` (value: `"warpeffect"`) + + + diff --git a/docs/InventoryMetadata.md b/docs/InventoryMetadata.md new file mode 100644 index 00000000..3615248e --- /dev/null +++ b/docs/InventoryMetadata.md @@ -0,0 +1,20 @@ + + +# InventoryMetadata + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**animated** | **Boolean** | | [optional] | +|**animationStyle** | **String** | | [optional] | +|**assetBundleId** | **String** | | [optional] | +|**fileId** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**inventoryItemsToInstantiate** | **List<String>** | Only in bundles | [optional] | +|**maskTag** | **String** | | [optional] | +|**propId** | **String** | | [optional] | + + + diff --git a/docs/InventoryNotificationDetails.md b/docs/InventoryNotificationDetails.md new file mode 100644 index 00000000..84b54871 --- /dev/null +++ b/docs/InventoryNotificationDetails.md @@ -0,0 +1,15 @@ + + +# InventoryNotificationDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**body** | **String** | | | +|**imageUrl** | **String** | | | +|**title** | **String** | | | + + + diff --git a/docs/InventorySpawn.md b/docs/InventorySpawn.md new file mode 100644 index 00000000..b4f7856f --- /dev/null +++ b/docs/InventorySpawn.md @@ -0,0 +1,14 @@ + + +# InventorySpawn + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**token** | **String** | | | +|**version** | **Integer** | | | + + + diff --git a/docs/InventoryTemplate.md b/docs/InventoryTemplate.md new file mode 100644 index 00000000..24f8f18d --- /dev/null +++ b/docs/InventoryTemplate.md @@ -0,0 +1,30 @@ + + +# InventoryTemplate + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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. | | +|**collections** | **List<String>** | | | +|**createdAt** | **OffsetDateTime** | | | +|**defaultAttributes** | **Object** | | | +|**description** | **String** | | | +|**equipSlots** | **List<String>** | | | +|**flags** | **List<String>** | | | +|**id** | **String** | | | +|**imageUrl** | **String** | | | +|**itemType** | **InventoryItemType** | | | +|**itemTypeLabel** | **String** | | | +|**metadata** | [**InventoryMetadata**](InventoryMetadata.md) | | [optional] | +|**name** | **String** | | | +|**notificationDetails** | [**InventoryNotificationDetails**](InventoryNotificationDetails.md) | | [optional] | +|**status** | **String** | | | +|**tags** | **List<String>** | | | +|**updatedAt** | **OffsetDateTime** | | | +|**validateUserAttributes** | **Boolean** | | | + + + diff --git a/docs/InventoryUserAttributes.md b/docs/InventoryUserAttributes.md new file mode 100644 index 00000000..6c4b6bba --- /dev/null +++ b/docs/InventoryUserAttributes.md @@ -0,0 +1,15 @@ + + +# InventoryUserAttributes + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**primaryColor** | **String** | | [optional] | +|**secondaryColor** | **String** | | [optional] | +|**trailColor** | **String** | | [optional] | + + + diff --git a/docs/InviteApi.md b/docs/InviteApi.md index 27fe0018..ce8a0517 100644 --- a/docs/InviteApi.md +++ b/docs/InviteApi.md @@ -2,18 +2,22 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getInviteMessage**](InviteApi.md#getInviteMessage) | **GET** /message/{userId}/{messageType}/{slot} | Get Invite Message -[**getInviteMessages**](InviteApi.md#getInviteMessages) | **GET** /message/{userId}/{messageType} | List Invite Messages -[**inviteUser**](InviteApi.md#inviteUser) | **POST** /invite/{userId} | Invite User -[**requestInvite**](InviteApi.md#requestInvite) | **POST** /requestInvite/{userId} | Request Invite -[**resetInviteMessage**](InviteApi.md#resetInviteMessage) | **DELETE** /message/{userId}/{messageType}/{slot} | Reset Invite Message -[**respondInvite**](InviteApi.md#respondInvite) | **POST** /invite/{notificationId}/response | Respond Invite -[**updateInviteMessage**](InviteApi.md#updateInviteMessage) | **PUT** /message/{userId}/{messageType}/{slot} | Update Invite Message - - - +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getInviteMessage**](InviteApi.md#getInviteMessage) | **GET** /message/{userId}/{messageType}/{slot} | Get Invite Message | +| [**getInviteMessages**](InviteApi.md#getInviteMessages) | **GET** /message/{userId}/{messageType} | List Invite Messages | +| [**inviteMyselfTo**](InviteApi.md#inviteMyselfTo) | **POST** /invite/myself/to/{worldId}:{instanceId} | Invite Myself To Instance | +| [**inviteUser**](InviteApi.md#inviteUser) | **POST** /invite/{userId} | Invite User | +| [**inviteUserWithPhoto**](InviteApi.md#inviteUserWithPhoto) | **POST** /invite/{userId}/photo | Invite User with photo | +| [**requestInvite**](InviteApi.md#requestInvite) | **POST** /requestInvite/{userId} | Request Invite | +| [**requestInviteWithPhoto**](InviteApi.md#requestInviteWithPhoto) | **POST** /requestInvite/{userId}/photo | Request Invite with photo | +| [**resetInviteMessage**](InviteApi.md#resetInviteMessage) | **DELETE** /message/{userId}/{messageType}/{slot} | Reset Invite Message | +| [**respondInvite**](InviteApi.md#respondInvite) | **POST** /invite/{notificationId}/response | Respond Invite | +| [**respondInviteWithPhoto**](InviteApi.md#respondInviteWithPhoto) | **POST** /invite/{notificationId}/response/photo | Respond Invite with photo | +| [**updateInviteMessage**](InviteApi.md#updateInviteMessage) | **PUT** /message/{userId}/{messageType}/{slot} | Update Invite Message | + + + # **getInviteMessage** > InviteMessage getInviteMessage(userId, messageType, slot) @@ -36,12 +40,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -49,9 +47,9 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InviteApi apiInstance = new InviteApi(defaultClient); - String userId = "userId_example"; // String | - String messageType = "message"; // String | - Integer slot = 56; // Integer | + String userId = "userId_example"; // String | Must be a valid user ID. + InviteMessageType messageType = InviteMessageType.fromValue("message"); // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. + Integer slot = 56; // Integer | The message slot to fetch of a given message type. try { InviteMessage result = apiInstance.getInviteMessage(userId, messageType, slot); System.out.println(result); @@ -68,11 +66,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | - **messageType** | **String**| | [enum: message, response, request, requestResponse] - **slot** | **Integer**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **messageType** | [**InviteMessageType**](.md)| The type of message to fetch, must be a valid InviteMessageType. | [default to message] [enum: message, request, requestResponse, response] | +| **slot** | **Integer**| The message slot to fetch of a given message type. | | ### Return type @@ -80,7 +78,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -90,12 +88,12 @@ Name | Type | Description | Notes ### HTTP 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. | - | -**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. | - | +| **200** | Returns a single InviteMessage object. | - | +| **400** | Error response when trying to get an Invite Message with a negative slot number. | - | +| **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) @@ -118,12 +116,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -131,8 +123,8 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InviteApi apiInstance = new InviteApi(defaultClient); - String userId = "userId_example"; // String | - String messageType = "message"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. + InviteMessageType messageType = InviteMessageType.fromValue("message"); // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. try { List result = apiInstance.getInviteMessages(userId, messageType); System.out.println(result); @@ -149,10 +141,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | - **messageType** | **String**| | [enum: message, response, request, requestResponse] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **messageType** | [**InviteMessageType**](.md)| The type of message to fetch, must be a valid InviteMessageType. | [default to message] [enum: message, request, requestResponse, response] | ### Return type @@ -160,7 +152,80 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[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 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. | - | + + +# **inviteMyselfTo** +> SentNotification inviteMyselfTo(worldId, instanceId) + +Invite Myself To Instance + +Sends self an invite to an instance + +### 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.InviteApi; + +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"); + + InviteApi apiInstance = new InviteApi(defaultClient); + String worldId = "worldId_example"; // String | Must be a valid world ID. + String instanceId = "instanceId_example"; // String | Must be a valid instance ID. + try { + SentNotification result = apiInstance.inviteMyselfTo(worldId, instanceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InviteApi#inviteMyselfTo"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **instanceId** | **String**| Must be a valid instance ID. | | + +### Return type + +[**SentNotification**](SentNotification.md) + +### Authorization + +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -170,13 +235,13 @@ Name | Type | Description | Notes ### HTTP 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. | - | +| **200** | Returns a single SentNotification object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **404** | Error response due to non existent instance | - | - + # **inviteUser** -> Notification inviteUser(userId, inviteRequest) +> SentNotification inviteUser(userId, inviteRequest) Invite User @@ -197,12 +262,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -210,10 +269,10 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InviteApi apiInstance = new InviteApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. InviteRequest inviteRequest = new InviteRequest(); // InviteRequest | Slot number of the Invite Message to use when inviting a user. try { - Notification result = apiInstance.inviteUser(userId, inviteRequest); + SentNotification result = apiInstance.inviteUser(userId, inviteRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling InviteApi#inviteUser"); @@ -228,18 +287,18 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | - **inviteRequest** | [**InviteRequest**](InviteRequest.md)| Slot number of the Invite Message to use when inviting a user. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **inviteRequest** | [**InviteRequest**](InviteRequest.md)| Slot number of the Invite Message to use when inviting a user. | | ### Return type -[**Notification**](Notification.md) +[**SentNotification**](SentNotification.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -249,10 +308,84 @@ Name | Type | Description | Notes ### 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 SentNotification object. | - | +| **403** | Error response when trying to invite someone whom you are not friends with. | - | + + +# **inviteUserWithPhoto** +> SentNotification inviteUserWithPhoto(userId, data, image) + +Invite User with photo + +Sends an photo invite to a user. Returns the Notification of type `invite` that was sent. + +### 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.InviteApi; + +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"); + + InviteApi apiInstance = new InviteApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + InviteRequest data = new InviteRequest(); // InviteRequest | + File image = new File("/path/to/file"); // File | The binary blob of the png file. + try { + SentNotification result = apiInstance.inviteUserWithPhoto(userId, data, image); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InviteApi#inviteUserWithPhoto"); + 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. | | +| **data** | [**InviteRequest**](InviteRequest.md)| | | +| **image** | **File**| The binary blob of the png file. | | + +### Return type + +[**SentNotification**](SentNotification.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) @@ -275,12 +408,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -288,7 +415,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InviteApi apiInstance = new InviteApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. RequestInviteRequest requestInviteRequest = new RequestInviteRequest(); // RequestInviteRequest | Slot number of the Request Message to use when request an invite. try { Notification result = apiInstance.requestInvite(userId, requestInviteRequest); @@ -306,10 +433,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | - **requestInviteRequest** | [**RequestInviteRequest**](RequestInviteRequest.md)| Slot number of the Request Message to use when request an invite. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **requestInviteRequest** | [**RequestInviteRequest**](RequestInviteRequest.md)| Slot number of the Request Message to use when request an invite. | [optional] | ### Return type @@ -317,7 +444,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -327,10 +454,84 @@ Name | Type | Description | Notes ### 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) + +Request Invite with photo + +Requests with photo an invite from a user. Returns the Notification of type `requestInvite` that was sent. + +### 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.InviteApi; + +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"); - + InviteApi apiInstance = new InviteApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + RequestInviteRequest data = new RequestInviteRequest(); // RequestInviteRequest | + File image = new File("/path/to/file"); // File | The binary blob of the png file. + try { + Notification result = apiInstance.requestInviteWithPhoto(userId, data, image); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InviteApi#requestInviteWithPhoto"); + 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. | | +| **data** | [**RequestInviteRequest**](RequestInviteRequest.md)| | | +| **image** | **File**| The binary blob of the png file. | | + +### Return type + +[**Notification**](Notification.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) @@ -353,12 +554,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -366,9 +561,9 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InviteApi apiInstance = new InviteApi(defaultClient); - String userId = "userId_example"; // String | - String messageType = "message"; // String | - Integer slot = 56; // Integer | + String userId = "userId_example"; // String | Must be a valid user ID. + InviteMessageType messageType = InviteMessageType.fromValue("message"); // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. + Integer slot = 56; // Integer | The message slot to fetch of a given message type. try { List result = apiInstance.resetInviteMessage(userId, messageType, slot); System.out.println(result); @@ -385,11 +580,11 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | - **messageType** | **String**| | [enum: message, response, request, requestResponse] - **slot** | **Integer**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **messageType** | [**InviteMessageType**](.md)| The type of message to fetch, must be a valid InviteMessageType. | [default to message] [enum: message, request, requestResponse, response] | +| **slot** | **Integer**| The message slot to fetch of a given message type. | | ### Return type @@ -397,7 +592,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -407,19 +602,19 @@ Name | Type | Description | Notes ### HTTP 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. | - | -**429** | Error response when trying to update an Invite Message before the cooldown has expired. | - | +| **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 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) Respond Invite -Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. +Respond to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead. ### Example ```java @@ -436,12 +631,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -449,7 +638,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InviteApi apiInstance = new InviteApi(defaultClient); - String notificationId = "notificationId_example"; // String | + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. InviteResponse inviteResponse = new InviteResponse(); // InviteResponse | Slot number of the Response Message to use when responding to a user. try { Notification result = apiInstance.respondInvite(notificationId, inviteResponse); @@ -467,10 +656,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notificationId** | **String**| | - **inviteResponse** | [**InviteResponse**](InviteResponse.md)| Slot number of the Response Message to use when responding to a user. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | +| **inviteResponse** | [**InviteResponse**](InviteResponse.md)| Slot number of the Response Message to use when responding to a user. | | ### Return type @@ -478,7 +667,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -488,10 +677,84 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Notifcation object. | - | -**400** | Error response when trying to respond to an invite and something went wrong. | - | +| **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) + +Respond Invite with photo + +Respond with photo to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead.' + +### 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.InviteApi; + +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"); + + InviteApi apiInstance = new InviteApi(defaultClient); + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + InviteResponse data = new InviteResponse(); // InviteResponse | + File image = new File("/path/to/file"); // File | The binary blob of the png file. + try { + Notification result = apiInstance.respondInviteWithPhoto(notificationId, data, image); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InviteApi#respondInviteWithPhoto"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | +| **data** | [**InviteResponse**](InviteResponse.md)| | | +| **image** | **File**| The binary blob of the png file. | | + +### Return type + +[**Notification**](Notification.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) @@ -514,12 +777,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -527,9 +784,9 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); InviteApi apiInstance = new InviteApi(defaultClient); - String userId = "userId_example"; // String | - String messageType = "message"; // String | - Integer slot = 56; // Integer | + String userId = "userId_example"; // String | Must be a valid user ID. + InviteMessageType messageType = InviteMessageType.fromValue("message"); // InviteMessageType | The type of message to fetch, must be a valid InviteMessageType. + Integer slot = 56; // Integer | The message slot to fetch of a given message type. UpdateInviteMessageRequest updateInviteMessageRequest = new UpdateInviteMessageRequest(); // UpdateInviteMessageRequest | Message of what to set the invite message to. try { List result = apiInstance.updateInviteMessage(userId, messageType, slot, updateInviteMessageRequest); @@ -547,12 +804,12 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | - **messageType** | **String**| | [enum: message, response, request, requestResponse] - **slot** | **Integer**| | - **updateInviteMessageRequest** | [**UpdateInviteMessageRequest**](UpdateInviteMessageRequest.md)| Message of what to set the invite message to. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **messageType** | [**InviteMessageType**](.md)| The type of message to fetch, must be a valid InviteMessageType. | [default to message] [enum: message, request, requestResponse, response] | +| **slot** | **Integer**| The message slot to fetch of a given message type. | | +| **updateInviteMessageRequest** | [**UpdateInviteMessageRequest**](UpdateInviteMessageRequest.md)| Message of what to set the invite message to. | [optional] | ### Return type @@ -560,7 +817,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -570,8 +827,8 @@ Name | Type | Description | Notes ### HTTP 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. | - | -**429** | Error response when trying to update an Invite Message before the cooldown has expired. | - | +| **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. | - | +| **429** | Error response when trying to update an Invite Message before the cooldown has expired. | - | diff --git a/docs/InviteMessage.md b/docs/InviteMessage.md index 9d32a359..77ee5709 100644 --- a/docs/InviteMessage.md +++ b/docs/InviteMessage.md @@ -3,17 +3,18 @@ # InviteMessage + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**canBeUpdated** | **Boolean** | | -**id** | **String** | | -**message** | **String** | | -**messageType** | **InviteMessageType** | | -**remainingCooldownMinutes** | **Integer** | Changes to 60 when updated, although probably server-side configurable. | -**slot** | **Integer** | | -**updatedAt** | **OffsetDateTime** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**canBeUpdated** | **Boolean** | | | +|**id** | **String** | | | +|**message** | **String** | | | +|**messageType** | **InviteMessageType** | | | +|**remainingCooldownMinutes** | **Integer** | Changes to 60 when updated, although probably server-side configurable. | | +|**slot** | **Integer** | | | +|**updatedAt** | **OffsetDateTime** | | | diff --git a/docs/InviteMessageType.md b/docs/InviteMessageType.md index b5148c43..7d1d2c81 100644 --- a/docs/InviteMessageType.md +++ b/docs/InviteMessageType.md @@ -7,11 +7,11 @@ * `MESSAGE` (value: `"message"`) -* `RESPONSE` (value: `"response"`) - * `REQUEST` (value: `"request"`) -* `REQUESTRESPONSE` (value: `"requestResponse"`) +* `REQUEST_RESPONSE` (value: `"requestResponse"`) + +* `RESPONSE` (value: `"response"`) diff --git a/docs/InviteRequest.md b/docs/InviteRequest.md index f2e295e9..e24963bc 100644 --- a/docs/InviteRequest.md +++ b/docs/InviteRequest.md @@ -5,10 +5,10 @@ ## 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. | -**messageSlot** | **Integer** | | [optional] +| 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. | | +|**messageSlot** | **Integer** | | [optional] | diff --git a/docs/InviteResponse.md b/docs/InviteResponse.md index 89a09aa5..cfb48a33 100644 --- a/docs/InviteResponse.md +++ b/docs/InviteResponse.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**responseSlot** | **Integer** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseSlot** | **Integer** | | | diff --git a/docs/InviteUserWithPhotoRequest.md b/docs/InviteUserWithPhotoRequest.md new file mode 100644 index 00000000..c6b2cbd2 --- /dev/null +++ b/docs/InviteUserWithPhotoRequest.md @@ -0,0 +1,14 @@ + + +# InviteUserWithPhotoRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**InviteRequest**](InviteRequest.md) | | | +|**image** | **File** | The binary blob of the png file. | | + + + diff --git a/docs/Jam.md b/docs/Jam.md new file mode 100644 index 00000000..30e6be53 --- /dev/null +++ b/docs/Jam.md @@ -0,0 +1,23 @@ + + +# Jam + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | | | +|**id** | **String** | | | +|**isVisible** | **Boolean** | | | +|**moreInfo** | **String** | | | +|**state** | **String** | One of: - submissions_open - closed | | +|**stateChangeDates** | [**JamStateChangeDates**](JamStateChangeDates.md) | | | +|**submissionContentGateDate** | **OffsetDateTime** | | | +|**submissionContentGated** | **Boolean** | | | +|**title** | **String** | | | +|**updatedAt** | **OffsetDateTime** | | | + + + diff --git a/docs/JamStateChangeDates.md b/docs/JamStateChangeDates.md new file mode 100644 index 00000000..f00b636b --- /dev/null +++ b/docs/JamStateChangeDates.md @@ -0,0 +1,16 @@ + + +# JamStateChangeDates + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**closed** | **OffsetDateTime** | | [optional] | +|**submissionsClosed** | **OffsetDateTime** | | [optional] | +|**submissionsOpened** | **OffsetDateTime** | | [optional] | +|**winnersSelected** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/JamSubmission.md b/docs/JamSubmission.md new file mode 100644 index 00000000..4c03d947 --- /dev/null +++ b/docs/JamSubmission.md @@ -0,0 +1,20 @@ + + +# JamSubmission + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contentId** | **String** | Either world ID or avatar ID | | +|**createdAt** | **OffsetDateTime** | | | +|**description** | **String** | | | +|**id** | **String** | | | +|**jamId** | **String** | | | +|**ratingScore** | **Integer** | | [optional] | +|**submitterId** | **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/JamsApi.md b/docs/JamsApi.md new file mode 100644 index 00000000..8ee060c0 --- /dev/null +++ b/docs/JamsApi.md @@ -0,0 +1,373 @@ +# JamsApi + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteJamSubmission**](JamsApi.md#deleteJamSubmission) | **DELETE** /jams/{jamId}/submissions/{jamSubmissionId} | Delete Jam Submission | +| [**getJam**](JamsApi.md#getJam) | **GET** /jams/{jamId} | Show jam information | +| [**getJamSubmissions**](JamsApi.md#getJamSubmissions) | **GET** /jams/{jamId}/submissions | Show jam submissions | +| [**getJams**](JamsApi.md#getJams) | **GET** /jams | Show jams list | +| [**submitJamContent**](JamsApi.md#submitJamContent) | **POST** /jams/{jamId}/submissions | Submit Jam Content | + + + +# **deleteJamSubmission** +> Success deleteJamSubmission(jamId, jamSubmissionId) + +Delete Jam Submission + +Withdraws a content submission from a jam. + +### 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.JamsApi; + +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"); + + JamsApi apiInstance = new JamsApi(defaultClient); + String jamId = "jamId_example"; // String | Must be a valid jam ID. + String jamSubmissionId = "jamSubmissionId_example"; // String | Must be a valid jam submission ID. + try { + Success result = apiInstance.deleteJamSubmission(jamId, jamSubmissionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JamsApi#deleteJamSubmission"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **jamId** | **String**| Must be a valid jam ID. | | +| **jamSubmissionId** | **String**| Must be a valid jam submission ID. | | + +### Return type + +[**Success**](Success.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 an Success object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response due to missing permissions. | - | +| **404** | Error response when trying to show information about a non-existent jam. | - | + + +# **getJam** +> Jam getJam(jamId) + +Show jam information + +Returns a jam. + +### 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.JamsApi; + +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"); + + JamsApi apiInstance = new JamsApi(defaultClient); + String jamId = "jamId_example"; // String | Must be a valid jam ID. + try { + Jam result = apiInstance.getJam(jamId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JamsApi#getJam"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **jamId** | **String**| Must be a valid jam ID. | | + +### Return type + +[**Jam**](Jam.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 Jam object. | - | +| **404** | Error response when trying to show information about a non-existent jam. | - | + + +# **getJamSubmissions** +> List<JamSubmission> getJamSubmissions(jamId, contentId, submitterId) + +Show jam submissions + +Returns all submissions of a jam. Can filter by contentId (for world or avatar jams) or submitterId (for a participant). + +### 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.JamsApi; + +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"); + + JamsApi apiInstance = new JamsApi(defaultClient); + String jamId = "jamId_example"; // String | Must be a valid jam ID. + String contentId = "contentId_example"; // String | Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. + String submitterId = "submitterId_example"; // String | Must be a valid user ID. + try { + List result = apiInstance.getJamSubmissions(jamId, contentId, submitterId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JamsApi#getJamSubmissions"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **jamId** | **String**| Must be a valid jam ID. | | +| **contentId** | **String**| Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. | [optional] | +| **submitterId** | **String**| Must be a valid user ID. | [optional] | + +### Return type + +[**List<JamSubmission>**](JamSubmission.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 list of JamSubmission objects. | - | +| **404** | Error response when trying to show information about a non-existent jam. | - | + + +# **getJams** +> List<Jam> getJams(type) + +Show jams list + +Lists World Jams or Avatar Jams, both currently running and ones that have ended. `isActive` is used to select only active or already ended jams. `type` is used to select only world or avatar jams, and can only take `world` or `avatar`. `` + +### 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.JamsApi; + +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"); + + JamsApi apiInstance = new JamsApi(defaultClient); + String type = "avatar"; // String | Only show jams of this type (`avatar` or `world`). + try { + List result = apiInstance.getJams(type); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JamsApi#getJams"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **type** | **String**| Only show jams of this type (`avatar` or `world`). | [optional] | + +### Return type + +[**List<Jam>**](Jam.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 list of Jam objects. | - | + + +# **submitJamContent** +> JamSubmission submitJamContent(jamId, createJamSubmissionRequest) + +Submit Jam Content + +Submits content to a jam. The content must have been uploaded by the submitter, and both the content upload and jam submission must be made within the jam's designated times. + +### 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.JamsApi; + +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"); + + JamsApi apiInstance = new JamsApi(defaultClient); + String jamId = "jamId_example"; // String | Must be a valid jam ID. + CreateJamSubmissionRequest createJamSubmissionRequest = new CreateJamSubmissionRequest(); // CreateJamSubmissionRequest | + try { + JamSubmission result = apiInstance.submitJamContent(jamId, createJamSubmissionRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JamsApi#submitJamContent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **jamId** | **String**| Must be a valid jam ID. | | +| **createJamSubmissionRequest** | [**CreateJamSubmissionRequest**](CreateJamSubmissionRequest.md)| | [optional] | + +### Return type + +[**JamSubmission**](JamSubmission.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + diff --git a/docs/JoinGroupRequest.md b/docs/JoinGroupRequest.md new file mode 100644 index 00000000..887f555c --- /dev/null +++ b/docs/JoinGroupRequest.md @@ -0,0 +1,13 @@ + + +# JoinGroupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**inviteId** | **String** | | [optional] | + + + diff --git a/docs/License.md b/docs/License.md index 048c0331..5c7e72a1 100644 --- a/docs/License.md +++ b/docs/License.md @@ -5,12 +5,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**forId** | **String** | Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. | -**forType** | **LicenseType** | | -**forName** | **String** | | -**forAction** | **LicenseAction** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**forAction** | **LicenseAction** | | | +|**forId** | **String** | Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. | | +|**forName** | **String** | | | +|**forType** | **LicenseType** | | | diff --git a/docs/LicenseAction.md b/docs/LicenseAction.md index dda3dd03..4cc0f379 100644 --- a/docs/LicenseAction.md +++ b/docs/LicenseAction.md @@ -5,9 +5,9 @@ ## Enum -* `WEAR` (value: `"wear"`) - * `HAVE` (value: `"have"`) +* `WEAR` (value: `"wear"`) + diff --git a/docs/LicenseGroup.md b/docs/LicenseGroup.md index cffbf0bf..8dd1309e 100644 --- a/docs/LicenseGroup.md +++ b/docs/LicenseGroup.md @@ -3,14 +3,15 @@ # LicenseGroup + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**description** | **String** | | -**licenses** | [**List<License>**](License.md) | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | | | +|**id** | **String** | | | +|**licenses** | [**List<License>**](License.md) | | | +|**name** | **String** | | | 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/LimitedGroup.md b/docs/LimitedGroup.md new file mode 100644 index 00000000..2cefda25 --- /dev/null +++ b/docs/LimitedGroup.md @@ -0,0 +1,29 @@ + + +# LimitedGroup + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bannerId** | **String** | | [optional] | +|**bannerUrl** | **String** | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**description** | **String** | | [optional] | +|**discriminator** | **String** | | [optional] | +|**galleries** | [**List<GroupGallery>**](GroupGallery.md) | | [optional] | +|**iconId** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**isSearchable** | **Boolean** | | [optional] | +|**memberCount** | **Integer** | | [optional] | +|**membershipStatus** | **GroupMemberStatus** | | [optional] | +|**name** | **String** | | [optional] | +|**ownerId** | **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] | +|**rules** | **String** | | [optional] | +|**shortCode** | **String** | | [optional] | +|**tags** | **List<String>** | | [optional] | + + + diff --git a/docs/LimitedUnityPackage.md b/docs/LimitedUnityPackage.md index 3791fce1..91efe8e9 100644 --- a/docs/LimitedUnityPackage.md +++ b/docs/LimitedUnityPackage.md @@ -3,12 +3,14 @@ # LimitedUnityPackage + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | -**unityVersion** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**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`. | | +|**unityVersion** | **String** | | | diff --git a/docs/LimitedUser.md b/docs/LimitedUser.md deleted file mode 100644 index 19ccf4fd..00000000 --- a/docs/LimitedUser.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# LimitedUser - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bio** | **String** | | [optional] -**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | -**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | -**developerType** | **DeveloperType** | | -**displayName** | **String** | | -**fallbackAvatar** | **String** | | -**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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | -**profilePicOverride** | **String** | | -**status** | **UserStatus** | | -**statusDescription** | **String** | | -**tags** | **List<String>** | <- Always empty. | -**userIcon** | **String** | | -**username** | **String** | | -**location** | **String** | | [optional] -**friendKey** | **String** | | [optional] - - - diff --git a/docs/LimitedUserFriend.md b/docs/LimitedUserFriend.md new file mode 100644 index 00000000..21aeb083 --- /dev/null +++ b/docs/LimitedUserFriend.md @@ -0,0 +1,36 @@ + + +# LimitedUserFriend + +User object received when querying your friends list + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bio** | **String** | | [optional] | +|**bioLinks** | **List<String>** | | [optional] | +|**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | [optional] | +|**currentAvatarTags** | **List<String>** | | [optional] | +|**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | [optional] | +|**developerType** | **DeveloperType** | | | +|**displayName** | **String** | | | +|**friendKey** | **String** | | | +|**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. | | +|**imageUrl** | **String** | | | +|**isFriend** | **Boolean** | | | +|**lastActivity** | **OffsetDateTime** | | | +|**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`. | | +|**location** | **String** | | | +|**platform** | **String** | | | +|**profilePicOverride** | **String** | | [optional] | +|**profilePicOverrideThumbnail** | **String** | | [optional] | +|**status** | **UserStatus** | | | +|**statusDescription** | **String** | | | +|**tags** | **List<String>** | <- Always empty. | | +|**userIcon** | **String** | | [optional] | + + + diff --git a/docs/LimitedUserGroups.md b/docs/LimitedUserGroups.md new file mode 100644 index 00000000..60805e16 --- /dev/null +++ b/docs/LimitedUserGroups.md @@ -0,0 +1,30 @@ + + +# LimitedUserGroups + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bannerId** | **String** | | [optional] | +|**bannerUrl** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**discriminator** | **String** | | [optional] | +|**groupId** | **String** | | [optional] | +|**iconId** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**isRepresenting** | **Boolean** | | [optional] | +|**lastPostCreatedAt** | **OffsetDateTime** | | [optional] | +|**lastPostReadAt** | **OffsetDateTime** | | [optional] | +|**memberCount** | **Integer** | | [optional] | +|**memberVisibility** | **String** | | [optional] | +|**mutualGroup** | **Boolean** | | [optional] | +|**name** | **String** | | [optional] | +|**ownerId** | **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] | +|**privacy** | **String** | | [optional] | +|**shortCode** | **String** | | [optional] | + + + diff --git a/docs/LimitedUserInstance.md b/docs/LimitedUserInstance.md new file mode 100644 index 00000000..160df64d --- /dev/null +++ b/docs/LimitedUserInstance.md @@ -0,0 +1,40 @@ + + +# LimitedUserInstance + +User object received when querying your own instance + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ageVerificationStatus** | **AgeVerificationStatus** | | | +|**ageVerified** | **Boolean** | `true` if, user is age verified (not 18+). | | +|**allowAvatarCopying** | **Boolean** | | | +|**bio** | **String** | | [optional] | +|**bioLinks** | **List<String>** | | [optional] | +|**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | +|**currentAvatarTags** | **List<String>** | | | +|**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | +|**dateJoined** | **OffsetDateTime** | | | +|**developerType** | **DeveloperType** | | | +|**displayName** | **String** | | | +|**friendKey** | **String** | | | +|**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. | | +|**imageUrl** | **String** | | [optional] | +|**isFriend** | **Boolean** | | | +|**lastActivity** | **OffsetDateTime** | | | +|**lastMobile** | **OffsetDateTime** | | [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`. | | +|**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] | +|**profilePicOverride** | **String** | | [optional] | +|**profilePicOverrideThumbnail** | **String** | | [optional] | +|**pronouns** | **String** | | | +|**state** | **UserState** | | [optional] | +|**status** | **UserStatus** | | | +|**statusDescription** | **String** | | | +|**tags** | **List<String>** | | | +|**userIcon** | **String** | | [optional] | + + + diff --git a/docs/LimitedUserSearch.md b/docs/LimitedUserSearch.md new file mode 100644 index 00000000..0d7fa952 --- /dev/null +++ b/docs/LimitedUserSearch.md @@ -0,0 +1,36 @@ + + +# LimitedUserSearch + +User object received when searching + +## Properties + +| 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. | | +|**currentAvatarTags** | **List<String>** | | | +|**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** | | | +|**statusDescription** | **String** | | | +|**tags** | **List<String>** | <- Always empty. | | +|**userIcon** | **String** | | [optional] | + + + diff --git a/docs/LimitedWorld.md b/docs/LimitedWorld.md index aba89ebc..c6f0a946 100644 --- a/docs/LimitedWorld.md +++ b/docs/LimitedWorld.md @@ -3,29 +3,36 @@ # LimitedWorld + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorId** | **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. | -**authorName** | **String** | | -**capacity** | **Integer** | | -**createdAt** | **OffsetDateTime** | | -**favorites** | **Integer** | | -**heat** | **Integer** | | -**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**imageUrl** | **String** | | -**labsPublicationDate** | **String** | | -**name** | **String** | | -**occupants** | **Integer** | | -**organization** | **String** | | -**popularity** | **Integer** | | -**publicationDate** | **String** | | -**releaseStatus** | **ReleaseStatus** | | -**tags** | **List<String>** | | -**thumbnailImageUrl** | **String** | | -**unityPackages** | [**List<LimitedUnityPackage>**](LimitedUnityPackage.md) | | -**updatedAt** | **OffsetDateTime** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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. | | +|**authorName** | **String** | | | +|**capacity** | **Integer** | | | +|**createdAt** | **OffsetDateTime** | | | +|**defaultContentSettings** | [**InstanceContentSettings**](InstanceContentSettings.md) | | [optional] | +|**favorites** | **Integer** | | | +|**heat** | **Integer** | | | +|**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**imageUrl** | **String** | | | +|**labsPublicationDate** | **String** | | | +|**name** | **String** | | | +|**occupants** | **Integer** | | | +|**organization** | **String** | | | +|**popularity** | **Integer** | | | +|**previewYoutubeId** | **String** | | [optional] | +|**publicationDate** | **String** | | | +|**recommendedCapacity** | **Integer** | | [optional] | +|**releaseStatus** | **ReleaseStatus** | | | +|**storeId** | **String** | | [optional] | +|**tags** | **List<String>** | | | +|**thumbnailImageUrl** | **String** | | | +|**udonProducts** | **List<String>** | | [optional] | +|**unityPackages** | [**List<LimitedUnityPackage>**](LimitedUnityPackage.md) | | | +|**updatedAt** | **OffsetDateTime** | | | +|**visits** | **Integer** | | [optional] | diff --git a/docs/MIMEType.md b/docs/MIMEType.md index 50b1fd00..df7dfc12 100644 --- a/docs/MIMEType.md +++ b/docs/MIMEType.md @@ -5,33 +5,35 @@ ## Enum -* `IMAGE_JPEG` (value: `"image/jpeg"`) +* `APPLICATION_GZIP` (value: `"application/gzip"`) -* `IMAGE_JPG` (value: `"image/jpg"`) +* `APPLICATION_OCTET_STREAM` (value: `"application/octet-stream"`) -* `IMAGE_PNG` (value: `"image/png"`) +* `APPLICATION_X_AVATAR` (value: `"application/x-avatar"`) -* `IMAGE_WEBP` (value: `"image/webp"`) +* `APPLICATION_X_PROP` (value: `"application/x-prop"`) -* `IMAGE_GIF` (value: `"image/gif"`) +* `APPLICATION_X_RSYNC_DELTA` (value: `"application/x-rsync-delta"`) -* `IMAGE_BMP` (value: `"image/bmp"`) +* `APPLICATION_X_RSYNC_SIGNATURE` (value: `"application/x-rsync-signature"`) -* `IMAGE_SVG_XML` (value: `"image/svg+xml"`) +* `APPLICATION_X_WORLD` (value: `"application/x-world"`) -* `IMAGE_TIFF` (value: `"image/tiff"`) +* `IMAGE_BMP` (value: `"image/bmp"`) -* `APPLICATION_X_AVATAR` (value: `"application/x-avatar"`) +* `IMAGE_GIF` (value: `"image/gif"`) -* `APPLICATION_X_WORLD` (value: `"application/x-world"`) +* `IMAGE_JPEG` (value: `"image/jpeg"`) -* `APPLICATION_GZIP` (value: `"application/gzip"`) +* `IMAGE_JPG` (value: `"image/jpg"`) -* `APPLICATION_X_RSYNC_SIGNATURE` (value: `"application/x-rsync-signature"`) +* `IMAGE_PNG` (value: `"image/png"`) -* `APPLICATION_X_RSYNC_DELTA` (value: `"application/x-rsync-delta"`) +* `IMAGE_SVG_XML` (value: `"image/svg+xml"`) -* `APPLICATION_OCTET_STREAM` (value: `"application/octet-stream"`) +* `IMAGE_TIFF` (value: `"image/tiff"`) + +* `IMAGE_WEBP` (value: `"image/webp"`) diff --git a/docs/SystemApi.md b/docs/MiscellaneousApi.md similarity index 50% rename from docs/SystemApi.md rename to docs/MiscellaneousApi.md index b06acf35..c648369d 100644 --- a/docs/SystemApi.md +++ b/docs/MiscellaneousApi.md @@ -1,19 +1,87 @@ -# SystemApi +# MiscellaneousApi All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getCSS**](SystemApi.md#getCSS) | **GET** /css/app.css | Download CSS -[**getConfig**](SystemApi.md#getConfig) | **GET** /config | Fetch API Config -[**getCurrentOnlineUsers**](SystemApi.md#getCurrentOnlineUsers) | **GET** /visits | Current Online Users -[**getHealth**](SystemApi.md#getHealth) | **GET** /health | Check API Health -[**getInfoPush**](SystemApi.md#getInfoPush) | **GET** /infoPush | Show Information Notices -[**getJavaScript**](SystemApi.md#getJavaScript) | **GET** /js/app.js | Download JavaScript -[**getSystemTime**](SystemApi.md#getSystemTime) | **GET** /time | Current System Time +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getAssignedPermissions**](MiscellaneousApi.md#getAssignedPermissions) | **GET** /auth/permissions | Get Assigned Permissions | +| [**getCSS**](MiscellaneousApi.md#getCSS) | **GET** /css/app.css | Download CSS | +| [**getConfig**](MiscellaneousApi.md#getConfig) | **GET** /config | Fetch API Config | +| [**getCurrentOnlineUsers**](MiscellaneousApi.md#getCurrentOnlineUsers) | **GET** /visits | Current Online Users | +| [**getHealth**](MiscellaneousApi.md#getHealth) | **GET** /health | Check API Health | +| [**getInfoPush**](MiscellaneousApi.md#getInfoPush) | **GET** /infoPush | Show Information Notices | +| [**getJavaScript**](MiscellaneousApi.md#getJavaScript) | **GET** /js/app.js | Download JavaScript | +| [**getPermission**](MiscellaneousApi.md#getPermission) | **GET** /permissions/{permissionId} | Get Permission | +| [**getSystemTime**](MiscellaneousApi.md#getSystemTime) | **GET** /time | Current System Time | - + +# **getAssignedPermissions** +> List<Permission> getAssignedPermissions() + +Get Assigned Permissions + +Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. + +### 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.MiscellaneousApi; + +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"); + + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); + try { + List result = apiInstance.getAssignedPermissions(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#getAssignedPermissions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<Permission>**](Permission.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 list of Permission objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + # **getCSS** > String getCSS(variant, branch) @@ -28,21 +96,21 @@ import io.github.vrchatapi.ApiClient; import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Configuration; import io.github.vrchatapi.models.*; -import io.github.vrchatapi.api.SystemApi; +import io.github.vrchatapi.api.MiscellaneousApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - SystemApi apiInstance = new SystemApi(defaultClient); - String variant = "public"; // String | Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); + String variant = "internal"; // String | Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. String branch = "main"; // String | Specifies which git branch the site should load frontend source code from. try { String result = apiInstance.getCSS(variant, branch); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SystemApi#getCSS"); + System.err.println("Exception when calling MiscellaneousApi#getCSS"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -54,10 +122,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **variant** | **String**| Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. | [optional] [default to public] [enum: public, internal] - **branch** | **String**| Specifies which git branch the site should load frontend source code from. | [optional] [default to main] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **variant** | **String**| Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. | [optional] [default to public] [enum: internal, public] | +| **branch** | **String**| Specifies which git branch the site should load frontend source code from. | [optional] [default to main] | ### Return type @@ -75,10 +143,10 @@ No authorization required ### HTTP 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. | - | +| **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() @@ -93,19 +161,19 @@ import io.github.vrchatapi.ApiClient; import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Configuration; import io.github.vrchatapi.models.*; -import io.github.vrchatapi.api.SystemApi; +import io.github.vrchatapi.api.MiscellaneousApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - SystemApi apiInstance = new SystemApi(defaultClient); + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); try { APIConfig result = apiInstance.getConfig(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SystemApi#getConfig"); + System.err.println("Exception when calling MiscellaneousApi#getConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -134,9 +202,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the API's config. | * Set-Cookie -
| +| **200** | Returns the API's config. | - | - + # **getCurrentOnlineUsers** > Integer getCurrentOnlineUsers() @@ -151,19 +219,19 @@ import io.github.vrchatapi.ApiClient; import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Configuration; import io.github.vrchatapi.models.*; -import io.github.vrchatapi.api.SystemApi; +import io.github.vrchatapi.api.MiscellaneousApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - SystemApi apiInstance = new SystemApi(defaultClient); + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); try { Integer result = apiInstance.getCurrentOnlineUsers(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SystemApi#getCurrentOnlineUsers"); + System.err.println("Exception when calling MiscellaneousApi#getCurrentOnlineUsers"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -192,9 +260,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | +| **200** | OK | - | - + # **getHealth** > APIHealth getHealth() @@ -209,19 +277,19 @@ import io.github.vrchatapi.ApiClient; import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Configuration; import io.github.vrchatapi.models.*; -import io.github.vrchatapi.api.SystemApi; +import io.github.vrchatapi.api.MiscellaneousApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - SystemApi apiInstance = new SystemApi(defaultClient); + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); try { APIHealth result = apiInstance.getHealth(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SystemApi#getHealth"); + System.err.println("Exception when calling MiscellaneousApi#getHealth"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -250,9 +318,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the API's health. | - | +| **200** | Returns the API's health. | - | - + # **getInfoPush** > List<InfoPush> getInfoPush(require, include) @@ -266,22 +334,29 @@ IPS (Info Push System) is a system for VRChat to push out dynamic information to 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.SystemApi; +import io.github.vrchatapi.api.MiscellaneousApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - - SystemApi apiInstance = new SystemApi(defaultClient); + + // 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"); + + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); String require = "require_example"; // String | Tags to include (comma-separated). All of the tags needs to be present. String include = "include_example"; // String | Tags to include (comma-separated). Any of the tags needs to be present. try { List result = apiInstance.getInfoPush(require, include); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SystemApi#getInfoPush"); + System.err.println("Exception when calling MiscellaneousApi#getInfoPush"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -293,10 +368,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **require** | **String**| Tags to include (comma-separated). All of the tags needs to be present. | [optional] - **include** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **require** | **String**| Tags to include (comma-separated). All of the tags needs to be present. | [optional] | +| **include** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | ### Return type @@ -304,7 +379,7 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -314,9 +389,9 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of InfoPush objects. | - | +| **200** | Returns a list of InfoPush objects. | - | - + # **getJavaScript** > String getJavaScript(variant, branch) @@ -331,21 +406,21 @@ import io.github.vrchatapi.ApiClient; import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Configuration; import io.github.vrchatapi.models.*; -import io.github.vrchatapi.api.SystemApi; +import io.github.vrchatapi.api.MiscellaneousApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - SystemApi apiInstance = new SystemApi(defaultClient); - String variant = "public"; // String | Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); + String variant = "internal"; // String | Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. String branch = "main"; // String | Specifies which git branch the site should load frontend source code from. try { String result = apiInstance.getJavaScript(variant, branch); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SystemApi#getJavaScript"); + System.err.println("Exception when calling MiscellaneousApi#getJavaScript"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -357,10 +432,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **variant** | **String**| Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. | [optional] [default to public] [enum: public, internal] - **branch** | **String**| Specifies which git branch the site should load frontend source code from. | [optional] [default to main] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **variant** | **String**| Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. | [optional] [default to public] [enum: internal, public] | +| **branch** | **String**| Specifies which git branch the site should load frontend source code from. | [optional] [default to main] | ### Return type @@ -378,10 +453,80 @@ No authorization required ### HTTP 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. | - | +| **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) + +Get Permission + +Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. + +### 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.MiscellaneousApi; + +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"); + + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); + String permissionId = "permissionId_example"; // String | Must be a valid permission ID. + try { + Permission result = apiInstance.getPermission(permissionId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#getPermission"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **permissionId** | **String**| Must be a valid permission ID. | | + +### Return type + +[**Permission**](Permission.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 single Permission object. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **getSystemTime** > OffsetDateTime getSystemTime() @@ -396,19 +541,19 @@ import io.github.vrchatapi.ApiClient; import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Configuration; import io.github.vrchatapi.models.*; -import io.github.vrchatapi.api.SystemApi; +import io.github.vrchatapi.api.MiscellaneousApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - SystemApi apiInstance = new SystemApi(defaultClient); + MiscellaneousApi apiInstance = new MiscellaneousApi(defaultClient); try { OffsetDateTime result = apiInstance.getSystemTime(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SystemApi#getSystemTime"); + System.err.println("Exception when calling MiscellaneousApi#getSystemTime"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -437,5 +582,5 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | +| **200** | OK | - | diff --git a/docs/ModelFile.md b/docs/ModelFile.md new file mode 100644 index 00000000..44d22899 --- /dev/null +++ b/docs/ModelFile.md @@ -0,0 +1,26 @@ + + +# ModelFile + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**animationStyle** | **ImageAnimationStyle** | | [optional] | +|**extension** | **String** | | | +|**frames** | **Integer** | The number of frames for animated spritesheet images. | [optional] | +|**framesOverTime** | **Integer** | The frames per second for animated spritesheet images. | [optional] | +|**id** | **String** | | | +|**loopStyle** | **ImageLoopStyle** | | [optional] | +|**maskTag** | **ImageMask** | | [optional] | +|**mimeType** | **MIMEType** | | | +|**modifiedThumbnailFileName** | **String** | | [optional] | +|**name** | **String** | | | +|**ownerId** | **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. | | +|**tags** | **List<String>** | | | +|**versions** | [**Set<FileVersion>**](FileVersion.md) | | | + + + diff --git a/docs/ModerateUserRequest.md b/docs/ModerateUserRequest.md index 7b496a32..2b650f5d 100644 --- a/docs/ModerateUserRequest.md +++ b/docs/ModerateUserRequest.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**moderated** | **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. | -**type** | **PlayerModerationType** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**moderated** | **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. | | +|**type** | **PlayerModerationType** | | | diff --git a/docs/ModerationReport.md b/docs/ModerationReport.md new file mode 100644 index 00000000..e656e86e --- /dev/null +++ b/docs/ModerationReport.md @@ -0,0 +1,22 @@ + + +# ModerationReport + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**category** | **String** | Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`. | | +|**contentId** | **String** | | | +|**contentName** | **String** | | | +|**contentThumbnailImageUrl** | **String** | | | +|**description** | **String** | The subjective reason for the report | | +|**evidenceRequired** | **Boolean** | | | +|**id** | **String** | | | +|**reason** | **String** | Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`. | | +|**supportRequired** | **Boolean** | | | +|**type** | **String** | Valid values are the keys of the object `$.reportOptions` from `GET /config`. | | + + + diff --git a/docs/MutualFriend.md b/docs/MutualFriend.md new file mode 100644 index 00000000..4c8b0ace --- /dev/null +++ b/docs/MutualFriend.md @@ -0,0 +1,23 @@ + + +# MutualFriend + +User object received when querying mutual friends + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**avatarThumbnail** | **String** | When profilePicOverride is not empty, use it instead. | [optional] | +|**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | +|**currentAvatarTags** | **List<String>** | | [optional] | +|**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | [optional] | +|**displayName** | **String** | | | +|**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. | | +|**imageUrl** | **String** | | | +|**profilePicOverride** | **String** | | [optional] | +|**status** | **UserStatus** | | | +|**statusDescription** | **String** | | | + + + diff --git a/docs/Mutuals.md b/docs/Mutuals.md new file mode 100644 index 00000000..72ba12f7 --- /dev/null +++ b/docs/Mutuals.md @@ -0,0 +1,14 @@ + + +# Mutuals + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**friends** | **Integer** | | | +|**groups** | **Integer** | | | + + + diff --git a/docs/Notification.md b/docs/Notification.md index b45e5e9a..de62f4ce 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -3,18 +3,20 @@ # Notification + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createdAt** | **OffsetDateTime** | | -**details** | **String** | **NOTICE:** This is not a JSON object, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. | -**id** | **String** | | -**message** | **String** | | -**seen** | **Boolean** | | -**senderUserId** | **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. | -**senderUsername** | **String** | | -**type** | **NotificationType** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**details** | **String** | **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. | | +|**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. | [optional] | +|**seen** | **Boolean** | Not included in notification objects received from the Websocket API | [optional] | +|**senderUserId** | **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. | | +|**senderUsername** | **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] | +|**type** | **NotificationType** | | | 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/NotificationDetailInvite.md b/docs/NotificationDetailInvite.md new file mode 100644 index 00000000..ce38db24 --- /dev/null +++ b/docs/NotificationDetailInvite.md @@ -0,0 +1,15 @@ + + +# NotificationDetailInvite + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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** | | | + + + diff --git a/docs/NotificationDetailInviteResponse.md b/docs/NotificationDetailInviteResponse.md new file mode 100644 index 00000000..44c626b4 --- /dev/null +++ b/docs/NotificationDetailInviteResponse.md @@ -0,0 +1,14 @@ + + +# NotificationDetailInviteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**inResponseTo** | **String** | | | +|**responseMessage** | **String** | | | + + + diff --git a/docs/NotificationDetailRequestInvite.md b/docs/NotificationDetailRequestInvite.md new file mode 100644 index 00000000..95b17fc3 --- /dev/null +++ b/docs/NotificationDetailRequestInvite.md @@ -0,0 +1,14 @@ + + +# NotificationDetailRequestInvite + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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] | + + + diff --git a/docs/NotificationDetailRequestInviteResponse.md b/docs/NotificationDetailRequestInviteResponse.md new file mode 100644 index 00000000..6e78668d --- /dev/null +++ b/docs/NotificationDetailRequestInviteResponse.md @@ -0,0 +1,14 @@ + + +# NotificationDetailRequestInviteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**inResponseTo** | **String** | | | +|**requestMessage** | **String** | Used when using InviteMessage Slot. | [optional] | + + + diff --git a/docs/NotificationDetailVoteToKick.md b/docs/NotificationDetailVoteToKick.md new file mode 100644 index 00000000..5b72b6d4 --- /dev/null +++ b/docs/NotificationDetailVoteToKick.md @@ -0,0 +1,14 @@ + + +# NotificationDetailVoteToKick + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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/NotificationType.md b/docs/NotificationType.md index d554920c..2fe83e60 100644 --- a/docs/NotificationType.md +++ b/docs/NotificationType.md @@ -5,15 +5,19 @@ ## Enum -* `FRIENDREQUEST` (value: `"friendRequest"`) +* `BOOP` (value: `"boop"`) + +* `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 new file mode 100644 index 00000000..59421d82 --- /dev/null +++ b/docs/NotificationV2.md @@ -0,0 +1,41 @@ + + +# NotificationV2 + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**canDelete** | **Boolean** | | | +|**category** | **String** | | | +|**createdAt** | **OffsetDateTime** | | | +|**data** | **Map<String, String>** | | | +|**details** | [**NotificationV2DetailsBoop**](NotificationV2DetailsBoop.md) | | [optional] | +|**expiresAt** | **OffsetDateTime** | | | +|**expiryAfterSeen** | **Integer** | | | +|**id** | **String** | | | +|**ignoreDND** | **Boolean** | | | +|**imageUrl** | **String** | | | +|**isSystem** | **Boolean** | | | +|**link** | **String** | | | +|**linkText** | **String** | | | +|**linkTextKey** | **String** | | | +|**message** | **String** | | | +|**messageKey** | **String** | | [optional] | +|**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. | | +|**relatedNotificationsId** | **String** | | | +|**requireSeen** | **Boolean** | | | +|**responses** | [**List<NotificationV2Response>**](NotificationV2Response.md) | | | +|**seen** | **Boolean** | | | +|**senderUserId** | **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. | | +|**senderUsername** | **String** | | | +|**title** | **String** | | | +|**titleKey** | **String** | | | +|**type** | **NotificationV2Type** | | | +|**updatedAt** | **OffsetDateTime** | | | +|**version** | **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/NotificationV2DetailsBoop.md b/docs/NotificationV2DetailsBoop.md new file mode 100644 index 00000000..ae153777 --- /dev/null +++ b/docs/NotificationV2DetailsBoop.md @@ -0,0 +1,16 @@ + + +# NotificationV2DetailsBoop + +Either inventoryItemId by itself, or emojiId with optional emojiVersion + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**emojiId** | **String** | Either a FileID or a string constant for default emojis | | +|**emojiVersion** | **Integer** | | | +|**inventoryItemId** | **String** | | | + + + diff --git a/docs/NotificationV2Response.md b/docs/NotificationV2Response.md new file mode 100644 index 00000000..48186ce3 --- /dev/null +++ b/docs/NotificationV2Response.md @@ -0,0 +1,17 @@ + + +# NotificationV2Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | **String** | | | +|**icon** | **String** | | | +|**text** | **String** | | | +|**textKey** | **String** | | | +|**type** | **String** | | | + + + diff --git a/docs/NotificationV2Type.md b/docs/NotificationV2Type.md new file mode 100644 index 00000000..d5d59288 --- /dev/null +++ b/docs/NotificationV2Type.md @@ -0,0 +1,55 @@ + + +# NotificationV2Type + +## Enum + + +* `AVATARREVIEW_FAILURE` (value: `"avatarreview.failure"`) + +* `AVATARREVIEW_SUCCESS` (value: `"avatarreview.success"`) + +* `BADGE_EARNED` (value: `"badge.earned"`) + +* `BOOP` (value: `"boop"`) + +* `ECONOMY_ALERT` (value: `"economy.alert"`) + +* `ECONOMY_RECEIVED_GIFT` (value: `"economy.received.gift"`) + +* `EVENT_ANNOUNCEMENT` (value: `"event.announcement"`) + +* `GROUP_ANNOUNCEMENT` (value: `"group.announcement"`) + +* `GROUP_EVENT_CREATED` (value: `"group.event.created"`) + +* `GROUP_EVENT_STARTING` (value: `"group.event.starting"`) + +* `GROUP_INFORMATIVE` (value: `"group.informative"`) + +* `GROUP_INVITE` (value: `"group.invite"`) + +* `GROUP_JOIN_REQUEST` (value: `"group.joinRequest"`) + +* `GROUP_POST` (value: `"group.post"`) + +* `GROUP_TRANSFER` (value: `"group.transfer"`) + +* `INVITE_INSTANCE_CONTENT_GATED` (value: `"invite.instance.contentGated"`) + +* `MODERATION_CONTENTRESTRICTION` (value: `"moderation.contentrestriction"`) + +* `MODERATION_NOTICE` (value: `"moderation.notice"`) + +* `MODERATION_REPORT_CLOSED` (value: `"moderation.report.closed"`) + +* `MODERATION_WARNING_GROUP` (value: `"moderation.warning.group"`) + +* `PROMO_REDEEM` (value: `"promo.redeem"`) + +* `TEXT_ADVENTURE` (value: `"text.adventure"`) + +* `VRCPLUS_GIFT` (value: `"vrcplus.gift"`) + + + diff --git a/docs/NotificationsApi.md b/docs/NotificationsApi.md index 9f16bc9f..9f93f0d2 100644 --- a/docs/NotificationsApi.md +++ b/docs/NotificationsApi.md @@ -2,16 +2,24 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**acceptFriendRequest**](NotificationsApi.md#acceptFriendRequest) | **PUT** /auth/user/notifications/{notificationId}/accept | Accept Friend Request -[**clearNotifications**](NotificationsApi.md#clearNotifications) | **PUT** /auth/user/notifications/clear | Clear All Notifications -[**deleteNotification**](NotificationsApi.md#deleteNotification) | **PUT** /auth/user/notifications/{notificationId}/hide | Delete Notification -[**getNotifications**](NotificationsApi.md#getNotifications) | **GET** /auth/user/notifications | List Notifications -[**markNotificationAsRead**](NotificationsApi.md#markNotificationAsRead) | **PUT** /auth/user/notifications/{notificationId}/see | Mark Notification As Read - - - +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**acceptFriendRequest**](NotificationsApi.md#acceptFriendRequest) | **PUT** /auth/user/notifications/{notificationId}/accept | Accept Friend Request | +| [**acknowledgeNotificationV2**](NotificationsApi.md#acknowledgeNotificationV2) | **POST** /notifications/{notificationId}/see | Acknowledge NotificationV2 | +| [**clearNotifications**](NotificationsApi.md#clearNotifications) | **PUT** /auth/user/notifications/clear | Clear All Notifications | +| [**deleteAllNotificationV2s**](NotificationsApi.md#deleteAllNotificationV2s) | **DELETE** /notifications | Delete All NotificationV2s | +| [**deleteNotification**](NotificationsApi.md#deleteNotification) | **PUT** /auth/user/notifications/{notificationId}/hide | Delete Notification | +| [**deleteNotificationV2**](NotificationsApi.md#deleteNotificationV2) | **DELETE** /notifications/{notificationId} | Delete NotificationV2 | +| [**getNotification**](NotificationsApi.md#getNotification) | **GET** /auth/user/notifications/{notificationId} | Show notification | +| [**getNotificationV2**](NotificationsApi.md#getNotificationV2) | **GET** /notifications/{notificationId} | Get NotificationV2 | +| [**getNotificationV2s**](NotificationsApi.md#getNotificationV2s) | **GET** /notifications | List NotificationV2s | +| [**getNotifications**](NotificationsApi.md#getNotifications) | **GET** /auth/user/notifications | List Notifications | +| [**markNotificationAsRead**](NotificationsApi.md#markNotificationAsRead) | **PUT** /auth/user/notifications/{notificationId}/see | Mark Notification As Read | +| [**replyNotificationV2**](NotificationsApi.md#replyNotificationV2) | **POST** /notifications/{notificationId}/reply | Reply NotificationV2 | +| [**respondNotificationV2**](NotificationsApi.md#respondNotificationV2) | **POST** /notifications/{notificationId}/respond | Respond NotificationV2 | + + + # **acceptFriendRequest** > Success acceptFriendRequest(notificationId) @@ -34,12 +42,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -47,7 +49,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); NotificationsApi apiInstance = new NotificationsApi(defaultClient); - String notificationId = "notificationId_example"; // String | + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. try { Success result = apiInstance.acceptFriendRequest(notificationId); System.out.println(result); @@ -64,9 +66,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notificationId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | ### Return type @@ -74,7 +76,78 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **acknowledgeNotificationV2** +> NotificationV2 acknowledgeNotificationV2(notificationId) + +Acknowledge NotificationV2 + +Acknowledge a specific notification + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + try { + NotificationV2 result = apiInstance.acknowledgeNotificationV2(notificationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#acknowledgeNotificationV2"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | + +### Return type + +[**NotificationV2**](NotificationV2.md) + +### Authorization + +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -84,11 +157,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response after friending a user. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to accept a non-existent friend request. | - | +| **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() @@ -111,12 +184,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -147,7 +214,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -157,10 +224,76 @@ This endpoint does not need any parameter. ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful response after clearing all notifications. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Successful response after clearing all notifications. | - | +| **401** | Error response due to missing auth cookie. | - | - + +# **deleteAllNotificationV2s** +> Success deleteAllNotificationV2s() + +Delete All NotificationV2s + +Delete all of the current user's notifications. + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + try { + Success result = apiInstance.deleteAllNotificationV2s(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#deleteAllNotificationV2s"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Success**](Success.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** | Successful response after clearing all notifications. | - | +| **401** | Error response due to missing auth cookie. | - | + + # **deleteNotification** > Notification deleteNotification(notificationId) @@ -183,12 +316,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -196,7 +323,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); NotificationsApi apiInstance = new NotificationsApi(defaultClient); - String notificationId = "notificationId_example"; // String | + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. try { Notification result = apiInstance.deleteNotification(notificationId); System.out.println(result); @@ -213,9 +340,151 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notificationId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | + +### Return type + +[**Notification**](Notification.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 single Notification object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **deleteNotificationV2** +> Success deleteNotificationV2(notificationId) + +Delete NotificationV2 + +Delete a specific notification + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + try { + Success result = apiInstance.deleteNotificationV2(notificationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#deleteNotificationV2"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | + +### Return type + +[**Success**](Success.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** | Successful response after clearing a notification. | - | +| **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. | - | + + +# **getNotification** +> Notification getNotification(notificationId) + +Show notification + +Get a notification by notification `not_` ID. + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + try { + Notification result = apiInstance.getNotification(notificationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#getNotification"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | ### Return type @@ -223,7 +492,78 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[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 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) + +Get NotificationV2 + +Get a specific notification. Appears to require admin credentials by default. Expect a 403 Forbidden error response for normal users. + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + try { + NotificationV2 result = apiInstance.getNotificationV2(notificationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#getNotificationV2"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | + +### Return type + +[**NotificationV2**](NotificationV2.md) + +### Authorization + +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -233,10 +573,82 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Notifcation object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **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) + +List NotificationV2s - +Retrieve all of the current user's notifications. + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + Integer limit = 100; // Integer | The maximum number of entries to get. + try { + List result = apiInstance.getNotificationV2s(limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#getNotificationV2s"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **limit** | **Integer**| The maximum number of entries to get. | [optional] | + +### Return type + +[**List<NotificationV2>**](NotificationV2.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 list of NotificationV2 objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + # **getNotifications** > List<Notification> getNotifications(type, sent, hidden, after, n, offset) @@ -259,12 +671,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -272,7 +678,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); NotificationsApi apiInstance = new NotificationsApi(defaultClient); - String type = "all"; // String | Only send notifications of this type (can use `all` for all). + String type = "all"; // String | Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated. Boolean sent = true; // Boolean | Return notifications sent by the user. Must be false or omitted. Boolean hidden = true; // Boolean | Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. String after = "five_minutes_ago"; // String | Only return notifications sent after this Date. Ignored if type is `friendRequest`. @@ -294,14 +700,14 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **String**| Only send notifications of this type (can use `all` for all). | [optional] - **sent** | **Boolean**| Return notifications sent by the user. Must be false or omitted. | [optional] - **hidden** | **Boolean**| Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. | [optional] - **after** | **String**| Only return notifications sent after this Date. Ignored if type is `friendRequest`. | [optional] - **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] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **type** | **String**| Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated. | [optional] | +| **sent** | **Boolean**| Return notifications sent by the user. Must be false or omitted. | [optional] | +| **hidden** | **Boolean**| Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. | [optional] | +| **after** | **String**| Only return notifications sent after this Date. Ignored if type is `friendRequest`. | [optional] | +| **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] | ### Return type @@ -309,7 +715,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -319,10 +725,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of Notifcation objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of Notification objects. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **markNotificationAsRead** > Notification markNotificationAsRead(notificationId) @@ -345,12 +751,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -358,7 +758,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); NotificationsApi apiInstance = new NotificationsApi(defaultClient); - String notificationId = "notificationId_example"; // String | + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. try { Notification result = apiInstance.markNotificationAsRead(notificationId); System.out.println(result); @@ -375,9 +775,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notificationId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | ### Return type @@ -385,7 +785,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -395,6 +795,154 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Notifcation object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single Notification object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **replyNotificationV2** +> NotificationV2 replyNotificationV2(notificationId, body) + +Reply NotificationV2 + +Reply to a specific notification + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + Object body = null; // Object | + try { + NotificationV2 result = apiInstance.replyNotificationV2(notificationId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#replyNotificationV2"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | +| **body** | **Object**| | | + +### Return type + +[**NotificationV2**](NotificationV2.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +Respond NotificationV2 + +Respond to a specific notification + +### 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.NotificationsApi; + +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"); + + NotificationsApi apiInstance = new NotificationsApi(defaultClient); + String notificationId = "notificationId_example"; // String | Must be a valid notification ID. + RespondNotificationV2Request respondNotificationV2Request = new RespondNotificationV2Request(); // RespondNotificationV2Request | + try { + NotificationV2 result = apiInstance.respondNotificationV2(notificationId, respondNotificationV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NotificationsApi#respondNotificationV2"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **notificationId** | **String**| Must be a valid notification ID. | | +| **respondNotificationV2Request** | [**RespondNotificationV2Request**](RespondNotificationV2Request.md)| | | + +### Return type + +[**NotificationV2**](NotificationV2.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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/OkStatus.md b/docs/OkStatus.md new file mode 100644 index 00000000..46d52759 --- /dev/null +++ b/docs/OkStatus.md @@ -0,0 +1,14 @@ + + +# OkStatus + +A status response consisting of solely a string description of whether the result of an operation was ok. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ok** | **String** | The actual status itself | | + + + diff --git a/docs/OkStatus2.md b/docs/OkStatus2.md new file mode 100644 index 00000000..b077478a --- /dev/null +++ b/docs/OkStatus2.md @@ -0,0 +1,14 @@ + + +# OkStatus2 + +Another status response consisting of solely a string description of whether the result of an operation was ok. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**OK** | **String** | The actual status itself | | + + + diff --git a/docs/OrderOption.md b/docs/OrderOption.md new file mode 100644 index 00000000..f79cbe78 --- /dev/null +++ b/docs/OrderOption.md @@ -0,0 +1,13 @@ + + +# OrderOption + +## Enum + + +* `ASCENDING` (value: `"ascending"`) + +* `DESCENDING` (value: `"descending"`) + + + diff --git a/docs/OrderOptionShort.md b/docs/OrderOptionShort.md new file mode 100644 index 00000000..93120257 --- /dev/null +++ b/docs/OrderOptionShort.md @@ -0,0 +1,13 @@ + + +# OrderOptionShort + +## Enum + + +* `ASC` (value: `"asc"`) + +* `DESC` (value: `"desc"`) + + + diff --git a/docs/PaginatedCalendarEventList.md b/docs/PaginatedCalendarEventList.md new file mode 100644 index 00000000..bc612a94 --- /dev/null +++ b/docs/PaginatedCalendarEventList.md @@ -0,0 +1,16 @@ + + +# PaginatedCalendarEventList + +An offset-based list of CalendarEvents + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasNext** | **Boolean** | Whether there are more results after this page. | [optional] | +|**results** | [**List<CalendarEvent>**](CalendarEvent.md) | | [optional] | +|**totalCount** | **Integer** | The total number of results that the query would return if there were no pagination. | [optional] | + + + diff --git a/docs/PaginatedGroupAuditLogEntryList.md b/docs/PaginatedGroupAuditLogEntryList.md new file mode 100644 index 00000000..da457e20 --- /dev/null +++ b/docs/PaginatedGroupAuditLogEntryList.md @@ -0,0 +1,15 @@ + + +# PaginatedGroupAuditLogEntryList + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasNext** | **Boolean** | Whether there are more results after this page. | [optional] | +|**results** | [**List<GroupAuditLogEntry>**](GroupAuditLogEntry.md) | | [optional] | +|**totalCount** | **Integer** | The total number of results that the query would return if there were no pagination. | [optional] | + + + diff --git a/docs/PaginatedModerationReportList.md b/docs/PaginatedModerationReportList.md new file mode 100644 index 00000000..1308eb3e --- /dev/null +++ b/docs/PaginatedModerationReportList.md @@ -0,0 +1,15 @@ + + +# PaginatedModerationReportList + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasNext** | **Boolean** | Whether there are more results after this page. | [optional] | +|**results** | [**List<ModerationReport>**](ModerationReport.md) | The list of moderation reports. | [optional] | +|**totalCount** | **Integer** | The total number of results that the query would return if there were no pagination. | [optional] | + + + diff --git a/docs/PastDisplayName.md b/docs/PastDisplayName.md index f9d02a21..07bfb2ec 100644 --- a/docs/PastDisplayName.md +++ b/docs/PastDisplayName.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**displayName** | **String** | | -**updatedAt** | **OffsetDateTime** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**displayName** | **String** | | | +|**updatedAt** | **OffsetDateTime** | | | diff --git a/docs/Pending2FAResult.md b/docs/Pending2FAResult.md new file mode 100644 index 00000000..f6213453 --- /dev/null +++ b/docs/Pending2FAResult.md @@ -0,0 +1,14 @@ + + +# Pending2FAResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**qrCodeDataUrl** | **String** | | | +|**secret** | **String** | | | + + + diff --git a/docs/PerformanceLimiterInfo.md b/docs/PerformanceLimiterInfo.md new file mode 100644 index 00000000..28207f55 --- /dev/null +++ b/docs/PerformanceLimiterInfo.md @@ -0,0 +1,14 @@ + + +# PerformanceLimiterInfo + +Info about the performance limits on a platform + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**maxSeats** | **Integer** | Maximum amount of seats. -1 means no limit. | | + + + diff --git a/docs/PerformanceRatings.md b/docs/PerformanceRatings.md new file mode 100644 index 00000000..b8807847 --- /dev/null +++ b/docs/PerformanceRatings.md @@ -0,0 +1,21 @@ + + +# PerformanceRatings + +## Enum + + +* `EXCELLENT` (value: `"Excellent"`) + +* `GOOD` (value: `"Good"`) + +* `MEDIUM` (value: `"Medium"`) + +* `NONE` (value: `"None"`) + +* `POOR` (value: `"Poor"`) + +* `VERY_POOR` (value: `"VeryPoor"`) + + + diff --git a/docs/Permission.md b/docs/Permission.md index 7b4112c0..4f3968da 100644 --- a/docs/Permission.md +++ b/docs/Permission.md @@ -3,14 +3,19 @@ # Permission + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**ownerId** | **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. | -**data** | **Object** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**PermissionData**](PermissionData.md) | | [optional] | +|**description** | **String** | | [optional] | +|**displayName** | **String** | | [optional] | +|**id** | **String** | | | +|**name** | **String** | | | +|**ownerDisplayName** | **String** | | | +|**ownerId** | **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. | | +|**type** | **String** | | [optional] | diff --git a/docs/PermissionData.md b/docs/PermissionData.md new file mode 100644 index 00000000..39bcb2c0 --- /dev/null +++ b/docs/PermissionData.md @@ -0,0 +1,18 @@ + + +# PermissionData + +Specific values afforded the user by this permission + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**badges** | **List<String>** | Badges afforded the user by this permission | [optional] | +|**max** | **Integer** | Maximum value afforded the user by this permission | [optional] | +|**maxFavoriteGroups** | **Map<String, Integer>** | Maximum favorite groups afforded the user by this permission | [optional] | +|**maxFavoritesPerGroup** | **Map<String, Integer>** | Maximum favorites per group afforded the user by this permission | [optional] | +|**tags** | **List<String>** | Tags afforded the user by this permission | [optional] | + + + diff --git a/docs/PermissionsApi.md b/docs/PermissionsApi.md deleted file mode 100644 index c9e99631..00000000 --- a/docs/PermissionsApi.md +++ /dev/null @@ -1,158 +0,0 @@ -# PermissionsApi - -All URIs are relative to *https://api.vrchat.cloud/api/1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getAssignedPermissions**](PermissionsApi.md#getAssignedPermissions) | **GET** /auth/permissions | Get Assigned Permissions -[**getPermission**](PermissionsApi.md#getPermission) | **GET** /permissions/{permissionId} | Get Permission - - - -# **getAssignedPermissions** -> List<Permission> getAssignedPermissions() - -Get Assigned Permissions - -Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. - -### 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.PermissionsApi; - -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: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.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"); - - PermissionsApi apiInstance = new PermissionsApi(defaultClient); - try { - List result = apiInstance.getAssignedPermissions(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionsApi#getAssignedPermissions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<Permission>**](Permission.md) - -### Authorization - -[apiKeyCookie](../README.md#apiKeyCookie), [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 list of Permission objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | - - -# **getPermission** -> Permission getPermission(permissionId) - -Get Permission - -Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. - -### 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.PermissionsApi; - -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: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.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"); - - PermissionsApi apiInstance = new PermissionsApi(defaultClient); - String permissionId = "permissionId_example"; // String | - try { - Permission result = apiInstance.getPermission(permissionId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionsApi#getPermission"); - 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 -------------- | ------------- | ------------- | ------------- - **permissionId** | **String**| | - -### Return type - -[**Permission**](Permission.md) - -### Authorization - -[apiKeyCookie](../README.md#apiKeyCookie), [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 single Permission object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | - diff --git a/docs/PlatformBuildInfo.md b/docs/PlatformBuildInfo.md new file mode 100644 index 00000000..c8f474eb --- /dev/null +++ b/docs/PlatformBuildInfo.md @@ -0,0 +1,15 @@ + + +# PlatformBuildInfo + +Build information for a platform + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**minBuildNumber** | **Integer** | Minimum build number required for the platform | | +|**redirectionAddress** | **String** | Redirection URL for updating the app | [optional] | + + + diff --git a/docs/PlayerModeration.md b/docs/PlayerModeration.md index 2acdcd41..9731da55 100644 --- a/docs/PlayerModeration.md +++ b/docs/PlayerModeration.md @@ -5,15 +5,15 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created** | **OffsetDateTime** | | -**id** | **String** | | -**sourceDisplayName** | **String** | | -**sourceUserId** | **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. | -**targetDisplayName** | **String** | | -**targetUserId** | **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. | -**type** | **PlayerModerationType** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**created** | **OffsetDateTime** | | | +|**id** | **String** | | | +|**sourceDisplayName** | **String** | | | +|**sourceUserId** | **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. | | +|**targetDisplayName** | **String** | | | +|**targetUserId** | **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. | | +|**type** | **PlayerModerationType** | | | diff --git a/docs/PlayerModerationType.md b/docs/PlayerModerationType.md index f8768b32..f287f6d7 100644 --- a/docs/PlayerModerationType.md +++ b/docs/PlayerModerationType.md @@ -5,17 +5,23 @@ ## Enum -* `MUTE` (value: `"mute"`) +* `BLOCK` (value: `"block"`) -* `UNMUTE` (value: `"unmute"`) +* `HIDE_AVATAR` (value: `"hideAvatar"`) -* `BLOCK` (value: `"block"`) +* `INTERACT_OFF` (value: `"interactOff"`) -* `UNBLOCK` (value: `"unblock"`) +* `INTERACT_ON` (value: `"interactOn"`) -* `HIDEAVATAR` (value: `"hideAvatar"`) +* `MUTE` (value: `"mute"`) + +* `MUTE_CHAT` (value: `"muteChat"`) + +* `SHOW_AVATAR` (value: `"showAvatar"`) + +* `UNMUTE` (value: `"unmute"`) -* `SHOWAVATAR` (value: `"showAvatar"`) +* `UNMUTE_CHAT` (value: `"unmuteChat"`) diff --git a/docs/PlayermoderationApi.md b/docs/PlayermoderationApi.md index f8423dde..98f9df54 100644 --- a/docs/PlayermoderationApi.md +++ b/docs/PlayermoderationApi.md @@ -2,17 +2,15 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**clearAllPlayerModerations**](PlayermoderationApi.md#clearAllPlayerModerations) | **DELETE** /auth/user/playermoderations | Clear All Player Moderations -[**deletePlayerModeration**](PlayermoderationApi.md#deletePlayerModeration) | **DELETE** /auth/user/playermoderations/{playerModerationId} | Delete Player Moderation -[**getPlayerModeration**](PlayermoderationApi.md#getPlayerModeration) | **GET** /auth/user/playermoderations/{playerModerationId} | Get Player Moderation -[**getPlayerModerations**](PlayermoderationApi.md#getPlayerModerations) | **GET** /auth/user/playermoderations | Search Player Moderations -[**moderateUser**](PlayermoderationApi.md#moderateUser) | **POST** /auth/user/playermoderations | Moderate User -[**unmoderateUser**](PlayermoderationApi.md#unmoderateUser) | **PUT** /auth/user/unplayermoderate | Unmoderate User +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**clearAllPlayerModerations**](PlayermoderationApi.md#clearAllPlayerModerations) | **DELETE** /auth/user/playermoderations | Clear All Player Moderations | +| [**getPlayerModerations**](PlayermoderationApi.md#getPlayerModerations) | **GET** /auth/user/playermoderations | Search Player Moderations | +| [**moderateUser**](PlayermoderationApi.md#moderateUser) | **POST** /auth/user/playermoderations | Moderate User | +| [**unmoderateUser**](PlayermoderationApi.md#unmoderateUser) | **PUT** /auth/user/unplayermoderate | Unmoderate User | - + # **clearAllPlayerModerations** > Success clearAllPlayerModerations() @@ -35,12 +33,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -71,160 +63,7 @@ This endpoint does not need any parameter. ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success response after e.g. clearing all player moderations. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | - - -# **deletePlayerModeration** -> Success deletePlayerModeration(playerModerationId) - -Delete Player Moderation - -Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully. - -### 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.PlayermoderationApi; - -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: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.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"); - - PlayermoderationApi apiInstance = new PlayermoderationApi(defaultClient); - String playerModerationId = "playerModerationId_example"; // String | - try { - Success result = apiInstance.deletePlayerModeration(playerModerationId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PlayermoderationApi#deletePlayerModeration"); - 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 -------------- | ------------- | ------------- | ------------- - **playerModerationId** | **String**| | - -### Return type - -[**Success**](Success.md) - -### Authorization - -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success response after removing a PlayerModeration by ID. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**403** | Error response when trying to delete someone else's player moderation. | - | - - -# **getPlayerModeration** -> PlayerModeration getPlayerModeration(playerModerationId) - -Get Player Moderation - -Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. - -### 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.PlayermoderationApi; - -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: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.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"); - - PlayermoderationApi apiInstance = new PlayermoderationApi(defaultClient); - String playerModerationId = "playerModerationId_example"; // String | - try { - PlayerModeration result = apiInstance.getPlayerModeration(playerModerationId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PlayermoderationApi#getPlayerModeration"); - 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 -------------- | ------------- | ------------- | ------------- - **playerModerationId** | **String**| | - -### Return type - -[**PlayerModeration**](PlayerModeration.md) - -### Authorization - -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -234,11 +73,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single PlayerModeration object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**404** | Error response when trying to show information about a non-existent player moderation. | - | +| **200** | Success response after e.g. clearing all player moderations. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **getPlayerModerations** > List<PlayerModeration> getPlayerModerations(type, targetUserId) @@ -261,12 +99,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -274,7 +106,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); PlayermoderationApi apiInstance = new PlayermoderationApi(defaultClient); - String type = "type_example"; // String | Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. + PlayerModerationType type = PlayerModerationType.fromValue("block"); // PlayerModerationType | Must be one of PlayerModerationType. String targetUserId = "targetUserId_example"; // String | Must be valid UserID. try { List result = apiInstance.getPlayerModerations(type, targetUserId); @@ -292,10 +124,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **String**| Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. | [optional] - **targetUserId** | **String**| Must be valid UserID. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **type** | [**PlayerModerationType**](.md)| Must be one of PlayerModerationType. | [optional] [default to unmute] [enum: block, hideAvatar, interactOff, interactOn, mute, muteChat, showAvatar, unmute, unmuteChat] | +| **targetUserId** | **String**| Must be valid UserID. | [optional] | ### Return type @@ -303,7 +135,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -313,16 +145,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of PlayerModeration objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of PlayerModeration objects. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **moderateUser** > PlayerModeration moderateUser(moderateUserRequest) Moderate User -Moderate a user, e.g. unmute them or show their avatar. +Moderate a user, e.g. unmute them or show their avatar. Please see the [Player Moderation docs](https://vrchatapi.github.io/docs/api/#tag--playermoderation) on what playerModerations are, and how they differ from staff moderations. ### Example ```java @@ -339,12 +171,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -369,9 +195,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md)| | | ### Return type @@ -379,7 +205,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -389,10 +215,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single PlayerModeration object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single PlayerModeration object. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **unmoderateUser** > Success unmoderateUser(moderateUserRequest) @@ -415,12 +241,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -445,9 +265,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **moderateUserRequest** | [**ModerateUserRequest**](ModerateUserRequest.md)| | | ### Return type @@ -455,7 +275,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -465,6 +285,6 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success response after unmoderating a player moderation. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Success response after unmoderating a player moderation. | - | +| **401** | Error response due to missing auth cookie. | - | diff --git a/docs/Print.md b/docs/Print.md new file mode 100644 index 00000000..4055c267 --- /dev/null +++ b/docs/Print.md @@ -0,0 +1,23 @@ + + +# Print + +Info about a print + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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. | | +|**authorName** | **String** | | | +|**createdAt** | **OffsetDateTime** | | | +|**files** | [**PrintFiles**](PrintFiles.md) | | | +|**id** | **String** | | | +|**note** | **String** | | | +|**ownerId** | **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] | +|**timestamp** | **OffsetDateTime** | | | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**worldName** | **String** | | | + + + diff --git a/docs/PrintFiles.md b/docs/PrintFiles.md new file mode 100644 index 00000000..2084ca6b --- /dev/null +++ b/docs/PrintFiles.md @@ -0,0 +1,14 @@ + + +# PrintFiles + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fileId** | **String** | | [optional] | +|**image** | **String** | Link to file, e.g. https://api.vrchat.cloud/api/1/file/file_66fe782d-f2bd-4462-9761-1d766d7b2b26/1/file | [optional] | + + + diff --git a/docs/PrintsApi.md b/docs/PrintsApi.md new file mode 100644 index 00000000..79670781 --- /dev/null +++ b/docs/PrintsApi.md @@ -0,0 +1,375 @@ +# PrintsApi + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deletePrint**](PrintsApi.md#deletePrint) | **DELETE** /prints/{printId} | Delete Print | +| [**editPrint**](PrintsApi.md#editPrint) | **POST** /prints/{printId} | Edit Print | +| [**getPrint**](PrintsApi.md#getPrint) | **GET** /prints/{printId} | Get Print | +| [**getUserPrints**](PrintsApi.md#getUserPrints) | **GET** /prints/user/{userId} | Get Own Prints | +| [**uploadPrint**](PrintsApi.md#uploadPrint) | **POST** /prints | Upload Print | + + + +# **deletePrint** +> deletePrint(printId) + +Delete Print + +Returns a print. + +### 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.PrintsApi; + +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"); + + PrintsApi apiInstance = new PrintsApi(defaultClient); + String printId = "printId_example"; // String | Print ID. + try { + apiInstance.deletePrint(printId); + } catch (ApiException e) { + System.err.println("Exception when calling PrintsApi#deletePrint"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **printId** | **String**| Print ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Empty response if successful | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **editPrint** +> Print editPrint(printId, image, note) + +Edit Print + +Edits a print. + +### 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.PrintsApi; + +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"); + + PrintsApi apiInstance = new PrintsApi(defaultClient); + String printId = "printId_example"; // String | Print ID. + File image = new File("/path/to/file"); // File | The binary blob of the png file. + String note = "note_example"; // String | The caption for the image. + try { + Print result = apiInstance.editPrint(printId, image, note); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PrintsApi#editPrint"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **printId** | **String**| Print ID. | | +| **image** | **File**| The binary blob of the png file. | | +| **note** | **String**| The caption for the image. | [optional] | + +### Return type + +[**Print**](Print.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single Print object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getPrint** +> Print getPrint(printId) + +Get Print + +Returns a print. + +### 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.PrintsApi; + +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"); + + PrintsApi apiInstance = new PrintsApi(defaultClient); + String printId = "printId_example"; // String | Print ID. + try { + Print result = apiInstance.getPrint(printId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PrintsApi#getPrint"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **printId** | **String**| Print ID. | | + +### Return type + +[**Print**](Print.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 single Print object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserPrints** +> List<Print> getUserPrints(userId) + +Get Own Prints + +Returns a list of all prints of the user. User id has to be your own userId, as you can't request other user's prints. + +### 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.PrintsApi; + +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"); + + PrintsApi apiInstance = new PrintsApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + List result = apiInstance.getUserPrints(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PrintsApi#getUserPrints"); + 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 + +[**List<Print>**](Print.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 list of Print objects. | - | +| **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) + +Upload Print + +Uploads and creates a print. + +### 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.PrintsApi; + +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"); + + PrintsApi apiInstance = new PrintsApi(defaultClient); + File image = new File("/path/to/file"); // File | The binary blob of the png file. + OffsetDateTime timestamp = OffsetDateTime.now(); // OffsetDateTime | The time the image was captured. + String note = "note_example"; // String | The caption for the image. + String worldId = "worldId_example"; // String | The id of the world in which the image was captured. + String worldName = "worldName_example"; // String | The name of the world in which the image was captured. + try { + Print result = apiInstance.uploadPrint(image, timestamp, note, worldId, worldName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PrintsApi#uploadPrint"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **image** | **File**| The binary blob of the png file. | | +| **timestamp** | **OffsetDateTime**| The time the image was captured. | | +| **note** | **String**| The caption for the image. | [optional] | +| **worldId** | **String**| The id of the world in which the image was captured. | [optional] | +| **worldName** | **String**| The name of the world in which the image was captured. | [optional] | + +### Return type + +[**Print**](Print.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Returns a single Print object. | - | +| **401** | Error response due to missing auth cookie. | - | + 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/Product.md b/docs/Product.md new file mode 100644 index 00000000..ae535d7b --- /dev/null +++ b/docs/Product.md @@ -0,0 +1,33 @@ + + +# Product + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**archived** | **Boolean** | | [optional] | +|**created** | **OffsetDateTime** | | [optional] | +|**description** | **String** | | | +|**displayName** | **String** | | | +|**groupAccess** | **Boolean** | | [optional] | +|**groupAccessRemove** | **Boolean** | | [optional] | +|**groupId** | **String** | | [optional] | +|**groupRoleId** | **String** | | [optional] | +|**id** | **String** | | | +|**imageId** | **String** | | | +|**imageUrl** | **String** | | [optional] | +|**parentListings** | **List<String>** | | | +|**productType** | **ProductType** | | | +|**productTypeLabel** | **String** | | [optional] | +|**purchaseCount** | **Integer** | | [optional] | +|**purchaseCountQuantity** | **Integer** | | [optional] | +|**sellerDisplayName** | **String** | | | +|**sellerId** | **String** | | | +|**tags** | **List<String>** | | | +|**updated** | **OffsetDateTime** | | [optional] | +|**useForSubscriberList** | **Boolean** | | [optional] | + + + diff --git a/docs/ProductListing.md b/docs/ProductListing.md new file mode 100644 index 00000000..ab784bc1 --- /dev/null +++ b/docs/ProductListing.md @@ -0,0 +1,51 @@ + + +# ProductListing + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**active** | **Boolean** | | | +|**archived** | **Boolean** | | [optional] | +|**buyerRefundable** | **Boolean** | | | +|**created** | **OffsetDateTime** | | [optional] | +|**description** | **String** | | | +|**displayName** | **String** | | | +|**duration** | **Integer** | | [optional] | +|**durationType** | **String** | | [optional] | +|**groupIcon** | **String** | | [optional] | +|**groupId** | **String** | | [optional] | +|**groupName** | **String** | | [optional] | +|**hasAvatar** | **Boolean** | | | +|**hasUdon** | **Boolean** | | | +|**hydratedProducts** | [**List<Product>**](Product.md) | | [optional] | +|**id** | **String** | | | +|**imageId** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**listingType** | **ProductListingType** | | | +|**listingVariants** | [**List<ProductListingVariant>**](ProductListingVariant.md) | | [optional] | +|**permanent** | **Boolean** | | [optional] | +|**priceTokens** | **Integer** | | | +|**productIds** | **List<String>** | | | +|**productType** | **ProductType** | | | +|**products** | **List<Object>** | | | +|**purchaseCount** | **Integer** | | [optional] | +|**purchaseCountQuantity** | **Integer** | | [optional] | +|**quantifiable** | **Boolean** | | [optional] | +|**recurrable** | **Boolean** | | | +|**refundable** | **Boolean** | | | +|**sellerDisplayName** | **String** | | | +|**sellerId** | **String** | | | +|**soldByVrc** | **Boolean** | | [optional] | +|**stackable** | **Boolean** | | | +|**storeIds** | **List<String>** | | | +|**subtitle** | **String** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**updated** | **OffsetDateTime** | | [optional] | +|**vrcPlusDiscountPrice** | **Integer** | | [optional] | +|**whenToExpire** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/ProductListingType.md b/docs/ProductListingType.md new file mode 100644 index 00000000..a13f8af5 --- /dev/null +++ b/docs/ProductListingType.md @@ -0,0 +1,17 @@ + + +# ProductListingType + +## Enum + + +* `DURATION` (value: `"duration"`) + +* `INSTANT` (value: `"instant"`) + +* `PERMANENT` (value: `"permanent"`) + +* `SUBSCRIPTION` (value: `"subscription"`) + + + diff --git a/docs/ProductListingVariant.md b/docs/ProductListingVariant.md new file mode 100644 index 00000000..f6437335 --- /dev/null +++ b/docs/ProductListingVariant.md @@ -0,0 +1,18 @@ + + +# ProductListingVariant + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**effectiveFrom** | **OffsetDateTime** | | [optional] | +|**listingVariantId** | **String** | | | +|**nonRefundable** | **Boolean** | | | +|**quantity** | **Integer** | | | +|**sellerVariant** | **Boolean** | | | +|**unitPriceTokens** | **Integer** | | | + + + diff --git a/docs/ProductPurchase.md b/docs/ProductPurchase.md new file mode 100644 index 00000000..4ff5e29f --- /dev/null +++ b/docs/ProductPurchase.md @@ -0,0 +1,53 @@ + + +# ProductPurchase + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**buyerDisplayName** | **String** | | | +|**buyerId** | **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. | | +|**firstParty** | **Boolean** | | [optional] | +|**isBuyer** | **Boolean** | | | +|**isGift** | **Boolean** | | | +|**isReceiver** | **Boolean** | | | +|**isSeller** | **Boolean** | | | +|**ledgerTransactionId** | **Integer** | | [optional] | +|**listingCurrentlyAvailable** | **Boolean** | | | +|**listingDescription** | **String** | | [optional] | +|**listingDisplayName** | **String** | | | +|**listingId** | **String** | | | +|**listingImageId** | **String** | | | +|**listingSubtitle** | **String** | | | +|**listingType** | **ProductListingType** | | | +|**products** | [**List<ProductPurchaseProduct>**](ProductPurchaseProduct.md) | | | +|**purchaseActive** | **Boolean** | | | +|**purchaseContext** | [**ProductPurchasePurchaseContext**](ProductPurchasePurchaseContext.md) | | | +|**purchaseCurrentStatus** | **String** | | | +|**purchaseDate** | **OffsetDateTime** | | | +|**purchaseDuration** | **Integer** | | [optional] | +|**purchaseDurationType** | **String** | | [optional] | +|**purchaseEndDate** | **OffsetDateTime** | | | +|**purchaseFee** | **Integer** | | [optional] | +|**purchaseId** | **String** | | | +|**purchaseLatest** | **Boolean** | | | +|**purchasePrice** | **Integer** | | | +|**purchaseQuantity** | **Integer** | | | +|**purchaseStartDate** | **OffsetDateTime** | | | +|**purchaseToken** | **Object** | | | +|**purchaseType** | **String** | | | +|**purchaseUnitPrice** | **Integer** | | | +|**purchaseValue** | **Integer** | | [optional] | +|**receiverDisplayName** | **String** | | | +|**receiverId** | **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. | | +|**recurrable** | **Boolean** | | | +|**refundable** | **Boolean** | | | +|**sellerDisplayName** | **String** | | | +|**sellerId** | **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. | | +|**stackable** | **Boolean** | | | +|**willRecur** | **Boolean** | | | + + + diff --git a/docs/ProductPurchaseHistory.md b/docs/ProductPurchaseHistory.md new file mode 100644 index 00000000..845b3611 --- /dev/null +++ b/docs/ProductPurchaseHistory.md @@ -0,0 +1,15 @@ + + +# ProductPurchaseHistory + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**endDate** | **OffsetDateTime** | | | +|**startDate** | **OffsetDateTime** | | | +|**transactions** | [**List<ProductPurchaseRecord>**](ProductPurchaseRecord.md) | | | + + + diff --git a/docs/ProductPurchaseLocationType.md b/docs/ProductPurchaseLocationType.md new file mode 100644 index 00000000..df8ad1fc --- /dev/null +++ b/docs/ProductPurchaseLocationType.md @@ -0,0 +1,31 @@ + + +# ProductPurchaseLocationType + +## Enum + + +* `CLIENT_AVATAR_MARKETPLACE` (value: `"client_avatar_marketplace"`) + +* `CLIENT_CREATOR_STORE` (value: `"client_creator_store"`) + +* `CLIENT_GROUP_STORE` (value: `"client_group_store"`) + +* `CLIENT_WORLD_COMPONENT` (value: `"client_world_component"`) + +* `CLIENT_WORLD_STORE` (value: `"client_world_store"`) + +* `UNDEFINED` (value: `"undefined"`) + +* `WEB_ANY` (value: `"web_any"`) + +* `WEB_AVATAR_MARKETPLACE` (value: `"web_avatar_marketplace"`) + +* `WEB_CREATOR_STORE` (value: `"web_creator_store"`) + +* `WEB_GROUP_STORE` (value: `"web_group_store"`) + +* `WEB_WORLD_STORE` (value: `"web_world_store"`) + + + diff --git a/docs/ProductPurchaseProduct.md b/docs/ProductPurchaseProduct.md new file mode 100644 index 00000000..38810dd6 --- /dev/null +++ b/docs/ProductPurchaseProduct.md @@ -0,0 +1,17 @@ + + +# ProductPurchaseProduct + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**displayName** | **String** | | | +|**id** | **String** | | | +|**imageId** | **String** | | [optional] | +|**licenseId** | **String** | | [optional] | +|**productType** | **ProductType** | | | + + + diff --git a/docs/ProductPurchasePurchaseContext.md b/docs/ProductPurchasePurchaseContext.md new file mode 100644 index 00000000..66691d3b --- /dev/null +++ b/docs/ProductPurchasePurchaseContext.md @@ -0,0 +1,15 @@ + + +# ProductPurchasePurchaseContext + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**locationType** | **String** | | [optional] | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] | +|**worldName** | **String** | | [optional] | + + + diff --git a/docs/ProductPurchaseRecord.md b/docs/ProductPurchaseRecord.md new file mode 100644 index 00000000..d2fb894b --- /dev/null +++ b/docs/ProductPurchaseRecord.md @@ -0,0 +1,24 @@ + + +# ProductPurchaseRecord + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **Integer** | | | +|**balance** | **Integer** | | | +|**date** | **OffsetDateTime** | | | +|**fromUserDisplayName** | **String** | | | +|**listingDisplayName** | **String** | | | +|**listingType** | **ProductListingType** | | | +|**platform** | **String** | Where (first- or third-party) the purchase was made | | +|**purchaseId** | **String** | | | +|**reason** | **Integer** | | | +|**reasonLabel** | **String** | | | +|**transactionId** | **Integer** | | | +|**transactionLineId** | **Integer** | | | + + + diff --git a/docs/ProductType.md b/docs/ProductType.md new file mode 100644 index 00000000..b6cf61f9 --- /dev/null +++ b/docs/ProductType.md @@ -0,0 +1,17 @@ + + +# ProductType + +## Enum + + +* `INVENTORY` (value: `"inventory"`) + +* `LISTING` (value: `"listing"`) + +* `ROLE` (value: `"role"`) + +* `UDON` (value: `"udon"`) + + + 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/Prop.md b/docs/Prop.md new file mode 100644 index 00000000..10f9ddfe --- /dev/null +++ b/docs/Prop.md @@ -0,0 +1,29 @@ + + +# Prop + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**updatedAt** | **OffsetDateTime** | | | +|**authorId** | **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. | | +|**authorName** | **String** | | | +|**description** | **String** | | | +|**id** | **String** | | | +|**imageUrl** | **String** | | | +|**maxCountPerUser** | **Integer** | | | +|**name** | **String** | | | +|**releaseStatus** | **ReleaseStatus** | | | +|**spawnType** | **Integer** | 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: ??? | | +|**tags** | **List<String>** | | | +|**thumbnailImageUrl** | **String** | | | +|**unityPackageUrl** | **String** | | | +|**unityPackages** | [**Set<PropUnityPackage>**](PropUnityPackage.md) | | | +|**worldPlacementMask** | **Integer** | Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings | | + + + diff --git a/docs/PropPublishStatus.md b/docs/PropPublishStatus.md new file mode 100644 index 00000000..776febac --- /dev/null +++ b/docs/PropPublishStatus.md @@ -0,0 +1,13 @@ + + +# PropPublishStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**canPublish** | **Boolean** | | [optional] | + + + diff --git a/docs/PropUnityPackage.md b/docs/PropUnityPackage.md new file mode 100644 index 00000000..d6f7d944 --- /dev/null +++ b/docs/PropUnityPackage.md @@ -0,0 +1,19 @@ + + +# PropUnityPackage + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | | +|**assetVersion** | **Integer** | | | +|**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`. | | +|**propSignature** | **String** | | | +|**unityVersion** | **String** | | | +|**variant** | **String** | | | + + + diff --git a/docs/PropsApi.md b/docs/PropsApi.md new file mode 100644 index 00000000..5e9214c3 --- /dev/null +++ b/docs/PropsApi.md @@ -0,0 +1,594 @@ +# PropsApi + +All URIs are relative to *https://api.vrchat.cloud/api/1* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createProp**](PropsApi.md#createProp) | **POST** /props | Create Prop | +| [**deleteProp**](PropsApi.md#deleteProp) | **DELETE** /props/{propId} | Delete Prop | +| [**getProp**](PropsApi.md#getProp) | **GET** /props/{propId} | Get Prop | +| [**getPropPublishStatus**](PropsApi.md#getPropPublishStatus) | **GET** /props/{propId}/publish | Get Prop Publish Status | +| [**listProps**](PropsApi.md#listProps) | **GET** /props | List Props | +| [**publishProp**](PropsApi.md#publishProp) | **PUT** /props/{propId}/publish | Publish Prop | +| [**unpublishProp**](PropsApi.md#unpublishProp) | **DELETE** /props/{propId}/publish | Unpublish Prop | +| [**updateProp**](PropsApi.md#updateProp) | **PUT** /props/{propId} | Update Prop | + + + +# **createProp** +> Prop createProp(createPropRequest) + +Create Prop + +Create a Prop and return the new Prop object. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + CreatePropRequest createPropRequest = new CreatePropRequest(); // CreatePropRequest | + try { + Prop result = apiInstance.createProp(createPropRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#createProp"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createPropRequest** | [**CreatePropRequest**](CreatePropRequest.md)| | | + +### Return type + +[**Prop**](Prop.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **deleteProp** +> deleteProp(propId) + +Delete Prop + +Delete a Prop. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + String propId = "propId_example"; // String | Prop ID. + try { + apiInstance.deleteProp(propId); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#deleteProp"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **propId** | **String**| Prop ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The Prop is successfully deleted. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response due to missing permissions. | - | +| **404** | Error response when trying to perform operations on a non-existing prop. | - | + + +# **getProp** +> Prop getProp(propId) + +Get Prop + +Returns a Prop object. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + String propId = "propId_example"; // String | Prop ID. + try { + Prop result = apiInstance.getProp(propId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#getProp"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **propId** | **String**| Prop ID. | | + +### Return type + +[**Prop**](Prop.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 single Prop object. | - | +| **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) + +Get Prop Publish Status + +Returns a PropPublishStatus object. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + String propId = "propId_example"; // String | Prop ID. + try { + PropPublishStatus result = apiInstance.getPropPublishStatus(propId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#getPropPublishStatus"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **propId** | **String**| Prop ID. | | + +### Return type + +[**PropPublishStatus**](PropPublishStatus.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 single PropPublishStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +List Props + +Returns a list Prop objects. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + String authorId = "authorId_example"; // String | Must be a valid user ID. + 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. + try { + List result = apiInstance.listProps(authorId, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#listProps"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **authorId** | **String**| Must be a valid user ID. | | +| **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] | + +### Return type + +[**List<Prop>**](Prop.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 list of Prop objects. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response due to missing permissions. | - | + + +# **publishProp** +> PropPublishStatus publishProp(propId) + +Publish Prop + +Publish a Prop and return the updated PropPublishStatus object. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + String propId = "propId_example"; // String | Prop ID. + try { + PropPublishStatus result = apiInstance.publishProp(propId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#publishProp"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **propId** | **String**| Prop ID. | | + +### Return type + +[**PropPublishStatus**](PropPublishStatus.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 single PropPublishStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response due to missing permissions. | - | +| **404** | Error response when trying to perform operations on a non-existing prop. | - | + + +# **unpublishProp** +> PropPublishStatus unpublishProp(propId) + +Unpublish Prop + +Unpublish a Prop and return the updated PropPublishStatus object. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + String propId = "propId_example"; // String | Prop ID. + try { + PropPublishStatus result = apiInstance.unpublishProp(propId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#unpublishProp"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **propId** | **String**| Prop ID. | | + +### Return type + +[**PropPublishStatus**](PropPublishStatus.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 single PropPublishStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) + +Update Prop + +Updates a Prop and returns the updated Prop object. When updating the asset bundle, all of `name`, `assetUrl`, `platform`, `unityVersion`, `assetVersion`, `spawnType`, and `worldPlacementMask` must be present, as well as `propSignature` if this value is not blank. + +### 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.PropsApi; + +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"); + + PropsApi apiInstance = new PropsApi(defaultClient); + String propId = "propId_example"; // String | Prop ID. + UpdatePropRequest updatePropRequest = new UpdatePropRequest(); // UpdatePropRequest | + try { + Prop result = apiInstance.updateProp(propId, updatePropRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropsApi#updateProp"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **propId** | **String**| Prop ID. | | +| **updatePropRequest** | [**UpdatePropRequest**](UpdatePropRequest.md)| | | + +### Return type + +[**Prop**](Prop.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | +| **404** | Error response when trying to perform operations on a non-existing prop. | - | + diff --git a/docs/PublicAnnouncement.md b/docs/PublicAnnouncement.md deleted file mode 100644 index 3c516d7b..00000000 --- a/docs/PublicAnnouncement.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PublicAnnouncement - -Public Announcement - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Announcement name | -**text** | **String** | Announcement text | - - - 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/PurchaseContextData.md b/docs/PurchaseContextData.md new file mode 100644 index 00000000..a26fe48f --- /dev/null +++ b/docs/PurchaseContextData.md @@ -0,0 +1,15 @@ + + +# PurchaseContextData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**locationType** | **ProductPurchaseLocationType** | | | +|**storeId** | **String** | | [optional] | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] | + + + diff --git a/docs/PurchaseProductListingRequest.md b/docs/PurchaseProductListingRequest.md new file mode 100644 index 00000000..5773bc24 --- /dev/null +++ b/docs/PurchaseProductListingRequest.md @@ -0,0 +1,19 @@ + + +# PurchaseProductListingRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contextData** | [**PurchaseContextData**](PurchaseContextData.md) | | [optional] | +|**listingId** | **String** | | | +|**listingVariantId** | **String** | | [optional] | +|**quantity** | **Integer** | | | +|**receiverId** | **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] | +|**stackable** | **Boolean** | | [optional] | +|**totalPrice** | **Integer** | | | + + + diff --git a/docs/Region.md b/docs/Region.md index 5cfc82a4..867b120c 100644 --- a/docs/Region.md +++ b/docs/Region.md @@ -5,15 +5,19 @@ ## Enum -* `US` (value: `"us"`) - -* `USE` (value: `"use"`) - * `EU` (value: `"eu"`) * `JP` (value: `"jp"`) * `UNKNOWN` (value: `"unknown"`) +* `US` (value: `"us"`) + +* `USE` (value: `"use"`) + +* `USW` (value: `"usw"`) + +* `USX` (value: `"usx"`) + 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 new file mode 100644 index 00000000..255ca710 --- /dev/null +++ b/docs/RegisterUserAccountRequest.md @@ -0,0 +1,21 @@ + + +# RegisterUserAccountRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acceptedTOSVersion** | **Integer** | The most recent version of the TOS | | +|**captchaCode** | **String** | Captcha code | | +|**day** | **String** | Birth day of month | | +|**email** | **String** | Email address | | +|**month** | **String** | Birth month of year | | +|**password** | **String** | Password | | +|**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/ReleaseStatus.md b/docs/ReleaseStatus.md index c8a20510..63818ae9 100644 --- a/docs/ReleaseStatus.md +++ b/docs/ReleaseStatus.md @@ -5,11 +5,13 @@ ## Enum -* `PUBLIC` (value: `"public"`) +* `ALL` (value: `"all"`) + +* `HIDDEN` (value: `"hidden"`) * `PRIVATE` (value: `"private"`) -* `HIDDEN` (value: `"hidden"`) +* `PUBLIC` (value: `"public"`) diff --git a/docs/ReportCategory.md b/docs/ReportCategory.md new file mode 100644 index 00000000..e506321d --- /dev/null +++ b/docs/ReportCategory.md @@ -0,0 +1,17 @@ + + +# ReportCategory + +A category used for reporting content + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | The description of the report category | [optional] | +|**text** | **String** | The label of the report category | | +|**title** | **String** | The title of the report category | [optional] | +|**tooltip** | **String** | The tooltip that describes the category | | + + + diff --git a/docs/ReportReason.md b/docs/ReportReason.md new file mode 100644 index 00000000..625759ef --- /dev/null +++ b/docs/ReportReason.md @@ -0,0 +1,15 @@ + + +# ReportReason + +A reason used for reporting users + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**text** | **String** | The label or name of the report reason | | +|**tooltip** | **String** | A brief explanation of what this reason entails | | + + + diff --git a/docs/RepresentedGroup.md b/docs/RepresentedGroup.md new file mode 100644 index 00000000..4e42be10 --- /dev/null +++ b/docs/RepresentedGroup.md @@ -0,0 +1,26 @@ + + +# RepresentedGroup + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bannerId** | **String** | | [optional] | +|**bannerUrl** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**discriminator** | **String** | | [optional] | +|**groupId** | **String** | | [optional] | +|**iconId** | **String** | | [optional] | +|**iconUrl** | **String** | | [optional] | +|**isRepresenting** | **Boolean** | | [optional] | +|**memberCount** | **Integer** | | [optional] | +|**memberVisibility** | **GroupUserVisibility** | | [optional] | +|**name** | **String** | | [optional] | +|**ownerId** | **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] | +|**privacy** | **GroupPrivacy** | | [optional] | +|**shortCode** | **String** | | [optional] | + + + diff --git a/docs/RequestInviteRequest.md b/docs/RequestInviteRequest.md index 623b5185..785b34a0 100644 --- a/docs/RequestInviteRequest.md +++ b/docs/RequestInviteRequest.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messageSlot** | **Integer** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestSlot** | **Integer** | | [optional] | diff --git a/docs/RequestInviteWithPhotoRequest.md b/docs/RequestInviteWithPhotoRequest.md new file mode 100644 index 00000000..0d99c754 --- /dev/null +++ b/docs/RequestInviteWithPhotoRequest.md @@ -0,0 +1,14 @@ + + +# RequestInviteWithPhotoRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**RequestInviteRequest**](RequestInviteRequest.md) | | | +|**image** | **File** | The binary blob of the png file. | | + + + 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/RespondGroupJoinRequest.md b/docs/RespondGroupJoinRequest.md new file mode 100644 index 00000000..6538d53e --- /dev/null +++ b/docs/RespondGroupJoinRequest.md @@ -0,0 +1,14 @@ + + +# RespondGroupJoinRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**action** | **GroupJoinRequestAction** | | | +|**block** | **Boolean** | Whether to block the user from requesting again | [optional] | + + + diff --git a/docs/RespondInviteWithPhotoRequest.md b/docs/RespondInviteWithPhotoRequest.md new file mode 100644 index 00000000..243b716c --- /dev/null +++ b/docs/RespondInviteWithPhotoRequest.md @@ -0,0 +1,14 @@ + + +# RespondInviteWithPhotoRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**InviteResponse**](InviteResponse.md) | | | +|**image** | **File** | The binary blob of the png file. | | + + + diff --git a/docs/RespondNotificationV2Request.md b/docs/RespondNotificationV2Request.md new file mode 100644 index 00000000..3a77a028 --- /dev/null +++ b/docs/RespondNotificationV2Request.md @@ -0,0 +1,14 @@ + + +# RespondNotificationV2Request + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**responseData** | **String** | | [optional] | +|**responseType** | **String** | | | + + + diff --git a/docs/Response.md b/docs/Response.md index 2b1596ed..812612d5 100644 --- a/docs/Response.md +++ b/docs/Response.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **String** | | [optional] -**statusCode** | **Integer** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | | [optional] | +|**statusCode** | **Integer** | | | diff --git a/docs/RewardBadge.md b/docs/RewardBadge.md new file mode 100644 index 00000000..da280af1 --- /dev/null +++ b/docs/RewardBadge.md @@ -0,0 +1,24 @@ + + +# RewardBadge + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**createdBy** | **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. | | +|**description** | **String** | | | +|**fileName** | **String** | | | +|**hidden** | **Boolean** | | | +|**id** | **String** | | | +|**imageUrl** | **String** | | | +|**isLocalizationEnabled** | **Boolean** | | | +|**machineName** | **String** | | [optional] | +|**name** | **String** | | | +|**type** | **String** | | | +|**updatedAt** | **OffsetDateTime** | | | + + + diff --git a/docs/RewardRedemption.md b/docs/RewardRedemption.md new file mode 100644 index 00000000..5b25282e --- /dev/null +++ b/docs/RewardRedemption.md @@ -0,0 +1,14 @@ + + +# RewardRedemption + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**RewardRedemptionData**](RewardRedemptionData.md) | | | +|**type** | **String** | One of `badge`, `item`, ... | | + + + diff --git a/docs/RewardRedemptionData.md b/docs/RewardRedemptionData.md new file mode 100644 index 00000000..ad0d4985 --- /dev/null +++ b/docs/RewardRedemptionData.md @@ -0,0 +1,14 @@ + + +# RewardRedemptionData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**badge** | [**RewardBadge**](RewardBadge.md) | | [optional] | +|**item** | [**InventoryTemplate**](InventoryTemplate.md) | | [optional] | + + + diff --git a/docs/RewardRedemptionRequest.md b/docs/RewardRedemptionRequest.md new file mode 100644 index 00000000..80e8f62f --- /dev/null +++ b/docs/RewardRedemptionRequest.md @@ -0,0 +1,13 @@ + + +# RewardRedemptionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | | + + + diff --git a/docs/RewardRedemptionResult.md b/docs/RewardRedemptionResult.md new file mode 100644 index 00000000..78021078 --- /dev/null +++ b/docs/RewardRedemptionResult.md @@ -0,0 +1,14 @@ + + +# RewardRedemptionResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**redeemedRewards** | [**List<RewardRedemption>**](RewardRedemption.md) | | | +|**redemptionCode** | **String** | | | + + + diff --git a/docs/SearchGroupMembers200Response.md b/docs/SearchGroupMembers200Response.md new file mode 100644 index 00000000..d5a048d0 --- /dev/null +++ b/docs/SearchGroupMembers200Response.md @@ -0,0 +1,14 @@ + + +# SearchGroupMembers200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**results** | [**List<GroupMember>**](GroupMember.md) | | [optional] | +|**total** | **Integer** | Number of members returned | [optional] | + + + diff --git a/docs/SellerEligibility.md b/docs/SellerEligibility.md new file mode 100644 index 00000000..20969245 --- /dev/null +++ b/docs/SellerEligibility.md @@ -0,0 +1,13 @@ + + +# SellerEligibility + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eligible** | **Boolean** | | | + + + diff --git a/docs/SentNotification.md b/docs/SentNotification.md new file mode 100644 index 00000000..b8db15ac --- /dev/null +++ b/docs/SentNotification.md @@ -0,0 +1,21 @@ + + +# SentNotification + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**details** | **Map<String, String>** | | | +|**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. | | +|**senderUserId** | **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. | | +|**senderUsername** | **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] | +|**type** | **NotificationType** | | | + + + 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/ServiceQueueStats.md b/docs/ServiceQueueStats.md new file mode 100644 index 00000000..89d106cd --- /dev/null +++ b/docs/ServiceQueueStats.md @@ -0,0 +1,14 @@ + + +# ServiceQueueStats + +Statistics about the user's currently queued service request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**estimatedServiceDurationSeconds** | **Integer** | | | + + + diff --git a/docs/ServiceStatus.md b/docs/ServiceStatus.md new file mode 100644 index 00000000..b9aaf3be --- /dev/null +++ b/docs/ServiceStatus.md @@ -0,0 +1,22 @@ + + +# ServiceStatus + +Status information for a service request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**id** | **String** | The id of this service, NOT the id of the thing this service was requested for. | | +|**progress** | **List<Object>** | | | +|**requesterUserId** | **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. | | +|**state** | **String** | | | +|**subjectId** | **String** | The id of the thing this service was requested for. | | +|**subjectType** | **String** | The kind of the thing this service was requested for. | | +|**type** | **String** | The kind of service that was requested. | | +|**updatedAt** | **OffsetDateTime** | | | + + + diff --git a/docs/ShareInventoryItemDirectRequest.md b/docs/ShareInventoryItemDirectRequest.md new file mode 100644 index 00000000..280ddd7c --- /dev/null +++ b/docs/ShareInventoryItemDirectRequest.md @@ -0,0 +1,14 @@ + + +# ShareInventoryItemDirectRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**itemId** | **String** | | | +|**users** | **List<String>** | | | + + + diff --git a/docs/SortOption.md b/docs/SortOption.md new file mode 100644 index 00000000..d2fa9c3f --- /dev/null +++ b/docs/SortOption.md @@ -0,0 +1,45 @@ + + +# SortOption + +## Enum + + +* `_CREATED_AT` (value: `"_created_at"`) + +* `_UPDATED_AT` (value: `"_updated_at"`) + +* `CREATED` (value: `"created"`) + +* `FAVORITES` (value: `"favorites"`) + +* `HEAT` (value: `"heat"`) + +* `LABS_PUBLICATION_DATE` (value: `"labsPublicationDate"`) + +* `MAGIC` (value: `"magic"`) + +* `NAME` (value: `"name"`) + +* `ORDER` (value: `"order"`) + +* `POPULARITY` (value: `"popularity"`) + +* `PUBLICATION_DATE` (value: `"publicationDate"`) + +* `RANDOM` (value: `"random"`) + +* `RELEVANCE` (value: `"relevance"`) + +* `REPORT_COUNT` (value: `"reportCount"`) + +* `REPORT_SCORE` (value: `"reportScore"`) + +* `SHUFFLE` (value: `"shuffle"`) + +* `TRUST` (value: `"trust"`) + +* `UPDATED` (value: `"updated"`) + + + diff --git a/docs/SortOptionProductPurchase.md b/docs/SortOptionProductPurchase.md new file mode 100644 index 00000000..52c17658 --- /dev/null +++ b/docs/SortOptionProductPurchase.md @@ -0,0 +1,11 @@ + + +# SortOptionProductPurchase + +## Enum + + +* `PURCHASE_DATE` (value: `"purchaseDate"`) + + + diff --git a/docs/Store.md b/docs/Store.md new file mode 100644 index 00000000..41df89f7 --- /dev/null +++ b/docs/Store.md @@ -0,0 +1,30 @@ + + +# Store + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**created** | **OffsetDateTime** | | [optional] | +|**description** | **String** | | | +|**displayName** | **String** | | | +|**groupId** | **String** | | [optional] | +|**id** | **String** | | | +|**listingIds** | **List<String>** | Only for store type world and group | [optional] | +|**listings** | [**List<ProductListing>**](ProductListing.md) | Only for store type world and group | [optional] | +|**sellerDisplayName** | **String** | | | +|**sellerId** | **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. | | +|**shelfIds** | **List<String>** | Only for store type house | [optional] | +|**shelves** | [**List<StoreShelf>**](StoreShelf.md) | Only for store type house | [optional] | +|**storeContext** | [**StoreContext**](StoreContext.md) | | [optional] | +|**storeId** | **String** | | | +|**storeStatus** | **String** | | [optional] | +|**storeType** | **StoreType** | | | +|**tags** | **List<String>** | | | +|**updated** | **OffsetDateTime** | | [optional] | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] | + + + diff --git a/docs/StoreContext.md b/docs/StoreContext.md new file mode 100644 index 00000000..fb4e0705 --- /dev/null +++ b/docs/StoreContext.md @@ -0,0 +1,15 @@ + + +# StoreContext + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**imageUrl** | **String** | | | +|**name** | **String** | | | + + + diff --git a/docs/StoreShelf.md b/docs/StoreShelf.md new file mode 100644 index 00000000..5aaef9ae --- /dev/null +++ b/docs/StoreShelf.md @@ -0,0 +1,21 @@ + + +# StoreShelf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**highlightListing** | [**ProductListing**](ProductListing.md) | | [optional] | +|**highlightListingId** | **String** | | [optional] | +|**id** | **String** | | | +|**listingIds** | **List<String>** | | | +|**listings** | [**List<ProductListing>**](ProductListing.md) | | [optional] | +|**shelfDescription** | **String** | | | +|**shelfLayout** | **String** | | | +|**shelfTitle** | **String** | | | +|**updatedAt** | **OffsetDateTime** | | | + + + diff --git a/docs/StoreType.md b/docs/StoreType.md new file mode 100644 index 00000000..8e78dcdf --- /dev/null +++ b/docs/StoreType.md @@ -0,0 +1,15 @@ + + +# StoreType + +## Enum + + +* `GROUP` (value: `"group"`) + +* `HOUSE` (value: `"house"`) + +* `WORLD` (value: `"world"`) + + + diff --git a/docs/StoreView.md b/docs/StoreView.md new file mode 100644 index 00000000..ab899504 --- /dev/null +++ b/docs/StoreView.md @@ -0,0 +1,19 @@ + + +# StoreView + +## Enum + + +* `ALL` (value: `"all"`) + +* `DRAFT` (value: `"draft"`) + +* `PREVIEW` (value: `"preview"`) + +* `PUBLIC` (value: `"public"`) + +* `PUBLIC_PREVIEW` (value: `"publicPreview"`) + + + diff --git a/docs/SubmitModerationReportRequest.md b/docs/SubmitModerationReportRequest.md new file mode 100644 index 00000000..f77ead5e --- /dev/null +++ b/docs/SubmitModerationReportRequest.md @@ -0,0 +1,19 @@ + + +# SubmitModerationReportRequest + +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() + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**category** | **String** | Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`. | | +|**contentId** | **String** | The id of the user, group, world, avatar, inventory item, print, etc. being reported. | | +|**description** | **String** | The subjective reason for the report | [optional] | +|**details** | [**SubmitModerationReportRequestDetails**](SubmitModerationReportRequestDetails.md) | | [optional] | +|**reason** | **String** | Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`. | | +|**type** | **String** | Valid values are the keys of the object `$.reportOptions` from `GET /config`. | | + + + diff --git a/docs/SubmitModerationReportRequestDetails.md b/docs/SubmitModerationReportRequestDetails.md new file mode 100644 index 00000000..37c6180a --- /dev/null +++ b/docs/SubmitModerationReportRequestDetails.md @@ -0,0 +1,20 @@ + + +# SubmitModerationReportRequestDetails + +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. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fileId** | **String** | | [optional] | +|**holderId** | **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] | +|**imageType** | **String** | Relevant detail for reports about image content, such as emoji. | [optional] | +|**instanceAgeGated** | **Boolean** | Relevant detail for reports taking place from within an instance. | [optional] | +|**instanceType** | **String** | Relevant detail for reports taking place from within an instance. | [optional] | +|**suggestedWarnings** | **List<ContentFilter>** | Relevant detail for reports about content that might not be tagged properly. | [optional] | +|**userInSameInstance** | **Boolean** | Relevant detail for reports involving another user in the same instance world. | [optional] | + + + diff --git a/docs/Subscription.md b/docs/Subscription.md index ab98b034..c4c69c73 100644 --- a/docs/Subscription.md +++ b/docs/Subscription.md @@ -3,16 +3,22 @@ # Subscription + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**steamItemId** | **String** | | -**amount** | **BigDecimal** | | -**description** | **String** | | -**period** | **SubscriptionPeriod** | | -**tier** | **BigDecimal** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **BigDecimal** | | | +|**appleProductId** | **String** | | [optional] | +|**description** | **String** | | | +|**googlePlanId** | **String** | | [optional] | +|**googleProductId** | **String** | | [optional] | +|**id** | **String** | | | +|**oculusSku** | **String** | | [optional] | +|**period** | **SubscriptionPeriod** | | | +|**picoSku** | **String** | | [optional] | +|**steamItemId** | **String** | | | +|**tier** | **Integer** | | | diff --git a/docs/SubscriptionPeriod.md b/docs/SubscriptionPeriod.md index 44bed90f..f19216af 100644 --- a/docs/SubscriptionPeriod.md +++ b/docs/SubscriptionPeriod.md @@ -5,14 +5,14 @@ ## Enum -* `HOUR` (value: `"hour"`) - * `DAY` (value: `"day"`) -* `WEEK` (value: `"week"`) +* `HOUR` (value: `"hour"`) * `MONTH` (value: `"month"`) +* `WEEK` (value: `"week"`) + * `YEAR` (value: `"year"`) diff --git a/docs/Success.md b/docs/Success.md index 53bb3160..bdd3d11c 100644 --- a/docs/Success.md +++ b/docs/Success.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | [**Response**](Response.md) | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | [**Response**](Response.md) | | [optional] | diff --git a/docs/SuccessFlag.md b/docs/SuccessFlag.md new file mode 100644 index 00000000..dbb48534 --- /dev/null +++ b/docs/SuccessFlag.md @@ -0,0 +1,13 @@ + + +# SuccessFlag + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | | | + + + diff --git a/docs/TiliaKyc.md b/docs/TiliaKyc.md new file mode 100644 index 00000000..95886688 --- /dev/null +++ b/docs/TiliaKyc.md @@ -0,0 +1,20 @@ + + +# TiliaKyc + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountId** | **String** | Tilia account identifier. | | +|**kycId** | **String** | KYC verification identifier. | | +|**kycRequirements** | **String** | Requirement state reported by Tilia. | | +|**matchChecks** | **List<String>** | Match checks returned by Tilia. | | +|**piiLevel** | **String** | PII verification level. | | +|**rules** | **List<String>** | Additional rules returned by Tilia. | | +|**state** | **String** | Overall KYC state. | | +|**tiliaRetryRuleCode** | **String** | Retry rule code returned by Tilia, if any. | | + + + diff --git a/docs/TiliaStatus.md b/docs/TiliaStatus.md new file mode 100644 index 00000000..a90c68a5 --- /dev/null +++ b/docs/TiliaStatus.md @@ -0,0 +1,17 @@ + + +# TiliaStatus + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**economyOnline** | **Boolean** | | | +|**economyState** | **Integer** | | [optional] | +|**plannedOfflineWindowEnd** | **OffsetDateTime** | | [optional] | +|**plannedOfflineWindowStart** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/TiliaTOS.md b/docs/TiliaTOS.md new file mode 100644 index 00000000..62bd4821 --- /dev/null +++ b/docs/TiliaTOS.md @@ -0,0 +1,14 @@ + + +# TiliaTOS + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**signedTos** | **Boolean** | | | + + + diff --git a/docs/TokenBundle.md b/docs/TokenBundle.md new file mode 100644 index 00000000..568459a4 --- /dev/null +++ b/docs/TokenBundle.md @@ -0,0 +1,21 @@ + + +# TokenBundle + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **Integer** | price of the bundle | | +|**appleProductId** | **String** | | | +|**description** | **String** | | | +|**googleProductId** | **String** | | [optional] | +|**id** | **String** | | | +|**imageUrl** | **String** | direct url to image | | +|**oculusSku** | **String** | | | +|**steamItemId** | **String** | | | +|**tokens** | **Integer** | number of tokens received | | + + + diff --git a/docs/Transaction.md b/docs/Transaction.md index f4d4b2d7..f2357180 100644 --- a/docs/Transaction.md +++ b/docs/Transaction.md @@ -3,19 +3,24 @@ # Transaction + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**status** | **TransactionStatus** | | -**subscription** | [**Subscription**](Subscription.md) | | -**sandbox** | **Boolean** | | -**createdAt** | **OffsetDateTime** | | -**updatedAt** | **OffsetDateTime** | | -**steam** | [**TransactionSteamInfo**](TransactionSteamInfo.md) | | [optional] -**agreement** | [**TransactionAgreement**](TransactionAgreement.md) | | [optional] -**error** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**agreement** | [**TransactionAgreement**](TransactionAgreement.md) | | [optional] | +|**createdAt** | **OffsetDateTime** | | | +|**error** | **String** | | | +|**id** | **String** | | | +|**isGift** | **Boolean** | | [optional] | +|**isTokens** | **Boolean** | | [optional] | +|**sandbox** | **Boolean** | | | +|**status** | **TransactionStatus** | | | +|**steam** | [**TransactionSteamInfo**](TransactionSteamInfo.md) | | [optional] | +|**subscription** | [**Subscription**](Subscription.md) | | | +|**updatedAt** | **OffsetDateTime** | | | +|**userDisplayName** | **String** | | [optional] | +|**userId** | **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] | diff --git a/docs/TransactionAgreement.md b/docs/TransactionAgreement.md index 779a34e3..f76706c7 100644 --- a/docs/TransactionAgreement.md +++ b/docs/TransactionAgreement.md @@ -2,28 +2,30 @@ # TransactionAgreement +Represents a single Transaction, which is likely between VRChat and Steam. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agreementId** | **String** | | -**itemId** | **BigDecimal** | | -**status** | **String** | This is NOT TransactionStatus, but whatever Steam return. | -**period** | **String** | | -**frequency** | **BigDecimal** | | -**billingType** | **String** | | -**startDate** | **String** | | -**endDate** | **String** | | -**recurringAmt** | **BigDecimal** | | -**currency** | **String** | | -**timeCreated** | **String** | | -**nextPayment** | **String** | | -**lastPayment** | **String** | | -**lastAmount** | **BigDecimal** | | -**lastAmountVat** | **BigDecimal** | | -**outstanding** | **BigDecimal** | | -**failedAttempts** | **BigDecimal** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**agreement** | **String** | | | +|**agreementId** | **String** | | | +|**billingType** | **String** | | | +|**currency** | **String** | | | +|**endDate** | **String** | | | +|**failedAttempts** | **Integer** | | | +|**frequency** | **Integer** | | | +|**itemId** | **Integer** | | | +|**lastAmount** | **BigDecimal** | | | +|**lastAmountVat** | **BigDecimal** | | | +|**lastPayment** | **String** | | | +|**nextPayment** | **String** | | | +|**outstanding** | **Integer** | | | +|**period** | **String** | | | +|**recurringAmt** | **BigDecimal** | | | +|**startDate** | **String** | | | +|**status** | **String** | This is NOT TransactionStatus, but whatever Steam return. | | +|**timeCreated** | **String** | | | diff --git a/docs/TransactionStatus.md b/docs/TransactionStatus.md index 02b21a98..ed954abb 100644 --- a/docs/TransactionStatus.md +++ b/docs/TransactionStatus.md @@ -7,11 +7,11 @@ * `ACTIVE` (value: `"active"`) -* `FAILED` (value: `"failed"`) +* `CHARGEBACK` (value: `"chargeback"`) * `EXPIRED` (value: `"expired"`) -* `CHARGEBACK` (value: `"chargeback"`) +* `FAILED` (value: `"failed"`) diff --git a/docs/TransactionSteamInfo.md b/docs/TransactionSteamInfo.md index f9fb4ad0..2d6a9e8d 100644 --- a/docs/TransactionSteamInfo.md +++ b/docs/TransactionSteamInfo.md @@ -3,15 +3,16 @@ # TransactionSteamInfo + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**walletInfo** | [**TransactionSteamWalletInfo**](TransactionSteamWalletInfo.md) | | -**steamId** | **String** | Steam User ID | -**orderId** | **String** | Steam Order ID | -**steamUrl** | **String** | Empty | -**transId** | **String** | Steam Transaction ID, NOT the same as VRChat TransactionID | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**orderId** | **String** | Steam Order ID | | +|**steamId** | **String** | Steam User ID | | +|**steamUrl** | **String** | Empty | | +|**transId** | **String** | Steam Transaction ID, NOT the same as VRChat TransactionID | | +|**walletInfo** | [**TransactionSteamWalletInfo**](TransactionSteamWalletInfo.md) | | | diff --git a/docs/TransactionSteamWalletInfo.md b/docs/TransactionSteamWalletInfo.md index c494cc98..dbba0670 100644 --- a/docs/TransactionSteamWalletInfo.md +++ b/docs/TransactionSteamWalletInfo.md @@ -3,14 +3,15 @@ # TransactionSteamWalletInfo + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **String** | | -**country** | **String** | | -**currency** | **String** | | -**status** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**country** | **String** | | | +|**currency** | **String** | | | +|**state** | **String** | | | +|**status** | **String** | | | diff --git a/docs/TransferGroupRequest.md b/docs/TransferGroupRequest.md new file mode 100644 index 00000000..a547dc37 --- /dev/null +++ b/docs/TransferGroupRequest.md @@ -0,0 +1,13 @@ + + +# TransferGroupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**transferTargetId** | **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] | + + + diff --git a/docs/TutorialStatus.md b/docs/TutorialStatus.md new file mode 100644 index 00000000..2634d4ea --- /dev/null +++ b/docs/TutorialStatus.md @@ -0,0 +1,16 @@ + + +# TutorialStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**completed** | **Boolean** | | | +|**completedAnyTutorial** | **Boolean** | | | +|**completedTutorials** | **List<String>** | | | +|**tutorialKey** | **String** | The ID of a tutorial, in the format `{platform}:{tutorial}:{version}`. `undefined:undefined:v1` is used as a null-ish or sentinel value. | | + + + diff --git a/docs/TwoFactorAuthCode.md b/docs/TwoFactorAuthCode.md index 0eae82b4..783dd6e7 100644 --- a/docs/TwoFactorAuthCode.md +++ b/docs/TwoFactorAuthCode.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | | 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/TwoFactorEmailCode.md b/docs/TwoFactorEmailCode.md new file mode 100644 index 00000000..4a448e8d --- /dev/null +++ b/docs/TwoFactorEmailCode.md @@ -0,0 +1,13 @@ + + +# TwoFactorEmailCode + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | | + + + diff --git a/docs/TwoFactorRecoveryCodes.md b/docs/TwoFactorRecoveryCodes.md new file mode 100644 index 00000000..6b09a679 --- /dev/null +++ b/docs/TwoFactorRecoveryCodes.md @@ -0,0 +1,14 @@ + + +# TwoFactorRecoveryCodes + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otp** | [**List<TwoFactorRecoveryCodesOtpInner>**](TwoFactorRecoveryCodesOtpInner.md) | | [optional] | +|**requiresTwoFactorAuth** | **List<String>** | | [optional] | + + + diff --git a/docs/TwoFactorRecoveryCodesOtpInner.md b/docs/TwoFactorRecoveryCodesOtpInner.md new file mode 100644 index 00000000..3c247c6d --- /dev/null +++ b/docs/TwoFactorRecoveryCodesOtpInner.md @@ -0,0 +1,14 @@ + + +# TwoFactorRecoveryCodesOtpInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | | +|**used** | **Boolean** | | | + + + diff --git a/docs/UnityPackage.md b/docs/UnityPackage.md index e2fa5626..44df8192 100644 --- a/docs/UnityPackage.md +++ b/docs/UnityPackage.md @@ -3,20 +3,27 @@ # UnityPackage + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assetUrl** | **String** | | [optional] -**assetUrlObject** | **Object** | | [optional] -**assetVersion** | **Integer** | | -**createdAt** | **OffsetDateTime** | | [optional] -**id** | **String** | | -**platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | -**pluginUrl** | **String** | | [optional] -**pluginUrlObject** | **Object** | | [optional] -**unitySortNumber** | **Integer** | | [optional] -**unityVersion** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | [optional] | +|**assetUrlObject** | **Object** | | [optional] | +|**assetVersion** | **Integer** | | | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**id** | **String** | | | +|**impostorUrl** | **String** | | [optional] | +|**impostorizerVersion** | **String** | | [optional] | +|**performanceRating** | **PerformanceRatings** | | [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`. | | +|**pluginUrl** | **String** | | [optional] | +|**pluginUrlObject** | **Object** | | [optional] | +|**scanStatus** | **String** | | [optional] | +|**unitySortNumber** | **Long** | | [optional] | +|**unityVersion** | **String** | | | +|**variant** | **String** | | [optional] | +|**worldSignature** | **String** | | [optional] | diff --git a/docs/UpdateAssetReviewNotesRequest.md b/docs/UpdateAssetReviewNotesRequest.md new file mode 100644 index 00000000..ef0ab916 --- /dev/null +++ b/docs/UpdateAssetReviewNotesRequest.md @@ -0,0 +1,13 @@ + + +# UpdateAssetReviewNotesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reviewNotes** | **String** | | | + + + diff --git a/docs/UpdateAvatarRequest.md b/docs/UpdateAvatarRequest.md index d9eea41f..c46ddec8 100644 --- a/docs/UpdateAvatarRequest.md +++ b/docs/UpdateAvatarRequest.md @@ -5,17 +5,18 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assetUrl** | **String** | | [optional] -**id** | **String** | | [optional] -**name** | **String** | | [optional] -**description** | **String** | | [optional] -**tags** | **List<String>** | | [optional] -**imageUrl** | **String** | | [optional] -**releaseStatus** | **ReleaseStatus** | | [optional] -**version** | **BigDecimal** | | [optional] -**unityPackageUrl** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**releaseStatus** | **ReleaseStatus** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**unityPackageUrl** | **String** | | [optional] | +|**unityVersion** | **String** | | [optional] | +|**version** | **Integer** | | [optional] | diff --git a/docs/UpdateCalendarEventRequest.md b/docs/UpdateCalendarEventRequest.md new file mode 100644 index 00000000..0cf78d25 --- /dev/null +++ b/docs/UpdateCalendarEventRequest.md @@ -0,0 +1,31 @@ + + +# UpdateCalendarEventRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**category** | **String** | | [optional] | +|**closeInstanceAfterEndMinutes** | **Integer** | | [optional] | +|**description** | **String** | | [optional] | +|**endsAt** | **OffsetDateTime** | Time the vent starts at | [optional] | +|**featured** | **Boolean** | | [optional] | +|**guestEarlyJoinMinutes** | **Integer** | | [optional] | +|**hostEarlyJoinMinutes** | **Integer** | | [optional] | +|**imageId** | **String** | | [optional] | +|**isDraft** | **Boolean** | | [optional] | +|**languages** | **List<String>** | | [optional] | +|**parentId** | **String** | | [optional] | +|**platforms** | **List<String>** | | [optional] | +|**recurrence** | [**CalendarEventRecurrence**](CalendarEventRecurrence.md) | | [optional] | +|**roleIds** | **List<String>** | | [optional] | +|**sendCreationNotification** | **Boolean** | Send notification to group members. | [optional] | +|**startsAt** | **OffsetDateTime** | Time the vent starts at | [optional] | +|**tags** | **List<String>** | | [optional] | +|**title** | **String** | Event title | [optional] | +|**usesInstanceOverflow** | **Boolean** | | [optional] | + + + diff --git a/docs/UpdateFavoriteGroupRequest.md b/docs/UpdateFavoriteGroupRequest.md index 869c2b05..68ec3048 100644 --- a/docs/UpdateFavoriteGroupRequest.md +++ b/docs/UpdateFavoriteGroupRequest.md @@ -5,11 +5,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**displayName** | **String** | | [optional] -**visibility** | **FavoriteGroupVisibility** | | [optional] -**tags** | **List<String>** | Tags on FavoriteGroups are believed to do nothing. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**displayName** | **String** | | [optional] | +|**tags** | **List<String>** | Tags on FavoriteGroups are believed to do nothing. | [optional] | +|**visibility** | **FavoriteGroupVisibility** | | [optional] | diff --git a/docs/UpdateGroupGalleryRequest.md b/docs/UpdateGroupGalleryRequest.md new file mode 100644 index 00000000..93c034a1 --- /dev/null +++ b/docs/UpdateGroupGalleryRequest.md @@ -0,0 +1,19 @@ + + +# UpdateGroupGalleryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | Description of the gallery. | [optional] | +|**membersOnly** | **Boolean** | Whether the gallery is members only. | [optional] | +|**name** | **String** | Name of the gallery. | [optional] | +|**roleIdsToAutoApprove** | **List<String>** | | [optional] | +|**roleIdsToManage** | **List<String>** | | [optional] | +|**roleIdsToSubmit** | **List<String>** | | [optional] | +|**roleIdsToView** | **List<String>** | | [optional] | + + + diff --git a/docs/UpdateGroupMemberRequest.md b/docs/UpdateGroupMemberRequest.md new file mode 100644 index 00000000..dc790dd9 --- /dev/null +++ b/docs/UpdateGroupMemberRequest.md @@ -0,0 +1,16 @@ + + +# UpdateGroupMemberRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isSubscribedToAnnouncements** | **Boolean** | | [optional] | +|**isSubscribedToEventAnnouncements** | **Boolean** | | [optional] | +|**managerNotes** | **String** | | [optional] | +|**visibility** | **GroupUserVisibility** | | [optional] | + + + diff --git a/docs/UpdateGroupRepresentationRequest.md b/docs/UpdateGroupRepresentationRequest.md new file mode 100644 index 00000000..a0dc0882 --- /dev/null +++ b/docs/UpdateGroupRepresentationRequest.md @@ -0,0 +1,13 @@ + + +# UpdateGroupRepresentationRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isRepresenting** | **Boolean** | Whether the user is representing the group. | | + + + diff --git a/docs/UpdateGroupRequest.md b/docs/UpdateGroupRequest.md new file mode 100644 index 00000000..394e1279 --- /dev/null +++ b/docs/UpdateGroupRequest.md @@ -0,0 +1,22 @@ + + +# UpdateGroupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bannerId** | **String** | | [optional] | +|**description** | **String** | | [optional] | +|**iconId** | **String** | | [optional] | +|**joinState** | **GroupJoinState** | | [optional] | +|**languages** | **List<String>** | 3 letter language code | [optional] | +|**links** | **List<String>** | | [optional] | +|**name** | **String** | | [optional] | +|**rules** | **String** | | [optional] | +|**shortCode** | **String** | | [optional] | +|**tags** | **List<String>** | | [optional] | + + + diff --git a/docs/UpdateGroupRoleRequest.md b/docs/UpdateGroupRoleRequest.md new file mode 100644 index 00000000..281e7a24 --- /dev/null +++ b/docs/UpdateGroupRoleRequest.md @@ -0,0 +1,17 @@ + + +# UpdateGroupRoleRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | | [optional] | +|**isSelfAssignable** | **Boolean** | | [optional] | +|**name** | **String** | | [optional] | +|**order** | **Integer** | | [optional] | +|**permissions** | **List<GroupPermissions>** | | [optional] | + + + diff --git a/docs/UpdateInventoryItemRequest.md b/docs/UpdateInventoryItemRequest.md new file mode 100644 index 00000000..558d2a55 --- /dev/null +++ b/docs/UpdateInventoryItemRequest.md @@ -0,0 +1,15 @@ + + +# UpdateInventoryItemRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isArchived** | **Boolean** | | [optional] | +|**isSeen** | **Boolean** | | [optional] | +|**userAttributes** | [**InventoryUserAttributes**](InventoryUserAttributes.md) | | [optional] | + + + diff --git a/docs/UpdateInviteMessageRequest.md b/docs/UpdateInviteMessageRequest.md index 58a5ae24..4141ac92 100644 --- a/docs/UpdateInviteMessageRequest.md +++ b/docs/UpdateInviteMessageRequest.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | | | diff --git a/docs/UpdateListingRequest.md b/docs/UpdateListingRequest.md new file mode 100644 index 00000000..5e93fe81 --- /dev/null +++ b/docs/UpdateListingRequest.md @@ -0,0 +1,13 @@ + + +# UpdateListingRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**active** | **Boolean** | | | + + + diff --git a/docs/UpdateProductRequest.md b/docs/UpdateProductRequest.md new file mode 100644 index 00000000..84cf4cef --- /dev/null +++ b/docs/UpdateProductRequest.md @@ -0,0 +1,17 @@ + + +# UpdateProductRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**description** | **String** | | [optional] | +|**displayName** | **String** | | [optional] | +|**imageId** | **String** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**useForSubscriberList** | **Boolean** | | [optional] | + + + diff --git a/docs/UpdatePropRequest.md b/docs/UpdatePropRequest.md new file mode 100644 index 00000000..82f6f949 --- /dev/null +++ b/docs/UpdatePropRequest.md @@ -0,0 +1,23 @@ + + +# UpdatePropRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | [optional] | +|**assetVersion** | **Integer** | | [optional] | +|**description** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**name** | **String** | | [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] | +|**propSignature** | **String** | | [optional] | +|**spawnType** | **Integer** | 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: ??? | [optional] | +|**tags** | **List<String>** | | [optional] | +|**unityVersion** | **String** | | [optional] | +|**worldPlacementMask** | **Integer** | Bitmask for restrictions on what world surfaces a prop may be summoned. 0: no restrictions 1: floors 2: walls 4: ceilings | [optional] | + + + diff --git a/docs/UpdateTiliaTOSRequest.md b/docs/UpdateTiliaTOSRequest.md new file mode 100644 index 00000000..c852f06b --- /dev/null +++ b/docs/UpdateTiliaTOSRequest.md @@ -0,0 +1,13 @@ + + +# UpdateTiliaTOSRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accepted** | **Boolean** | | | + + + diff --git a/docs/UpdateUserBadgeRequest.md b/docs/UpdateUserBadgeRequest.md new file mode 100644 index 00000000..815d0197 --- /dev/null +++ b/docs/UpdateUserBadgeRequest.md @@ -0,0 +1,14 @@ + + +# UpdateUserBadgeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hidden** | **Boolean** | | [optional] | +|**showcased** | **Boolean** | | [optional] | + + + diff --git a/docs/UpdateUserNoteRequest.md b/docs/UpdateUserNoteRequest.md new file mode 100644 index 00000000..3f454ad5 --- /dev/null +++ b/docs/UpdateUserNoteRequest.md @@ -0,0 +1,14 @@ + + +# UpdateUserNoteRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**note** | **String** | | | +|**targetUserId** | **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/UpdateUserRequest.md b/docs/UpdateUserRequest.md index aad9be98..bfbd4ead 100644 --- a/docs/UpdateUserRequest.md +++ b/docs/UpdateUserRequest.md @@ -5,17 +5,27 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **String** | | [optional] -**birthday** | **LocalDate** | | [optional] -**acceptedTOSVersion** | **BigDecimal** | | [optional] -**tags** | **List<String>** | | [optional] -**status** | **UserStatus** | | [optional] -**statusDescription** | **String** | | [optional] -**bio** | **String** | | [optional] -**bioLinks** | **List<String>** | | [optional] -**userIcon** | **String** | MUST be a valid VRChat /file/ url. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acceptedTOSVersion** | **Integer** | | [optional] | +|**bio** | **String** | | [optional] | +|**bioLinks** | **List<String>** | | [optional] | +|**birthday** | **LocalDate** | | [optional] | +|**contentFilters** | **List<ContentFilter>** | These tags begin with `content_` and control content gating | [optional] | +|**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] | +|**pronouns** | **String** | | [optional] | +|**revertDisplayName** | **Boolean** | MUST specify currentPassword as well to revert display name | [optional] | +|**status** | **UserStatus** | | [optional] | +|**statusDescription** | **String** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**unsubscribe** | **Boolean** | | [optional] | +|**userIcon** | **String** | MUST be a valid VRChat /file/ url. | [optional] | diff --git a/docs/UpdateWorldRequest.md b/docs/UpdateWorldRequest.md index 7b20c87f..d5dbb468 100644 --- a/docs/UpdateWorldRequest.md +++ b/docs/UpdateWorldRequest.md @@ -5,21 +5,21 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assetUrl** | **String** | | [optional] -**assetVersion** | **String** | | [optional] -**authorId** | **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] -**authorName** | **String** | | [optional] -**capacity** | **Integer** | | [optional] -**description** | **String** | | [optional] -**imageUrl** | **String** | | [optional] -**name** | **String** | | [optional] -**platform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | [optional] -**releaseStatus** | **ReleaseStatus** | | [optional] -**tags** | **List<String>** | | [optional] -**unityPackageUrl** | **String** | | [optional] -**unityVersion** | **String** | | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetUrl** | **String** | | [optional] | +|**assetVersion** | **String** | | [optional] | +|**authorId** | **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] | +|**authorName** | **String** | | [optional] | +|**capacity** | **Integer** | | [optional] | +|**description** | **String** | | [optional] | +|**imageUrl** | **String** | | [optional] | +|**name** | **String** | | [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] | +|**releaseStatus** | **ReleaseStatus** | | [optional] | +|**tags** | **List<String>** | | [optional] | +|**unityPackageUrl** | **String** | | [optional] | +|**unityVersion** | **String** | | [optional] | diff --git a/docs/UploadGalleryImageRequest.md b/docs/UploadGalleryImageRequest.md new file mode 100644 index 00000000..00900599 --- /dev/null +++ b/docs/UploadGalleryImageRequest.md @@ -0,0 +1,13 @@ + + +# UploadGalleryImageRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**_file** | **File** | The binary blob of the png file. | | + + + diff --git a/docs/UploadImageRequest.md b/docs/UploadImageRequest.md new file mode 100644 index 00000000..bbb021cc --- /dev/null +++ b/docs/UploadImageRequest.md @@ -0,0 +1,19 @@ + + +# UploadImageRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**animationStyle** | **ImageAnimationStyle** | | [optional] | +|**_file** | **File** | The binary blob of the png file. | | +|**frames** | **Integer** | Required for animated images. Total number of frames of the spritesheet to be animated. | [optional] | +|**framesOverTime** | **Integer** | Required for animated images. Animation frames per second. | [optional] | +|**loopStyle** | **ImageLoopStyle** | | [optional] | +|**maskTag** | **ImageMask** | | [optional] | +|**tag** | **ImagePurpose** | | | + + + diff --git a/docs/UploadPrintRequest.md b/docs/UploadPrintRequest.md new file mode 100644 index 00000000..7a45d810 --- /dev/null +++ b/docs/UploadPrintRequest.md @@ -0,0 +1,17 @@ + + +# UploadPrintRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**image** | **File** | The binary blob of the png file. | | +|**note** | **String** | The caption for the image. | [optional] | +|**timestamp** | **OffsetDateTime** | The time the image was captured. | | +|**worldId** | **String** | The id of the world in which the image was captured. | [optional] | +|**worldName** | **String** | The name of the world in which the image was captured. | [optional] | + + + diff --git a/docs/User.md b/docs/User.md index 0321e3aa..48d2734e 100644 --- a/docs/User.md +++ b/docs/User.md @@ -5,31 +5,52 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowAvatarCopying** | **Boolean** | | -**bio** | **String** | | -**bioLinks** | **List<String>** | | -**currentAvatarImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | -**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | -**dateJoined** | **LocalDate** | | -**developerType** | **DeveloperType** | | -**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** | | -**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] -**isFriend** | **Boolean** | Either their `friendKey`, or empty string if you are not friends. Unknown usage. | -**lastLogin** | **String** | Either a date-time or empty string. | -**lastPlatform** | **String** | This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. | -**location** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] -**profilePicOverride** | **String** | | -**state** | **UserState** | | -**status** | **UserStatus** | | -**statusDescription** | **String** | | -**tags** | **List<String>** | | -**userIcon** | **String** | | -**username** | **String** | 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. | -**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ageVerificationStatus** | **AgeVerificationStatus** | | | +|**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. | | +|**currentAvatarTags** | **List<String>** | | | +|**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | | +|**dateJoined** | **LocalDate** | | | +|**developerType** | **DeveloperType** | | | +|**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** | | | +|**state** | **UserState** | | | +|**status** | **UserStatus** | | | +|**statusDescription** | **String** | | | +|**tags** | **List<String>** | | | +|**travelingToInstance** | **String** | | [optional] | +|**travelingToLocation** | **String** | | [optional] | +|**travelingToWorld** | **String** | | [optional] | +|**userIcon** | **String** | | | +|**username** | **String** | -| 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). | [optional] | +|**worldId** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | [optional] | diff --git a/docs/UserCreditsEligible.md b/docs/UserCreditsEligible.md new file mode 100644 index 00000000..1992fb56 --- /dev/null +++ b/docs/UserCreditsEligible.md @@ -0,0 +1,14 @@ + + +# UserCreditsEligible + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**eligible** | **Boolean** | | | +|**reason** | **String** | | [optional] | + + + diff --git a/docs/UserExists.md b/docs/UserExists.md index f13721c0..2ca33a41 100644 --- a/docs/UserExists.md +++ b/docs/UserExists.md @@ -6,9 +6,10 @@ Status object representing if a queried user by username or userId exists or not ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**userExists** | **Boolean** | Status if a user exist with that username or userId. | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nameOk** | **Boolean** | Is the username valid? | [optional] | +|**userExists** | **Boolean** | Status if a user exist with that username or userId. | | diff --git a/docs/UserNote.md b/docs/UserNote.md new file mode 100644 index 00000000..288da613 --- /dev/null +++ b/docs/UserNote.md @@ -0,0 +1,18 @@ + + +# UserNote + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**id** | **String** | | | +|**note** | **String** | | | +|**targetUser** | [**UserNoteTargetUser**](UserNoteTargetUser.md) | | [optional] | +|**targetUserId** | **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. | | +|**userId** | **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/UserNoteTargetUser.md b/docs/UserNoteTargetUser.md new file mode 100644 index 00000000..5e090968 --- /dev/null +++ b/docs/UserNoteTargetUser.md @@ -0,0 +1,18 @@ + + +# UserNoteTargetUser + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**currentAvatarTags** | **List<String>** | | [optional] | +|**currentAvatarThumbnailImageUrl** | **String** | When profilePicOverride is not empty, use it instead. | [optional] | +|**displayName** | **String** | | [optional] | +|**profilePicOverride** | **String** | | [optional] | +|**userIcon** | **String** | | [optional] | + + + diff --git a/docs/UserState.md b/docs/UserState.md index 8af17c2b..7882aaaf 100644 --- a/docs/UserState.md +++ b/docs/UserState.md @@ -5,10 +5,10 @@ ## Enum -* `OFFLINE` (value: `"offline"`) - * `ACTIVE` (value: `"active"`) +* `OFFLINE` (value: `"offline"`) + * `ONLINE` (value: `"online"`) diff --git a/docs/UserStatus.md b/docs/UserStatus.md index 11627d52..81ebf5d6 100644 --- a/docs/UserStatus.md +++ b/docs/UserStatus.md @@ -7,12 +7,12 @@ * `ACTIVE` (value: `"active"`) -* `JOIN_ME` (value: `"join me"`) - * `ASK_ME` (value: `"ask me"`) * `BUSY` (value: `"busy"`) +* `JOIN_ME` (value: `"join me"`) + * `OFFLINE` (value: `"offline"`) diff --git a/docs/UserSubscription.md b/docs/UserSubscription.md index 07bc5461..37db279a 100644 --- a/docs/UserSubscription.md +++ b/docs/UserSubscription.md @@ -3,25 +3,28 @@ # UserSubscription + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**transactionId** | **String** | | -**store** | **String** | Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\". | -**steamItemId** | **String** | | [optional] -**amount** | **BigDecimal** | | -**description** | **String** | | -**period** | **SubscriptionPeriod** | | -**tier** | **BigDecimal** | | -**active** | **Boolean** | | -**status** | **TransactionStatus** | | -**expires** | **OffsetDateTime** | | -**createdAt** | **OffsetDateTime** | | -**updatedAt** | **OffsetDateTime** | | -**licenseGroups** | **List<String>** | | -**isGift** | **Boolean** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**active** | **Boolean** | | | +|**amount** | **BigDecimal** | | | +|**createdAt** | **OffsetDateTime** | | | +|**description** | **String** | | | +|**expires** | **OffsetDateTime** | | | +|**id** | **String** | | | +|**isBulkGift** | **Boolean** | | | +|**isGift** | **Boolean** | | | +|**licenseGroups** | **List<String>** | | | +|**period** | **SubscriptionPeriod** | | | +|**starts** | **String** | | [optional] | +|**status** | **TransactionStatus** | | | +|**steamItemId** | **String** | | [optional] | +|**store** | **String** | Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\". | | +|**tier** | **Integer** | | | +|**transactionId** | **String** | | | +|**updatedAt** | **OffsetDateTime** | | | diff --git a/docs/UserSubscriptionEligible.md b/docs/UserSubscriptionEligible.md new file mode 100644 index 00000000..81618d49 --- /dev/null +++ b/docs/UserSubscriptionEligible.md @@ -0,0 +1,18 @@ + + +# UserSubscriptionEligible + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**activeCancelledSubscription** | **Boolean** | | | +|**giftEligible** | **Boolean** | | | +|**nonExtendVendorWillLoseGiftTime** | **Boolean** | | | +|**purchaseEligible** | **Boolean** | | | +|**subscriptionEligible** | **Boolean** | | | +|**subscriptionOnAltAccount** | **Boolean** | | | + + + diff --git a/docs/UsersApi.md b/docs/UsersApi.md index 9813a5a3..39dff54f 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -2,21 +2,1471 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getUser**](UsersApi.md#getUser) | **GET** /users/{userId} | Get User by ID -[**getUserByName**](UsersApi.md#getUserByName) | **GET** /users/{username}/name | Get User by Username -[**searchUsers**](UsersApi.md#searchUsers) | **GET** /users | Search All Users -[**updateUser**](UsersApi.md#updateUser) | **PUT** /users/{userId} | Update User Info +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addTags**](UsersApi.md#addTags) | **POST** /users/{userId}/addTags | Add User Tags | +| [**checkUserPersistenceExists**](UsersApi.md#checkUserPersistenceExists) | **GET** /users/{userId}/{worldId}/persist/exists | Check User Persistence Exists | +| [**deleteAllUserPersistenceData**](UsersApi.md#deleteAllUserPersistenceData) | **DELETE** /users/{userId}/persist | Delete All User Persistence Data | +| [**deleteUserPersistence**](UsersApi.md#deleteUserPersistence) | **DELETE** /users/{userId}/{worldId}/persist | Delete User Persistence | +| [**getBlockedGroups**](UsersApi.md#getBlockedGroups) | **GET** /users/{userId}/groups/userblocked | Get User Group Blocks | +| [**getInvitedGroups**](UsersApi.md#getInvitedGroups) | **GET** /users/{userId}/groups/invited | Get User Group Invited | +| [**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 | +| [**getUserFeedback**](UsersApi.md#getUserFeedback) | **GET** /users/{userId}/feedback | Get User Feedback | +| [**getUserGroupInstances**](UsersApi.md#getUserGroupInstances) | **GET** /users/{userId}/instances/groups | Get User Group Instances | +| [**getUserGroupInstancesForGroup**](UsersApi.md#getUserGroupInstancesForGroup) | **GET** /users/{userId}/instances/groups/{groupId} | Get User Group Instances for a specific Group | +| [**getUserGroupRequests**](UsersApi.md#getUserGroupRequests) | **GET** /users/{userId}/groups/requested | Get User Group Requests | +| [**getUserGroups**](UsersApi.md#getUserGroups) | **GET** /users/{userId}/groups | Get User Groups | +| [**getUserNote**](UsersApi.md#getUserNote) | **GET** /userNotes/{userNoteId} | Get User Note | +| [**getUserNotes**](UsersApi.md#getUserNotes) | **GET** /userNotes | Get User Notes | +| [**getUserRepresentedGroup**](UsersApi.md#getUserRepresentedGroup) | **GET** /users/{userId}/groups/represented | Get user's current represented group | +| [**getUserTutorialStatus**](UsersApi.md#getUserTutorialStatus) | **GET** /users/{userId}/tutorial | Get User Tutorial Status | +| [**removeTags**](UsersApi.md#removeTags) | **POST** /users/{userId}/removeTags | Remove User Tags | +| [**searchUsers**](UsersApi.md#searchUsers) | **GET** /users | Search All Users | +| [**updateBadge**](UsersApi.md#updateBadge) | **PUT** /users/{userId}/badges/{badgeId} | Update User Badge | +| [**updateUser**](UsersApi.md#updateUser) | **PUT** /users/{userId} | Update User Info | +| [**updateUserNote**](UsersApi.md#updateUserNote) | **POST** /userNotes | Update User Note | + + + +# **addTags** +> CurrentUser addTags(userId, changeUserTagsRequest) + +Add User Tags + +Adds tags to the user's profile +### 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. + ChangeUserTagsRequest changeUserTagsRequest = new ChangeUserTagsRequest(); // ChangeUserTagsRequest | + try { + CurrentUser result = apiInstance.addTags(userId, changeUserTagsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#addTags"); + 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. | | +| **changeUserTagsRequest** | [**ChangeUserTagsRequest**](ChangeUserTagsRequest.md)| | | + +### Return type + +[**CurrentUser**](CurrentUser.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **checkUserPersistenceExists** +> checkUserPersistenceExists(userId, worldId) + +Check User Persistence Exists + +Checks whether the user has persistence data for a given world + +### 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. + String worldId = "worldId_example"; // String | Must be a valid world ID. + try { + apiInstance.checkUserPersistenceExists(userId, worldId); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#checkUserPersistenceExists"); + 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. | | +| **worldId** | **String**| Must be a valid world ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **deleteAllUserPersistenceData** +> deleteAllUserPersistenceData(userId) + +Delete All User Persistence Data + +Deletes all of the user's persistence data for every world. + +### 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 { + apiInstance.deleteAllUserPersistenceData(userId); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#deleteAllUserPersistenceData"); + 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 + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **deleteUserPersistence** +> deleteUserPersistence(userId, worldId) + +Delete User Persistence + +Deletes the user's persistence data for a given world + +### 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. + String worldId = "worldId_example"; // String | Must be a valid world ID. + try { + apiInstance.deleteUserPersistence(userId, worldId); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#deleteUserPersistence"); + 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. | | +| **worldId** | **String**| Must be a valid world ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **getBlockedGroups** +> List<Group> getBlockedGroups(userId) + +Get User Group Blocks + +Returns a list of Groups the user has blocked. + +### 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 { + List result = apiInstance.getBlockedGroups(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getBlockedGroups"); + 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 + +[**List<Group>**](Group.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 list of Group objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getInvitedGroups** +> List<Group> getInvitedGroups(userId) + +Get User Group Invited + +Returns a list of Groups the user has been invited to. + +### 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 { + List result = apiInstance.getInvitedGroups(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getInvitedGroups"); + 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 + +[**List<Group>**](Group.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 list of Group objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getMutualFriends** +> List<MutualFriend> getMutualFriends(userId, n, offset) + +Get User Mutual Friends + +Gets a list of mutual friends between the logged in user and the specified 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. + 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. + try { + List result = apiInstance.getMutualFriends(userId, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getMutualFriends"); + 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. | | +| **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] | + +### Return type + +[**List<MutualFriend>**](MutualFriend.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 list of MutualFriend objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getMutualGroups** +> List<LimitedUserGroups> getMutualGroups(userId, n, offset) + +Get User Mutual Groups + +Gets a list of mutual groups between the logged in user and the specified 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. + 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. + try { + List result = apiInstance.getMutualGroups(userId, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getMutualGroups"); + 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. | | +| **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] | + +### Return type + +[**List<LimitedUserGroups>**](LimitedUserGroups.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 list of LimitedUserGroups objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getMutuals** +> Mutuals getMutuals(userId) + +Get User Mutuals + +Gets the counts of mutuals between the logged in user and the specified 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 { + Mutuals result = apiInstance.getMutuals(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getMutuals"); + 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 + +[**Mutuals**](Mutuals.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 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) + +Get User by ID + +Get public user information about a specific user using their ID. + +### 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 { + User result = apiInstance.getUser(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUser"); + 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 + +[**User**](User.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 single User object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserAllGroupPermissions** +> Map<String, List<GroupPermissions>> getUserAllGroupPermissions(userId, groupIds) + +Get user's permissions for all joined groups. + +Returns a mapping of GroupIDs to arrays of GroupPermissions. + +### 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. + String groupIds = "grp_00000000-0000-0000-0000-000000000000,grp_11111111-1111-1111-1111-111111111111"; // String | Comma-separated (no spaces!) list of GroupIDs to retrieve permissions for. + try { + Map> result = apiInstance.getUserAllGroupPermissions(userId, groupIds); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserAllGroupPermissions"); + 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. | | +| **groupIds** | **String**| Comma-separated (no spaces!) list of GroupIDs to retrieve permissions for. | [optional] | + +### Return type + +[**Map<String, List<GroupPermissions>>**](List.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** | The group permissions the user has for every joined group. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserByName** +> User getUserByName(username) + +Get User by Username + +~~Get public user information about a specific user using their name.~~ **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). This endpoint now require Admin Credentials. + +### 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 username = "username_example"; // String | Username of the user + try { + User result = apiInstance.getUserByName(username); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserByName"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **username** | **String**| Username of the user | | + +### Return type + +[**User**](User.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 single User object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserFeedback** +> List<Feedback> getUserFeedback(userId, contentId, n, offset) + +Get User Feedback + +Get user's submitted feedback + +### 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. + String contentId = "contentId_example"; // String | Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. + 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. + try { + List result = apiInstance.getUserFeedback(userId, contentId, n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserFeedback"); + 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. | | +| **contentId** | **String**| Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. | [optional] | +| **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] | + +### Return type + +[**List<Feedback>**](Feedback.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 list of Feedback objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserGroupInstances** +> GetUserGroupInstances200Response getUserGroupInstances(userId) + +Get User Group Instances + +Returns a list of group instances for a 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 { + GetUserGroupInstances200Response result = apiInstance.getUserGroupInstances(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserGroupInstances"); + 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 + +[**GetUserGroupInstances200Response**](GetUserGroupInstances200Response.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 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. | - | + + +# **getUserGroupInstancesForGroup** +> GetUserGroupInstances200Response getUserGroupInstancesForGroup(userId, groupId) + +Get User Group Instances for a specific Group + +Returns a list of a group's instances for a 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. + String groupId = "groupId_example"; // String | Must be a valid group ID. + try { + GetUserGroupInstances200Response result = apiInstance.getUserGroupInstancesForGroup(userId, groupId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserGroupInstancesForGroup"); + 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. | | +| **groupId** | **String**| Must be a valid group ID. | | + +### Return type + +[**GetUserGroupInstances200Response**](GetUserGroupInstances200Response.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 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. | - | + + +# **getUserGroupRequests** +> List<Group> getUserGroupRequests(userId) + +Get User Group Requests + +Returns a list of Groups the user has requested to be invited into. + +### 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 { + List result = apiInstance.getUserGroupRequests(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserGroupRequests"); + 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 + +[**List<Group>**](Group.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 list of Group objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserGroups** +> List<LimitedUserGroups> getUserGroups(userId) + +Get User Groups + +Get user's public groups + +### 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 { + List result = apiInstance.getUserGroups(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserGroups"); + 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 + +[**List<LimitedUserGroups>**](LimitedUserGroups.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 list of LimitedUserGroups objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserNote** +> UserNote getUserNote(userNoteId) + +Get User Note + +Get a particular user note + +### 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 userNoteId = "userNoteId_example"; // String | Must be a valid user note ID. + try { + UserNote result = apiInstance.getUserNote(userNoteId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserNote"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` - -# **getUser** -> User getUser(userId) +### Parameters -Get User by ID +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userNoteId** | **String**| Must be a valid user note ID. | | -Get public user information about a specific user using their ID. +### Return type + +[**UserNote**](UserNote.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 single UserNote object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserNotes** +> List<UserNote> getUserNotes(n, offset) + +Get User Notes + +Get recently updated user notes ### Example ```java @@ -33,12 +1483,78 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + 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. + try { + List result = apiInstance.getUserNotes(n, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserNotes"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **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] | + +### Return type + +[**List<UserNote>**](UserNote.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 list of UserNote objects. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **getUserRepresentedGroup** +> RepresentedGroup getUserRepresentedGroup(userId) + +Get user's current represented group + +Returns the current group that the user is currently representing + +### 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"); @@ -46,12 +1562,12 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); UsersApi apiInstance = new UsersApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. try { - User result = apiInstance.getUser(userId); + RepresentedGroup result = apiInstance.getUserRepresentedGroup(userId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#getUser"); + System.err.println("Exception when calling UsersApi#getUserRepresentedGroup"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -63,17 +1579,17 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | ### Return type -[**User**](User.md) +[**RepresentedGroup**](RepresentedGroup.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -83,16 +1599,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single User object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | OK | - | +| **401** | Error response due to missing auth cookie. | - | - -# **getUserByName** -> User getUserByName(username) + +# **getUserTutorialStatus** +> TutorialStatus getUserTutorialStatus(userId) -Get User by Username +Get User Tutorial Status -Get public user information about a specific user using their name. +Gets the status of completed or outstanding tutorials for the specified user. ### Example ```java @@ -109,12 +1625,76 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); + // 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) - //apiKeyCookie.setApiKeyPrefix("Token"); + //authCookie.setApiKeyPrefix("Token"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + TutorialStatus result = apiInstance.getUserTutorialStatus(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserTutorialStatus"); + 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 + +[**TutorialStatus**](TutorialStatus.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 single TutorialStatus object. | - | +| **401** | Error response due to missing auth cookie. | - | + + +# **removeTags** +> CurrentUser removeTags(userId, changeUserTagsRequest) + +Remove User Tags + +Removes tags from the user's profile + +### 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"); @@ -122,12 +1702,13 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); UsersApi apiInstance = new UsersApi(defaultClient); - String username = "username_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. + ChangeUserTagsRequest changeUserTagsRequest = new ChangeUserTagsRequest(); // ChangeUserTagsRequest | try { - User result = apiInstance.getUserByName(username); + CurrentUser result = apiInstance.removeTags(userId, changeUserTagsRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#getUserByName"); + System.err.println("Exception when calling UsersApi#removeTags"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -139,32 +1720,34 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **changeUserTagsRequest** | [**ChangeUserTagsRequest**](ChangeUserTagsRequest.md)| | | ### Return type -[**User**](User.md) +[**CurrentUser**](CurrentUser.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single User object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **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. | - | - + # **searchUsers** -> List<LimitedUser> searchUsers(search, developerType, n, offset) +> List<LimitedUserSearch> searchUsers(search, developerType, n, offset, isInternalVariant) Search All Users @@ -185,12 +1768,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -202,8 +1779,9 @@ public class Example { String developerType = "developerType_example"; // String | Active user by developer type, none for normal users and internal for moderators 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. + Boolean isInternalVariant = false; // Boolean | Not quite sure what this actually does (exists on the website but doesn't seem to be used) try { - List result = apiInstance.searchUsers(search, developerType, n, offset); + List result = apiInstance.searchUsers(search, developerType, n, offset, isInternalVariant); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UsersApi#searchUsers"); @@ -218,20 +1796,21 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search** | **String**| Searches by `displayName`. Will return empty array if search query is empty or missing. | [optional] - **developerType** | **String**| Active user by developer type, none for normal users and internal for moderators | [optional] - **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] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| Searches by `displayName`. Will return empty array if search query is empty or missing. | [optional] | +| **developerType** | **String**| Active user by developer type, none for normal users and internal for moderators | [optional] | +| **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] | +| **isInternalVariant** | **Boolean**| Not quite sure what this actually does (exists on the website but doesn't seem to be used) | [optional] | ### Return type -[**List<LimitedUser>**](LimitedUser.md) +[**List<LimitedUserSearch>**](LimitedUserSearch.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -241,11 +1820,86 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of LimitedUser objects. | - | -**400** | Error response when trying to search list of users with an invalid request. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **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. | - | + + +# **updateBadge** +> updateBadge(userId, badgeId, updateUserBadgeRequest) + +Update User Badge + +Updates a user's badge + +### 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. + String badgeId = "badgeId_example"; // String | Must be a valid badge ID. + UpdateUserBadgeRequest updateUserBadgeRequest = new UpdateUserBadgeRequest(); // UpdateUserBadgeRequest | + try { + apiInstance.updateBadge(userId, badgeId, updateUserBadgeRequest); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#updateBadge"); + 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. | | +| **badgeId** | **String**| Must be a valid badge ID. | | +| **updateUserBadgeRequest** | [**UpdateUserBadgeRequest**](UpdateUserBadgeRequest.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The user's badge is updated. | - | +| **401** | Error response due to missing auth cookie. | - | +| **403** | Error response when trying get group instances of another user. | - | +| **404** | The user does not have the badge. | - | - + # **updateUser** > CurrentUser updateUser(userId, updateUserRequest) @@ -268,12 +1922,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -281,7 +1929,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); UsersApi apiInstance = new UsersApi(defaultClient); - String userId = "userId_example"; // String | + String userId = "userId_example"; // String | Must be a valid user ID. UpdateUserRequest updateUserRequest = new UpdateUserRequest(); // UpdateUserRequest | try { CurrentUser result = apiInstance.updateUser(userId, updateUserRequest); @@ -299,10 +1947,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **String**| | - **updateUserRequest** | [**UpdateUserRequest**](UpdateUserRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| Must be a valid user ID. | | +| **updateUserRequest** | [**UpdateUserRequest**](UpdateUserRequest.md)| | [optional] | ### Return type @@ -310,7 +1958,78 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **updateUserNote** +> UserNote updateUserNote(updateUserNoteRequest) + +Update User Note + +Updates the currently authenticated user's note on a 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); + UpdateUserNoteRequest updateUserNoteRequest = new UpdateUserNoteRequest(); // UpdateUserNoteRequest | + try { + UserNote result = apiInstance.updateUserNote(updateUserNoteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#updateUserNote"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **updateUserNoteRequest** | [**UpdateUserNoteRequest**](UpdateUserNoteRequest.md)| | | + +### Return type + +[**UserNote**](UserNote.md) + +### Authorization + +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -320,5 +2039,6 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single CurrentUser object. | - | +| **200** | Returns a single UserNote object. | - | +| **401** | Error response due to missing auth cookie. | - | diff --git a/docs/Verify2FAEmailCodeResult.md b/docs/Verify2FAEmailCodeResult.md new file mode 100644 index 00000000..d1195c8e --- /dev/null +++ b/docs/Verify2FAEmailCodeResult.md @@ -0,0 +1,13 @@ + + +# Verify2FAEmailCodeResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**verified** | **Boolean** | | | + + + diff --git a/docs/Verify2FAResult.md b/docs/Verify2FAResult.md index 4802e929..2369a61f 100644 --- a/docs/Verify2FAResult.md +++ b/docs/Verify2FAResult.md @@ -5,9 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**verified** | **Boolean** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**enabled** | **Boolean** | | [optional] | +|**verified** | **Boolean** | | | diff --git a/docs/VerifyAuthTokenResult.md b/docs/VerifyAuthTokenResult.md index fb87ff6f..34f5dc20 100644 --- a/docs/VerifyAuthTokenResult.md +++ b/docs/VerifyAuthTokenResult.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ok** | **Boolean** | | -**token** | **String** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ok** | **Boolean** | | | +|**token** | **String** | | | diff --git a/docs/World.md b/docs/World.md index c1dcf9df..1c6790ec 100644 --- a/docs/World.md +++ b/docs/World.md @@ -3,42 +3,44 @@ # World + ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assetUrl** | **String** | Empty if unauthenticated. | -**assetUrlObject** | **Object** | | -**authorId** | **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. | -**authorName** | **String** | | -**capacity** | **Integer** | | -**createdAt** | **OffsetDateTime** | | -**description** | **String** | | -**favorites** | **Integer** | | [optional] -**featured** | **Boolean** | | -**heat** | **Integer** | | -**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**imageUrl** | **String** | | -**instances** | **List<List<Object>>** | | [optional] -**labsPublicationDate** | **String** | | -**name** | **String** | | -**namespace** | **String** | | -**occupants** | **Integer** | | [optional] -**organization** | **String** | | -**pluginUrlObject** | **Object** | | -**popularity** | **Integer** | | -**previewYoutubeId** | **String** | | [optional] -**privateOccupants** | **Integer** | | [optional] -**publicOccupants** | **Integer** | | [optional] -**publicationDate** | **String** | | -**releaseStatus** | **ReleaseStatus** | | -**tags** | **List<String>** | | -**thumbnailImageUrl** | **String** | | -**unityPackageUrlObject** | **Object** | | -**unityPackages** | [**List<UnityPackage>**](UnityPackage.md) | Empty if unauthenticated. | -**updatedAt** | **OffsetDateTime** | | -**version** | **Integer** | | -**visits** | **Integer** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorId** | **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. | | +|**authorName** | **String** | | | +|**capacity** | **Integer** | | | +|**createdAt** | **OffsetDateTime** | | | +|**defaultContentSettings** | [**InstanceContentSettings**](InstanceContentSettings.md) | | [optional] | +|**description** | **String** | | | +|**favorites** | **Integer** | | [optional] | +|**featured** | **Boolean** | | | +|**heat** | **Integer** | | | +|**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**imageUrl** | **String** | | | +|**instances** | **List<List<Object>>** | Will always be an empty list when unauthenticated. | [optional] | +|**labsPublicationDate** | **String** | | | +|**name** | **String** | | | +|**namespace** | **String** | | [optional] | +|**occupants** | **Integer** | Will always be `0` when unauthenticated. | [optional] | +|**organization** | **String** | | | +|**popularity** | **Integer** | | | +|**previewYoutubeId** | **String** | | [optional] | +|**privateOccupants** | **Integer** | Will always be `0` when unauthenticated. | [optional] | +|**publicOccupants** | **Integer** | Will always be `0` when unauthenticated. | [optional] | +|**publicationDate** | **String** | | | +|**recommendedCapacity** | **Integer** | | | +|**releaseStatus** | **ReleaseStatus** | | | +|**storeId** | **String** | | [optional] | +|**tags** | **List<String>** | | | +|**thumbnailImageUrl** | **String** | | | +|**udonProducts** | **List<String>** | | [optional] | +|**unityPackages** | [**List<UnityPackage>**](UnityPackage.md) | Empty if unauthenticated. | [optional] | +|**updatedAt** | **OffsetDateTime** | | | +|**urlList** | **List<String>** | | [optional] | +|**version** | **Integer** | | | +|**visits** | **Integer** | | | diff --git a/docs/WorldMetadata.md b/docs/WorldMetadata.md index 1ee8b147..3cbcca5a 100644 --- a/docs/WorldMetadata.md +++ b/docs/WorldMetadata.md @@ -5,10 +5,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | -**metadata** | **Object** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | WorldID be \"offline\" on User profiles if you are not friends with that user. | | +|**metadata** | **Object** | | | diff --git a/docs/WorldPublishStatus.md b/docs/WorldPublishStatus.md index edfa1252..9fae52f7 100644 --- a/docs/WorldPublishStatus.md +++ b/docs/WorldPublishStatus.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**canPubilsh** | **Boolean** | | +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**canPublish** | **Boolean** | | | diff --git a/docs/WorldsApi.md b/docs/WorldsApi.md index 42ad9ee4..2f7b1427 100644 --- a/docs/WorldsApi.md +++ b/docs/WorldsApi.md @@ -2,24 +2,175 @@ All URIs are relative to *https://api.vrchat.cloud/api/1* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createWorld**](WorldsApi.md#createWorld) | **POST** /worlds | Create World -[**deleteWorld**](WorldsApi.md#deleteWorld) | **DELETE** /worlds/{worldId} | Delete World -[**getActiveWorlds**](WorldsApi.md#getActiveWorlds) | **GET** /worlds/active | List Active Worlds -[**getFavoritedWorlds**](WorldsApi.md#getFavoritedWorlds) | **GET** /worlds/favorites | List Favorited Worlds -[**getRecentWorlds**](WorldsApi.md#getRecentWorlds) | **GET** /worlds/recent | List Recent Worlds -[**getWorld**](WorldsApi.md#getWorld) | **GET** /worlds/{worldId} | Get World by ID -[**getWorldInstance**](WorldsApi.md#getWorldInstance) | **GET** /worlds/{worldId}/{instanceId} | Get World Instance -[**getWorldMetadata**](WorldsApi.md#getWorldMetadata) | **GET** /worlds/{worldId}/metadata | Get World Metadata -[**getWorldPublishStatus**](WorldsApi.md#getWorldPublishStatus) | **GET** /worlds/{worldId}/publish | Get World Publish Status -[**publishWorld**](WorldsApi.md#publishWorld) | **PUT** /worlds/{worldId}/publish | Publish World -[**searchWorlds**](WorldsApi.md#searchWorlds) | **GET** /worlds | Search All Worlds -[**unpublishWorld**](WorldsApi.md#unpublishWorld) | **DELETE** /worlds/{worldId}/publish | Unpublish World -[**updateWorld**](WorldsApi.md#updateWorld) | **PUT** /worlds/{worldId} | Update World - - - +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**addWorldTags**](WorldsApi.md#addWorldTags) | **POST** /worlds/{worldId}/addTags | Add World Tags | +| [**checkUserPersistenceExists**](WorldsApi.md#checkUserPersistenceExists) | **GET** /users/{userId}/{worldId}/persist/exists | Check User Persistence Exists | +| [**createWorld**](WorldsApi.md#createWorld) | **POST** /worlds | Create World | +| [**deleteAllUserPersistenceData**](WorldsApi.md#deleteAllUserPersistenceData) | **DELETE** /users/{userId}/persist | Delete All User Persistence Data | +| [**deleteUserPersistence**](WorldsApi.md#deleteUserPersistence) | **DELETE** /users/{userId}/{worldId}/persist | Delete User Persistence | +| [**deleteWorld**](WorldsApi.md#deleteWorld) | **DELETE** /worlds/{worldId} | Delete World | +| [**deleteWorldPlatform**](WorldsApi.md#deleteWorldPlatform) | **DELETE** /worlds/{worldId}/platform/{publishedPlatform} | Delete World Platform | +| [**getActiveWorlds**](WorldsApi.md#getActiveWorlds) | **GET** /worlds/active | List Active Worlds | +| [**getFavoritedWorlds**](WorldsApi.md#getFavoritedWorlds) | **GET** /worlds/favorites | List Favorited Worlds | +| [**getRecentWorlds**](WorldsApi.md#getRecentWorlds) | **GET** /worlds/recent | List Recent Worlds | +| [**getWorld**](WorldsApi.md#getWorld) | **GET** /worlds/{worldId} | Get World by ID | +| [**getWorldInstance**](WorldsApi.md#getWorldInstance) | **GET** /worlds/{worldId}/{instanceId} | Get World Instance | +| [**getWorldMetadata**](WorldsApi.md#getWorldMetadata) | **GET** /worlds/{worldId}/metadata | Get World Metadata | +| [**getWorldPublishStatus**](WorldsApi.md#getWorldPublishStatus) | **GET** /worlds/{worldId}/publish | Get World Publish Status | +| [**publishWorld**](WorldsApi.md#publishWorld) | **PUT** /worlds/{worldId}/publish | Publish World | +| [**removeWorldTags**](WorldsApi.md#removeWorldTags) | **POST** /worlds/{worldId}/removeTags | Remove World Tags | +| [**searchWorlds**](WorldsApi.md#searchWorlds) | **GET** /worlds | Search All Worlds | +| [**unpublishWorld**](WorldsApi.md#unpublishWorld) | **DELETE** /worlds/{worldId}/publish | Unpublish World | +| [**updateWorld**](WorldsApi.md#updateWorld) | **PUT** /worlds/{worldId} | Update World | + + + +# **addWorldTags** +> World addWorldTags(worldId, changeWorldTagsRequest) + +Add World Tags + +Adds tags to the world's profile + +### 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.WorldsApi; + +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"); + + WorldsApi apiInstance = new WorldsApi(defaultClient); + String worldId = "worldId_example"; // String | Must be a valid world ID. + ChangeWorldTagsRequest changeWorldTagsRequest = new ChangeWorldTagsRequest(); // ChangeWorldTagsRequest | + try { + World result = apiInstance.addWorldTags(worldId, changeWorldTagsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling WorldsApi#addWorldTags"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **changeWorldTagsRequest** | [**ChangeWorldTagsRequest**](ChangeWorldTagsRequest.md)| | | + +### Return type + +[**World**](World.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + +# **checkUserPersistenceExists** +> checkUserPersistenceExists(userId, worldId) + +Check User Persistence Exists + +Checks whether the user has persistence data for a given world + +### 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.WorldsApi; + +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"); + + WorldsApi apiInstance = new WorldsApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + String worldId = "worldId_example"; // String | Must be a valid world ID. + try { + apiInstance.checkUserPersistenceExists(userId, worldId); + } catch (ApiException e) { + System.err.println("Exception when calling WorldsApi#checkUserPersistenceExists"); + 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. | | +| **worldId** | **String**| Must be a valid world ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + # **createWorld** > World createWorld(createWorldRequest) @@ -59,9 +210,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createWorldRequest** | [**CreateWorldRequest**](CreateWorldRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createWorldRequest** | [**CreateWorldRequest**](CreateWorldRequest.md)| | [optional] | ### Return type @@ -79,11 +230,152 @@ No authorization required ### HTTP 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. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single World object. | - | +| **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) + +Delete All User Persistence Data + +Deletes all of the user's persistence data for every world. + +### 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.WorldsApi; - +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"); + + WorldsApi apiInstance = new WorldsApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + try { + apiInstance.deleteAllUserPersistenceData(userId); + } catch (ApiException e) { + System.err.println("Exception when calling WorldsApi#deleteAllUserPersistenceData"); + 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 + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + +# **deleteUserPersistence** +> deleteUserPersistence(userId, worldId) + +Delete User Persistence + +Deletes the user's persistence data for a given world + +### 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.WorldsApi; + +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"); + + WorldsApi apiInstance = new WorldsApi(defaultClient); + String userId = "userId_example"; // String | Must be a valid user ID. + String worldId = "worldId_example"; // String | Must be a valid world ID. + try { + apiInstance.deleteUserPersistence(userId, worldId); + } catch (ApiException e) { + System.err.println("Exception when calling WorldsApi#deleteUserPersistence"); + 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. | | +| **worldId** | **String**| Must be a valid world ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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. | - | + + # **deleteWorld** > deleteWorld(worldId) @@ -106,12 +398,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -119,7 +405,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. try { apiInstance.deleteWorld(worldId); } catch (ApiException e) { @@ -135,9 +421,81 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP 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`. | - | + + +# **deleteWorldPlatform** +> deleteWorldPlatform(worldId, publishedPlatform) + +Delete World Platform + +Deletes a world platform. + +### 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.WorldsApi; + +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"); + + WorldsApi apiInstance = new WorldsApi(defaultClient); + String worldId = "worldId_example"; // String | Must be a valid world ID. + String publishedPlatform = "publishedPlatform_example"; // String | A platform the world supports. + try { + apiInstance.deleteWorldPlatform(worldId, publishedPlatform); + } catch (ApiException e) { + System.err.println("Exception when calling WorldsApi#deleteWorldPlatform"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **publishedPlatform** | **String**| A platform the world supports. | | ### Return type @@ -145,7 +503,7 @@ null (empty response body) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -155,13 +513,13 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | -**401** | Error response due to missing apiKey or 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`. | - | +| **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`. | - | - + # **getActiveWorlds** -> List<LimitedWorld> getActiveWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform) +> List<LimitedWorld> getActiveWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform) List Active Worlds @@ -182,12 +540,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -195,20 +547,21 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String featured = "featured_example"; // String | Filters on featured results. - String sort = "popularity"; // String | + Boolean featured = true; // Boolean | Filters on featured results. + SortOption sort = SortOption.fromValue("_created_at"); // SortOption | The sort order of the results. Integer n = 60; // Integer | The number of objects to return. - String order = "ascending"; // String | + OrderOption order = OrderOption.fromValue("ascending"); // OrderOption | Result ordering Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. String search = "search_example"; // String | Filters by world name. String tag = "tag_example"; // String | Tags to include (comma-separated). Any of the tags needs to be present. String notag = "notag_example"; // String | Tags to exclude (comma-separated). - String releaseStatus = "public"; // String | Filter by ReleaseStatus. + ReleaseStatus releaseStatus = ReleaseStatus.fromValue("all"); // ReleaseStatus | Filter by ReleaseStatus. String maxUnityVersion = "maxUnityVersion_example"; // String | The maximum Unity version supported by the asset. String minUnityVersion = "minUnityVersion_example"; // String | The minimum Unity version supported by the asset. String platform = "platform_example"; // String | The platform the asset supports. + String noplatform = "noplatform_example"; // String | The platform the asset does not support. try { - List result = apiInstance.getActiveWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); + List result = apiInstance.getActiveWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling WorldsApi#getActiveWorlds"); @@ -223,20 +576,21 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **featured** | **String**| Filters on featured results. | [optional] - **sort** | **String**| | [optional] [default to popularity] [enum: popularity, heat, trust, shuffle, random, favorites, reportScore, reportCount, publicationDate, labsPublicationDate, created, _created_at, updated, _updated_at, order, relevance, magic, name] - **n** | **Integer**| The number of objects to return. | [optional] [default to 60] - **order** | **String**| | [optional] [default to descending] [enum: ascending, descending] - **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] - **search** | **String**| Filters by world name. | [optional] - **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] - **notag** | **String**| Tags to exclude (comma-separated). | [optional] - **releaseStatus** | **String**| Filter by ReleaseStatus. | [optional] [default to public] [enum: public, private, hidden, all] - **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] - **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] - **platform** | **String**| The platform the asset supports. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **featured** | **Boolean**| Filters on featured results. | [optional] | +| **sort** | [**SortOption**](.md)| The sort order of the results. | [optional] [default to popularity] [enum: _created_at, _updated_at, created, favorites, heat, labsPublicationDate, magic, name, order, popularity, publicationDate, random, relevance, reportCount, reportScore, shuffle, trust, updated] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **order** | [**OrderOption**](.md)| Result ordering | [optional] [default to descending] [enum: ascending, descending] | +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **search** | **String**| Filters by world name. | [optional] | +| **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | +| **notag** | **String**| Tags to exclude (comma-separated). | [optional] | +| **releaseStatus** | [**ReleaseStatus**](.md)| Filter by ReleaseStatus. | [optional] [default to public] [enum: all, hidden, private, public] | +| **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] | +| **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] | +| **platform** | **String**| The platform the asset supports. | [optional] | +| **noplatform** | **String**| The platform the asset does not support. | [optional] | ### Return type @@ -244,7 +598,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -254,12 +608,12 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of LimitedWorld objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of LimitedWorld objects. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **getFavoritedWorlds** -> List<LimitedWorld> getFavoritedWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId) +> List<FavoritedWorld> getFavoritedWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId) List Favorited Worlds @@ -280,12 +634,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -293,21 +641,21 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String featured = "featured_example"; // String | Filters on featured results. - String sort = "popularity"; // String | + Boolean featured = true; // Boolean | Filters on featured results. + SortOption sort = SortOption.fromValue("_created_at"); // SortOption | The sort order of the results. Integer n = 60; // Integer | The number of objects to return. - String order = "ascending"; // String | + OrderOption order = OrderOption.fromValue("ascending"); // OrderOption | Result ordering Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. String search = "search_example"; // String | Filters by world name. String tag = "tag_example"; // String | Tags to include (comma-separated). Any of the tags needs to be present. String notag = "notag_example"; // String | Tags to exclude (comma-separated). - String releaseStatus = "public"; // String | Filter by ReleaseStatus. + ReleaseStatus releaseStatus = ReleaseStatus.fromValue("all"); // ReleaseStatus | Filter by ReleaseStatus. String maxUnityVersion = "maxUnityVersion_example"; // String | The maximum Unity version supported by the asset. String minUnityVersion = "minUnityVersion_example"; // String | The minimum Unity version supported by the asset. String platform = "platform_example"; // String | The platform the asset supports. String userId = "userId_example"; // String | Target user to see information on, admin-only. try { - List result = apiInstance.getFavoritedWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); + List result = apiInstance.getFavoritedWorlds(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling WorldsApi#getFavoritedWorlds"); @@ -322,29 +670,29 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **featured** | **String**| Filters on featured results. | [optional] - **sort** | **String**| | [optional] [default to popularity] [enum: popularity, heat, trust, shuffle, random, favorites, reportScore, reportCount, publicationDate, labsPublicationDate, created, _created_at, updated, _updated_at, order, relevance, magic, name] - **n** | **Integer**| The number of objects to return. | [optional] [default to 60] - **order** | **String**| | [optional] [default to descending] [enum: ascending, descending] - **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] - **search** | **String**| Filters by world name. | [optional] - **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] - **notag** | **String**| Tags to exclude (comma-separated). | [optional] - **releaseStatus** | **String**| Filter by ReleaseStatus. | [optional] [default to public] [enum: public, private, hidden, all] - **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] - **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] - **platform** | **String**| The platform the asset supports. | [optional] - **userId** | **String**| Target user to see information on, admin-only. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **featured** | **Boolean**| Filters on featured results. | [optional] | +| **sort** | [**SortOption**](.md)| The sort order of the results. | [optional] [default to popularity] [enum: _created_at, _updated_at, created, favorites, heat, labsPublicationDate, magic, name, order, popularity, publicationDate, random, relevance, reportCount, reportScore, shuffle, trust, updated] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **order** | [**OrderOption**](.md)| Result ordering | [optional] [default to descending] [enum: ascending, descending] | +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **search** | **String**| Filters by world name. | [optional] | +| **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | +| **notag** | **String**| Tags to exclude (comma-separated). | [optional] | +| **releaseStatus** | [**ReleaseStatus**](.md)| Filter by ReleaseStatus. | [optional] [default to public] [enum: all, hidden, private, public] | +| **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] | +| **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] | +| **platform** | **String**| The platform the asset supports. | [optional] | +| **userId** | **String**| Target user to see information on, admin-only. | [optional] | ### Return type -[**List<LimitedWorld>**](LimitedWorld.md) +[**List<FavoritedWorld>**](FavoritedWorld.md) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -354,11 +702,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of LimitedWorld objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**403** | Error response when trying to see favourited worlds of another user without sufficient admin permissions. | - | +| **200** | Returns a list of FavoritedWorld objects. | - | +| **401** | Error response due to missing auth cookie. | - | +| **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) @@ -381,12 +729,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -394,15 +736,15 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String featured = "featured_example"; // String | Filters on featured results. - String sort = "popularity"; // String | + Boolean featured = true; // Boolean | Filters on featured results. + SortOption sort = SortOption.fromValue("_created_at"); // SortOption | The sort order of the results. Integer n = 60; // Integer | The number of objects to return. - String order = "ascending"; // String | + OrderOption order = OrderOption.fromValue("ascending"); // OrderOption | Result ordering Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. String search = "search_example"; // String | Filters by world name. String tag = "tag_example"; // String | Tags to include (comma-separated). Any of the tags needs to be present. String notag = "notag_example"; // String | Tags to exclude (comma-separated). - String releaseStatus = "public"; // String | Filter by ReleaseStatus. + ReleaseStatus releaseStatus = ReleaseStatus.fromValue("all"); // ReleaseStatus | Filter by ReleaseStatus. String maxUnityVersion = "maxUnityVersion_example"; // String | The maximum Unity version supported by the asset. String minUnityVersion = "minUnityVersion_example"; // String | The minimum Unity version supported by the asset. String platform = "platform_example"; // String | The platform the asset supports. @@ -423,21 +765,21 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **featured** | **String**| Filters on featured results. | [optional] - **sort** | **String**| | [optional] [default to popularity] [enum: popularity, heat, trust, shuffle, random, favorites, reportScore, reportCount, publicationDate, labsPublicationDate, created, _created_at, updated, _updated_at, order, relevance, magic, name] - **n** | **Integer**| The number of objects to return. | [optional] [default to 60] - **order** | **String**| | [optional] [default to descending] [enum: ascending, descending] - **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] - **search** | **String**| Filters by world name. | [optional] - **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] - **notag** | **String**| Tags to exclude (comma-separated). | [optional] - **releaseStatus** | **String**| Filter by ReleaseStatus. | [optional] [default to public] [enum: public, private, hidden, all] - **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] - **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] - **platform** | **String**| The platform the asset supports. | [optional] - **userId** | **String**| Target user to see information on, admin-only. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **featured** | **Boolean**| Filters on featured results. | [optional] | +| **sort** | [**SortOption**](.md)| The sort order of the results. | [optional] [default to popularity] [enum: _created_at, _updated_at, created, favorites, heat, labsPublicationDate, magic, name, order, popularity, publicationDate, random, relevance, reportCount, reportScore, shuffle, trust, updated] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **order** | [**OrderOption**](.md)| Result ordering | [optional] [default to descending] [enum: ascending, descending] | +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **search** | **String**| Filters by world name. | [optional] | +| **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | +| **notag** | **String**| Tags to exclude (comma-separated). | [optional] | +| **releaseStatus** | [**ReleaseStatus**](.md)| Filter by ReleaseStatus. | [optional] [default to public] [enum: all, hidden, private, public] | +| **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] | +| **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] | +| **platform** | **String**| The platform the asset supports. | [optional] | +| **userId** | **String**| Target user to see information on, admin-only. | [optional] | ### Return type @@ -445,7 +787,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -455,17 +797,17 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of LimitedWorld objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | -**403** | Error response when trying to see recently visited worlds of another user without sufficient admin permissions. | - | +| **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. | - | - + # **getWorld** > World getWorld(worldId) Get World by ID -Get information about a specific World. +Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. ### Example ```java @@ -473,7 +815,6 @@ Get information about a specific World. 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.WorldsApi; @@ -481,15 +822,9 @@ 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: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. try { World result = apiInstance.getWorld(worldId); System.out.println(result); @@ -506,9 +841,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | ### Return type @@ -516,7 +851,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie) +No authorization required ### HTTP request headers @@ -526,10 +861,10 @@ Name | Type | Description | Notes ### HTTP 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`. | - | +| **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) @@ -552,12 +887,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -565,8 +894,8 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | - String instanceId = "instanceId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. + String instanceId = "instanceId_example"; // String | Must be a valid instance ID. try { Instance result = apiInstance.getWorldInstance(worldId, instanceId); System.out.println(result); @@ -583,10 +912,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | - **instanceId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **instanceId** | **String**| Must be a valid instance ID. | | ### Return type @@ -594,7 +923,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -604,10 +933,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single Instance object. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a single Instance object. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **getWorldMetadata** > WorldMetadata getWorldMetadata(worldId) @@ -621,7 +950,6 @@ Return a worlds custom metadata. This is currently believed to be unused. Metada 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.WorldsApi; @@ -629,21 +957,9 @@ 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: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.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"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. try { WorldMetadata result = apiInstance.getWorldMetadata(worldId); System.out.println(result); @@ -660,9 +976,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | ### Return type @@ -670,7 +986,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +No authorization required ### HTTP request headers @@ -680,10 +996,10 @@ Name | Type | Description | Notes ### HTTP 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`. | - | +| **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) @@ -706,12 +1022,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -719,7 +1029,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. try { WorldPublishStatus result = apiInstance.getWorldPublishStatus(worldId); System.out.println(result); @@ -736,9 +1046,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | ### Return type @@ -746,7 +1056,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -756,11 +1066,11 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single WorldPublishStatus object. | - | -**401** | Error response due to missing apiKey or 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`. | - | +| **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`. | - | - + # **publishWorld** > publishWorld(worldId) @@ -783,12 +1093,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -796,7 +1100,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. try { apiInstance.publishWorld(worldId); } catch (ApiException e) { @@ -812,9 +1116,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | ### Return type @@ -822,7 +1126,7 @@ null (empty response body) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -832,13 +1136,86 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | TODO | - | -**401** | Error response due to missing apiKey or 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`. | - | +| **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`. | - | - + +# **removeWorldTags** +> World removeWorldTags(worldId, changeWorldTagsRequest) + +Remove World Tags + +Removes tags from the world's profile + +### 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.WorldsApi; + +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"); + + WorldsApi apiInstance = new WorldsApi(defaultClient); + String worldId = "worldId_example"; // String | Must be a valid world ID. + ChangeWorldTagsRequest changeWorldTagsRequest = new ChangeWorldTagsRequest(); // ChangeWorldTagsRequest | + try { + World result = apiInstance.removeWorldTags(worldId, changeWorldTagsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling WorldsApi#removeWorldTags"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **changeWorldTagsRequest** | [**ChangeWorldTagsRequest**](ChangeWorldTagsRequest.md)| | | + +### Return type + +[**World**](World.md) + +### Authorization + +[authCookie](../README.md#authCookie) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP 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. | - | + + # **searchWorlds** -> List<LimitedWorld> searchWorlds(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform) +> List<LimitedWorld> searchWorlds(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, fuzzy, avatarSpecific) Search All Worlds @@ -859,12 +1236,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -872,22 +1243,25 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String featured = "featured_example"; // String | Filters on featured results. - String sort = "popularity"; // String | + Boolean featured = true; // Boolean | Filters on featured results. + SortOption sort = SortOption.fromValue("_created_at"); // SortOption | The sort order of the results. String user = "me"; // String | Set to `me` for searching own worlds. String userId = "userId_example"; // String | Filter by UserID. Integer n = 60; // Integer | The number of objects to return. - String order = "ascending"; // String | + OrderOption order = OrderOption.fromValue("ascending"); // OrderOption | Result ordering Integer offset = 56; // Integer | A zero-based offset from the default object sorting from where search results start. String search = "search_example"; // String | Filters by world name. String tag = "tag_example"; // String | Tags to include (comma-separated). Any of the tags needs to be present. String notag = "notag_example"; // String | Tags to exclude (comma-separated). - String releaseStatus = "public"; // String | Filter by ReleaseStatus. + ReleaseStatus releaseStatus = ReleaseStatus.fromValue("all"); // ReleaseStatus | Filter by ReleaseStatus. String maxUnityVersion = "maxUnityVersion_example"; // String | The maximum Unity version supported by the asset. String minUnityVersion = "minUnityVersion_example"; // String | The minimum Unity version supported by the asset. String platform = "platform_example"; // String | The platform the asset supports. + String noplatform = "noplatform_example"; // String | The platform the asset does not support. + Boolean fuzzy = true; // Boolean | + Boolean avatarSpecific = true; // Boolean | Only search for avatar worlds. try { - List result = apiInstance.searchWorlds(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); + List result = apiInstance.searchWorlds(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, fuzzy, avatarSpecific); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling WorldsApi#searchWorlds"); @@ -902,22 +1276,25 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **featured** | **String**| Filters on featured results. | [optional] - **sort** | **String**| | [optional] [default to popularity] [enum: popularity, heat, trust, shuffle, random, favorites, reportScore, reportCount, publicationDate, labsPublicationDate, created, _created_at, updated, _updated_at, order, relevance, magic, name] - **user** | **String**| Set to `me` for searching own worlds. | [optional] [enum: me] - **userId** | **String**| Filter by UserID. | [optional] - **n** | **Integer**| The number of objects to return. | [optional] [default to 60] - **order** | **String**| | [optional] [default to descending] [enum: ascending, descending] - **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] - **search** | **String**| Filters by world name. | [optional] - **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] - **notag** | **String**| Tags to exclude (comma-separated). | [optional] - **releaseStatus** | **String**| Filter by ReleaseStatus. | [optional] [default to public] [enum: public, private, hidden, all] - **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] - **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] - **platform** | **String**| The platform the asset supports. | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **featured** | **Boolean**| Filters on featured results. | [optional] | +| **sort** | [**SortOption**](.md)| The sort order of the results. | [optional] [default to popularity] [enum: _created_at, _updated_at, created, favorites, heat, labsPublicationDate, magic, name, order, popularity, publicationDate, random, relevance, reportCount, reportScore, shuffle, trust, updated] | +| **user** | **String**| Set to `me` for searching own worlds. | [optional] [enum: me] | +| **userId** | **String**| Filter by UserID. | [optional] | +| **n** | **Integer**| The number of objects to return. | [optional] [default to 60] | +| **order** | [**OrderOption**](.md)| Result ordering | [optional] [default to descending] [enum: ascending, descending] | +| **offset** | **Integer**| A zero-based offset from the default object sorting from where search results start. | [optional] | +| **search** | **String**| Filters by world name. | [optional] | +| **tag** | **String**| Tags to include (comma-separated). Any of the tags needs to be present. | [optional] | +| **notag** | **String**| Tags to exclude (comma-separated). | [optional] | +| **releaseStatus** | [**ReleaseStatus**](.md)| Filter by ReleaseStatus. | [optional] [default to public] [enum: all, hidden, private, public] | +| **maxUnityVersion** | **String**| The maximum Unity version supported by the asset. | [optional] | +| **minUnityVersion** | **String**| The minimum Unity version supported by the asset. | [optional] | +| **platform** | **String**| The platform the asset supports. | [optional] | +| **noplatform** | **String**| The platform the asset does not support. | [optional] | +| **fuzzy** | **Boolean**| | [optional] | +| **avatarSpecific** | **Boolean**| Only search for avatar worlds. | [optional] | ### Return type @@ -925,7 +1302,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -935,10 +1312,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of LimitedWorld objects. | - | -**401** | Error response due to missing apiKey or auth cookie. | - | +| **200** | Returns a list of LimitedWorld objects. | - | +| **401** | Error response due to missing auth cookie. | - | - + # **unpublishWorld** > unpublishWorld(worldId) @@ -961,12 +1338,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -974,7 +1345,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. try { apiInstance.unpublishWorld(worldId); } catch (ApiException e) { @@ -990,9 +1361,9 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | ### Return type @@ -1000,7 +1371,7 @@ null (empty response body) ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -1010,11 +1381,11 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | -**401** | Error response due to missing apiKey or 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`. | - | +| **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`. | - | - + # **updateWorld** > World updateWorld(worldId, updateWorldRequest) @@ -1037,12 +1408,6 @@ public class Example { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api.vrchat.cloud/api/1"); - // Configure API key authorization: apiKeyCookie - ApiKeyAuth apiKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyCookie"); - apiKeyCookie.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyCookie.setApiKeyPrefix("Token"); - // Configure API key authorization: authCookie ApiKeyAuth authCookie = (ApiKeyAuth) defaultClient.getAuthentication("authCookie"); authCookie.setApiKey("YOUR API KEY"); @@ -1050,7 +1415,7 @@ public class Example { //authCookie.setApiKeyPrefix("Token"); WorldsApi apiInstance = new WorldsApi(defaultClient); - String worldId = "worldId_example"; // String | + String worldId = "worldId_example"; // String | Must be a valid world ID. UpdateWorldRequest updateWorldRequest = new UpdateWorldRequest(); // UpdateWorldRequest | try { World result = apiInstance.updateWorld(worldId, updateWorldRequest); @@ -1068,10 +1433,10 @@ public class Example { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **worldId** | **String**| | - **updateWorldRequest** | [**UpdateWorldRequest**](UpdateWorldRequest.md)| | [optional] +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **worldId** | **String**| Must be a valid world ID. | | +| **updateWorldRequest** | [**UpdateWorldRequest**](UpdateWorldRequest.md)| | [optional] | ### Return type @@ -1079,7 +1444,7 @@ Name | Type | Description | Notes ### Authorization -[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie) +[authCookie](../README.md#authCookie) ### HTTP request headers @@ -1089,7 +1454,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a single World object. | - | -**401** | Error response due to missing apiKey or 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`. | - | +| **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`. | - | diff --git a/examples/pom.xml b/examples/pom.xml index fb11611b..2d8e9c54 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -23,7 +23,12 @@ com.github.vrchatapi vrchatapi-java - 1.0.1-globalcookie3 + LATEST + + + com.squareup.okhttp3 + okhttp + 4.10.0 \ No newline at end of file diff --git a/examples/src/main/java/io/github/vrchatapi/demo/CookiesLoad.java b/examples/src/main/java/io/github/vrchatapi/demo/CookiesLoad.java new file mode 100644 index 00000000..77c80ac7 --- /dev/null +++ b/examples/src/main/java/io/github/vrchatapi/demo/CookiesLoad.java @@ -0,0 +1,25 @@ +package io.github.vrchatapi.demo; + +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.api.AuthenticationApi; +import io.github.vrchatapi.auth.HttpBasicAuth; +import io.github.vrchatapi.model.CurrentUser; + +public class CookiesLoad { + + public static void main(String[] args) throws ApiException { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + AuthenticationApi authApi = new AuthenticationApi(defaultClient); + HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader"); + authHeader.setUsername("username"); + authHeader.setPassword("password"); + defaultClient.setUserAgent("ExampleProgram/0.0.1 my@email.com"); + defaultClient.addDefaultHeader("Cookie", "auth=[AUTH_COOKIE_HERE]; twoFactorAuth=[TWO_FACTOR_AUTH_COOKIE_HERE]"); + + CurrentUser user = authApi.getCurrentUser(); + System.out.println("Logged in as: " + user.getDisplayName()); + } + +} diff --git a/examples/src/main/java/io/github/vrchatapi/demo/CookiesStore.java b/examples/src/main/java/io/github/vrchatapi/demo/CookiesStore.java new file mode 100644 index 00000000..9c00192a --- /dev/null +++ b/examples/src/main/java/io/github/vrchatapi/demo/CookiesStore.java @@ -0,0 +1,52 @@ +package io.github.vrchatapi.demo; + +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.api.AuthenticationApi; +import io.github.vrchatapi.auth.HttpBasicAuth; +import io.github.vrchatapi.model.CurrentUser; +import io.github.vrchatapi.model.TwoFactorAuthCode; +import io.github.vrchatapi.model.TwoFactorEmailCode; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.List; +import okhttp3.Cookie; + +public class CookiesStore { + + public static void main(String[] args) throws ApiException, IOException { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + AuthenticationApi authApi = new AuthenticationApi(defaultClient); + HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader"); + authHeader.setUsername("username"); + authHeader.setPassword("password"); + defaultClient.setUserAgent("ExampleProgram/0.0.1 my@email.com"); + + BufferedReader reader = new BufferedReader( new InputStreamReader( System.in ) ); + try { + authApi.getCurrentUser(); + } + catch (IllegalArgumentException e){ + if (e.toString().contains("emailOtp")){ + System.out.println("2FA Email code:"); + TwoFactorEmailCode code = new TwoFactorEmailCode(); + code.setCode(reader.readLine()); + authApi.verify2FAEmailCode(code); + } else { + System.out.println("2FA Authenticator code:"); + TwoFactorAuthCode code = new TwoFactorAuthCode(); + code.setCode(reader.readLine()); + authApi.verify2FA(code); + } + } + CurrentUser user = authApi.getCurrentUser(); + System.out.println("Logged in as: " + user.getDisplayName()); + + List cookies = defaultClient.getHttpClient().cookieJar().loadForRequest(new okhttp3.HttpUrl.Builder().scheme("http").host("api.vrchat.cloud").build()); + System.out.println("auth: " + cookies.get(0).value()); + System.out.println("twoFactorAuth: " + cookies.get(1).value()); + } + +} diff --git a/examples/src/main/java/io/github/vrchatapi/demo/Demo.java b/examples/src/main/java/io/github/vrchatapi/demo/Demo.java index 5e49ffa6..35573875 100644 --- a/examples/src/main/java/io/github/vrchatapi/demo/Demo.java +++ b/examples/src/main/java/io/github/vrchatapi/demo/Demo.java @@ -4,10 +4,13 @@ import io.github.vrchatapi.auth.*; import io.github.vrchatapi.api.*; import io.github.vrchatapi.model.*; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; public class Demo { - public static void main(String[] args) throws ApiException { + public static void main(String[] args) throws ApiException, IOException { // Step 1. VRChat consists of several API's // e.g. (WorldsApi, UsersApi, FilesApi, NotificationsApi, FriendsApi, etc...) // Here we instantiate the Authentication API which is required for logging in. @@ -15,17 +18,34 @@ public static void main(String[] args) throws ApiException { AuthenticationApi authApi = new AuthenticationApi(defaultClient); // Step 2. We begin with creating a Configuration - // This contains the username and password for authentication. + // This contains the username and password for authentication, as well as a user agent. HttpBasicAuth authHeader = (HttpBasicAuth) defaultClient.getAuthentication("authHeader"); authHeader.setUsername("username"); authHeader.setPassword("password"); + defaultClient.setUserAgent("ExampleProgram/0.0.1 my@email.com"); + // Step 3. Call getCurrentUser on Authentication API. - // This logs you in if the user isn't already logged in. - CurrentUser result = authApi.getCurrentUser(); - System.out.println(result.getDisplayName()); - - System.exit(0); + BufferedReader reader = new BufferedReader( new InputStreamReader( System.in ) ); + try { + authApi.getCurrentUser(); + } + catch (IllegalArgumentException e){ + // Step 4. Verify using 2fa. + if (e.toString().contains("emailOtp")){ + System.out.println("2FA Email code:"); + TwoFactorEmailCode code = new TwoFactorEmailCode(); + code.setCode(reader.readLine()); + authApi.verify2FAEmailCode(code); + } else { + System.out.println("2FA Authenticator code:"); + TwoFactorAuthCode code = new TwoFactorAuthCode(); + code.setCode(reader.readLine()); + authApi.verify2FA(code); + } + } + CurrentUser user = authApi.getCurrentUser(); + System.out.println("Logged in as: " + user.getDisplayName()); } } diff --git a/generate.sh b/generate.sh old mode 100644 new mode 100755 index 4a8cc547..debd972c --- a/generate.sh +++ b/generate.sh @@ -1,6 +1,10 @@ -#!/bin/bash +#!/usr/bin/env bash -npm install @openapitools/openapi-generator-cli +if [ ${#} -le 0 ] +then + echo "Usage: generate.sh " >&2 + exit 1 +fi rm docs -rf rm src/main/java/io/github/vrchatapi/*.java @@ -8,13 +12,14 @@ rm src/main/java/io/github/vrchatapi/api -rf rm src/main/java/io/github/vrchatapi/auth -rf rm src/main/java/io/github/vrchatapi/model -rf -./node_modules/\@openapitools/openapi-generator-cli/main.js generate \ +openapi-generator generate \ -g java \ +--global-property skipFormModel=false \ --additional-properties=groupId=io.github.vrchatapi,apiPackage=io.github.vrchatapi.api,invokerPackage=io.github.vrchatapi,modelPackage=io.github.vrchatapi.model,artifactId=vrchatapi,licenseName=MIT,licenseUrl=https://github.com/vrchatapi/vrchatapi-java/blob/main/LICENSE,developerEmail=me@ruby.js.org,developerName=VRChatAPI,developerOrganization=vrchatapi,developerOrganizationUrl=https://github.com/VRChatAPI,hideGenerationTimestamp=true \ --git-user-id=vrchatapi \ --git-repo-id=vrchatapi-java \ -o . \ --i https://raw.githubusercontent.com/vrchatapi/specification/gh-pages/openapi.yaml \ +-i "${1}" \ --http-user-agent="vrchatapi-java" # Remove unneccesary copy of spec @@ -23,9 +28,12 @@ rm api/ -rf # Update Java 7 to Java 8 sed -i 's/java.version>1.7/java.version>1.8/g' pom.xml +# Avoid percent-encoding for "(" and ")" characters in URI +sed -i 's/URLEncoder.encode(str, "utf8").replaceAll("\\\\+", "%20")/URLEncoder.encode(str, "utf8").replaceAll("%28", "(").replaceAll("%29", ")").replaceAll("\\\\+", "%20")/g' src/main/java/io/github/vrchatapi/ApiClient.java + # Add global cookie storage 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/openapi.yaml b/openapi.yaml new file mode 100644 index 00000000..7fd25e06 --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,19236 @@ +openapi: 3.0.3 +info: + title: VRChat API Documentation + version: 1.20.7 + contact: + name: Unofficial VRChat API Documentation Project + url: https://github.com/VRChatAPI + email: vrchatapi.lpv0t@aries.fyi + termsOfService: https://vrchat.com/legal/ + license: + url: https://github.com/vrchatapi/specification/blob/master/LICENSE + name: MIT + description: |- + ![VRChat API Banner](https://vrchatapi.github.io/assets/img/api_banner_1500x400.png) + + # Welcome to the VRChat API + + Before we begin, we would like to state this is a **COMMUNITY DRIVEN PROJECT**. + This means that everything you read on here was written by the community itself and is **not** officially supported by VRChat. + The documentation is provided "AS IS", and any action you take towards VRChat is completely your own responsibility. + + The documentation and additional libraries SHALL ONLY be used for applications interacting with VRChat's API in accordance + with their [Terms of Service](https://hello.vrchat.com/legal) and [Community Guidelines](https://hello.vrchat.com/community-guidelines), and MUST NOT be used for modifying the client, "avatar ripping", or other illegal activities. + Malicious usage or spamming the API may result in account termination. + Certain parts of the API are also more sensitive than others, for example moderation, so please tread extra carefully and read the warnings when present. + + ![Tupper Policy on API](https://i.imgur.com/yLlW7Ok.png) + + Finally, use of the API using applications other than the approved methods (website, VRChat application, Unity SDK) is not officially supported. + VRChat provides no guarantee or support for external applications using the API. Access to API endpoints may break **at any time, without notice**. + Therefore, please **do not ping** VRChat Staff in the VRChat Discord if you are having API problems, as they do not provide API support. + We will make a best effort in keeping this documentation and associated language libraries up to date, but things might be outdated or missing. + If you find that something is no longer valid, please contact us on Discord or [create an issue](https://github.com/vrchatapi/specification/issues) and tell us so we can fix it. + + # Getting Started + + The VRChat API can be used to programmatically retrieve or update information regarding your profile, friends, avatars, worlds and more. + The API consists of two parts, "Photon" which is only used in-game, and the "Web API" which is used by both the game and the website. + This documentation focuses only on the Web API. + + The API is designed around the REST ideology, providing semi-simple and usually predictable URIs to access and modify objects. + Requests support standard HTTP methods like GET, PUT, POST, and DELETE and standard status codes. + Response bodies are always UTF-8 encoded JSON objects, unless explicitly documented otherwise. + +
+ 🛑 Warning! Do not touch Photon!
+ Photon is only used by the in-game client and should not be touched. Doing so may result in permanent account termination. +
+ +
+ ℹ️ Authentication
+ Read Authentication for how to log in. +
+ + # Using the API + + For simply exploring what the API can do it is strongly recommended to download [Insomnia](https://insomnia.rest/download), a free and open-source + API client that's great for sending requests to the API in an orderly fashion. + Insomnia allows you to send data in the format that's required for VRChat's API. + It is also possible to try out the API in your browser, by first logging in at [vrchat.com/home](https://vrchat.com/home/) and then going to + [vrchat.com/api/1/auth/user](https://vrchat.com/api/1/auth/user), but the information will be much harder to work with. + + For more permanent operation such as software development it is instead recommended to use one of the existing language SDKs. + This community project maintains API libraries in several languages, which allows you to interact with the API with simple function calls + rather than having to implement the HTTP protocol yourself. Most of these libraries are automatically generated from the API specification, + sometimes with additional helpful wrapper code to make usage easier. This allows them to be almost automatically updated and expanded upon + as soon as a new feature is introduced in the specification itself. The libraries can be found on [GitHub](https://github.com/vrchatapi) or following: + + * [NodeJS (JavaScript)](https://www.npmjs.com/package/vrchat) + * [Dart](https://pub.dev/packages/vrchat_dart) + * [Rust](https://crates.io/crates/vrchatapi) + * [C#](https://github.com/vrchatapi/vrchatapi-csharp) + * [Python](https://github.com/vrchatapi/vrchatapi-python) + + # Pagination + + Most endpoints enforce pagination, meaning they will only return 10 entries by default, and never more than 100.
+ Using both the limit and offset parameters allows you to easily paginate through a large number of objects. + + | Query Parameter | Type | Description | + | ----------|--|------- | + | `n` | integer | The number of objects to return. This value often defaults to 10. Highest limit is always 100.| + | `offset` | integer | A zero-based offset from the default object sorting.| + + If a request returns fewer objects than the `limit` parameter, there are no more items available to return. + + # Contribution + + Do you want to get involved in the documentation effort? Do you want to help improve one of the language API libraries? + This project is an [OPEN Open Source Project](https://openopensource.org)! This means that individuals making significant and valuable contributions are given + commit-access to the project. It also means we are very open and welcoming of new people making contributions, unlike some more guarded open-source projects. + + [![Discord](https://img.shields.io/static/v1?label=vrchatapi&message=discord&color=blueviolet&style=for-the-badge)](https://discord.gg/qjZE9C9fkB) +servers: + - url: https://api.vrchat.cloud/api/1 +tags: + - name: authentication + description: Authentication Docs Here + - name: avatars + description: Avatars Docs Here + - name: calendar + description: Calendar docs here + - name: economy + description: Economy Docs Here + - name: favorites + description: Favorites Docs Here + - name: files + description: Files Docs Here + - name: friends + description: Friends Docs Here + - name: groups + description: Group Docs Here + - name: inventory + description: The inventory manages collectable items, such as drop bundles and their contents. + - name: invite + description: Invite Docs Here + - name: instances + description: Instances Docs Here + - name: jams + description: Jams Docs Here + - name: notifications + description: Notifiations Docs + - name: playermoderation + description: |- + There are two different moderation API's, "moderation" for Staff actions, and "playermoderation" for players. + PlayerModerations are user-generated actions towards others, such as muting them, blocking, or toggling interaction. + + Your global permission settings are stored locally on your computer. + Only player-specific moderations (when you target a player, and allow them specifically to interact with you) are stored in the API. + + ## Implementation details + + There are three different user-targetted permission options: + + - Mode 1: interactOn/unmute/unblock + - Mode 2: interactOff/mute/block + - *Default setting* + + **Example:** + + Force On (`interactOn`) and Force Off (`interactOff`) always or never allow that person to interact with you. + These are stored as PlayerModerations. When you select a player and select "Force On", it creates a playerModeration of type `interactOn`. + + **Important order:** + + 1. When switching between one mode from the other, e.g. "Force On" and "Force Off", **the previous playerModeration MUST first be deleted before creating the second.** + The game sends these in sequence, first delete the old, then create the new. Attempting to create both `interactOn` and `interactOff` is UNDOCUMENTED behavior. + 2. "Use Current Setting" **does not have it's own enum**. The game removes any previous playerModeration of same type. + No playerModeration of either type means fallback to the global setting. + + ## Deprecation notice + + As of October 2022, `showAvatar` and `hideAvatar` has been moved to local storage. + Sending these types to the API will result in a 200 OK response, but the API will **not** store them. + More information is avaiable on VRChat's official [documentation on Local Storage](https://docs.vrchat.com/docs/local-vrchat-storage). + - name: prints + description: Prints are a way to print photos directly from the VRChat camera. + - name: props + description: Props are interactable items users can spawn into instances. + - name: users + description: Users Docs Here + - name: worlds + description: Worlds Docs Here + - name: miscellaneous + description: Miscellaneous endpoints that do not fit into any other category. +paths: + /Admin/transactions/{transactionId}: + parameters: + - $ref: '#/components/parameters/transactionId' + /Steam/transactions: + get: + operationId: getSteamTransactions + summary: List Steam Transactions + description: Get all own Steam transactions. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/TransactionListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /Steam/transactions/{transactionId}: + parameters: + - $ref: '#/components/parameters/transactionId' + get: + operationId: getSteamTransaction + deprecated: true + summary: Get Steam Transaction + description: Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/TransactionResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /adminassetbundles/{adminAssetBundleId}: + get: + operationId: getAdminAssetBundle + summary: Get AdminAssetBundle + description: Returns an AdminAssetBundle + tags: + - files + parameters: + - $ref: '#/components/parameters/adminAssetBundleId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AdminAssetBundleResponse' + /agreement: + get: + operationId: getContentAgreementStatus + summary: Get Content Agreement Status + description: Returns the agreement status of the currently authenticated user for the given agreementCode, contentId, and version. + tags: + - files + parameters: + - name: agreementCode + description: The type of agreement (currently content.copyright.owned) + required: true + in: query + schema: + $ref: '#/components/schemas/AgreementCode' + - name: contentId + description: The id of the content being uploaded, such as a WorldID, AvatarID, or PropID + required: true + in: query + schema: + type: string + example: avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11 + - name: version + description: The version of the agreement (currently 1) + required: true + in: query + schema: + type: integer + example: 1 + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AgreementStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: submitContentAgreement + summary: Submit Content Agreement + description: Returns the agreement of the currently authenticated user for the given agreementCode, contentId, and version. + tags: + - files + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgreementRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AgreementResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /analysis/{fileId}/{versionId}: + parameters: + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/versionId' + get: + operationId: getFileAnalysis + summary: Get File Version Analysis + description: Get the performance analysis for the uploaded assets of an avatar + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileAnalysisResponse' + '202': + $ref: '#/components/responses/AnalysisNotYetAvailableError' + '404': + $ref: '#/components/responses/FileNotFoundError' + /analysis/{fileId}/{versionId}/security: + parameters: + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/versionId' + get: + operationId: getFileAnalysisSecurity + summary: Get File Version Analysis Security + description: Get the security performance analysis for the uploaded assets of an avatar + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileAnalysisResponse' + '202': + $ref: '#/components/responses/AnalysisNotYetAvailableError' + '404': + $ref: '#/components/responses/FileNotFoundError' + /analysis/{fileId}/{versionId}/standard: + parameters: + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/versionId' + get: + operationId: getFileAnalysisStandard + summary: Get File Version Analysis Standard + description: Get the standard performance analysis for the uploaded assets of an avatar + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileAnalysisResponse' + '202': + $ref: '#/components/responses/AnalysisNotYetAvailableError' + '404': + $ref: '#/components/responses/FileNotFoundError' + /assetReview/{assetReviewId}/notes: + parameters: + - $ref: '#/components/parameters/assetReviewId' + put: + operationId: updateAssetReviewNotes + summary: Update Asset Review Notes + description: Update notes regarding an asset review. + tags: + - files + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAssetReviewNotesRequest' + security: + - authCookie: [] + responses: + '200': + description: The asset review notes are submitted. + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth: + get: + operationId: verifyAuthToken + summary: Verify Auth Token + description: Verify whether the currently provided Auth Token is valid. + tags: + - authentication + parameters: [] + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/VerifyAuthTokenResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/confirmEmail: + get: + operationId: confirmEmail + summary: Confirm Email + description: Confirms the email address for a user + tags: + - authentication + parameters: + - $ref: '#/components/parameters/confirmEmailUserId' + - $ref: '#/components/parameters/confirmEmailToken' + responses: + '302': + $ref: '#/components/responses/ConfirmEmailResponse' + /auth/exists: + get: + operationId: checkUserExists + summary: Check User Exists + description: |- + Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. + + It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search. + tags: + - authentication + parameters: + - $ref: '#/components/parameters/email' + - $ref: '#/components/parameters/displayName' + - $ref: '#/components/parameters/usernameQuery' + - $ref: '#/components/parameters/excludeUserId' + responses: + '200': + $ref: '#/components/responses/UserExistsResponse' + '400': + $ref: '#/components/responses/MissingParameterError' + /auth/permissions: + parameters: [] + get: + operationId: getAssignedPermissions + summary: Get Assigned Permissions + description: Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. + tags: + - miscellaneous + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PermissionListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/register: + post: + operationId: registerUserAccount + deprecated: true + summary: Register User Account + description: |- + ~~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 + tags: + - authentication + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterUserAccountRequest' + responses: + '200': + $ref: '#/components/responses/CurrentUserLoginResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/twofactorauth: + delete: + operationId: disable2FA + summary: Disable 2FA + description: Disables 2FA for the currently logged in account + tags: + - authentication + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Disable2FAResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/twofactorauth/emailotp/verify: + post: + operationId: verify2FAEmailCode + summary: Verify 2FA email code + description: Finishes the login sequence with an 2FA email code. + tags: + - authentication + parameters: [] + requestBody: + required: true + content: + application/json: + examples: {} + schema: + $ref: '#/components/schemas/TwoFactorEmailCode' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Verify2FAEmailCodeResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/twofactorauth/otp/verify: + post: + operationId: verifyRecoveryCode + summary: Verify 2FA code with Recovery code + description: Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled. + tags: + - authentication + requestBody: + required: true + content: + application/json: + examples: {} + schema: + $ref: '#/components/schemas/TwoFactorAuthCode' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Verify2FAResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/twofactorauth/totp/pending: + delete: + operationId: cancelPending2FA + summary: Cancel pending enabling of time-based 2FA codes + description: Cancels the sequence for enabling time-based 2FA. + tags: + - authentication + parameters: [] + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Disable2FAResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: enable2FA + summary: Enable time-based 2FA codes + description: Begins the sequence for enabling time-based 2FA. + tags: + - authentication + parameters: [] + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Pending2FAResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/twofactorauth/totp/pending/verify: + post: + operationId: verifyPending2FA + summary: Verify Pending 2FA code + description: Finishes sequence for enabling time-based 2FA. + tags: + - authentication + parameters: [] + requestBody: + required: true + content: + application/json: + examples: {} + schema: + $ref: '#/components/schemas/TwoFactorAuthCode' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Verify2FAResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/twofactorauth/totp/verify: + post: + operationId: verify2FA + summary: Verify 2FA code + description: Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. + tags: + - authentication + parameters: [] + requestBody: + required: true + content: + application/json: + examples: {} + schema: + $ref: '#/components/schemas/TwoFactorAuthCode' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Verify2FAResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user: + get: + operationId: getCurrentUser + summary: Login and/or Get Current User Info + description: |- + 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. + tags: + - authentication + parameters: [] + security: + - authHeader: [] + - authHeader: [] + twoFactorAuthCookie: [] + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CurrentUserLoginResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/avatarmoderations: + delete: + operationId: deleteGlobalAvatarModeration + summary: Delete Global Avatar Moderation + description: Globally unmoderates an avatar. + tags: + - authentication + parameters: + - $ref: '#/components/parameters/targetAvatarId' + - $ref: '#/components/parameters/avatarModerationType' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteAvatarModerationResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + get: + operationId: getGlobalAvatarModerations + summary: Get Global Avatar Moderations + description: Returns list of globally moderated avatars. + tags: + - authentication + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GetAvatarModerationsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: createGlobalAvatarModeration + summary: Create Global Avatar Moderation + description: Globally moderates an avatar. + tags: + - authentication + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAvatarModerationRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CreateAvatarModerationResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/favoritelimits: + parameters: [] + get: + operationId: getFavoriteLimits + summary: Get Favorite Limits + description: Return information about a specific Favorite. + tags: + - favorites + parameters: [] + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoriteLimitsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/friends: + get: + operationId: getFriends + summary: List Friends + description: List information about friends. + tags: + - friends + parameters: + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offline' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LimitedUserFriendListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/friends/{userId}: + parameters: + - $ref: '#/components/parameters/userId' + delete: + operationId: unfriend + summary: Unfriend + description: Unfriend a user by ID. + tags: + - friends + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UnfriendSuccess' + '400': + $ref: '#/components/responses/NotFriendsError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/notifications: + get: + operationId: getNotifications + summary: List Notifications + description: Retrieve all of the current user's notifications. + tags: + - notifications + parameters: + - name: type + deprecated: true + description: Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated. + in: query + schema: + type: string + example: all + - name: sent + deprecated: true + description: Return notifications sent by the user. Must be false or omitted. + in: query + schema: + type: boolean + - name: hidden + description: Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. + in: query + schema: + type: boolean + - name: after + description: Only return notifications sent after this Date. Ignored if type is `friendRequest`. + in: query + schema: + type: string + example: five_minutes_ago + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/notifications/clear: + put: + operationId: clearNotifications + summary: Clear All Notifications + description: Clear **all** notifications. + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ClearNotificationsSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/notifications/{notificationId}: + parameters: + - $ref: '#/components/parameters/notificationId' + get: + operationId: getNotification + summary: Show notification + description: Get a notification by notification `not_` ID. + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/NotificationNotFoundError' + /auth/user/notifications/{notificationId}/accept: + parameters: + - $ref: '#/components/parameters/notificationId' + put: + operationId: acceptFriendRequest + summary: Accept Friend Request + description: Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FriendSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/AcceptFriendRequestError' + /auth/user/notifications/{notificationId}/hide: + parameters: + - $ref: '#/components/parameters/notificationId' + put: + operationId: deleteNotification + summary: Delete Notification + description: Delete a notification. + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/notifications/{notificationId}/see: + parameters: + - $ref: '#/components/parameters/notificationId' + put: + operationId: markNotificationAsRead + summary: Mark Notification As Read + description: Mark a notification as seen. + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/playermoderations: + delete: + operationId: clearAllPlayerModerations + summary: Clear All Player Moderations + description: ⚠️ **This will delete every single player moderation you've ever made.** + tags: + - playermoderation + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PlayerModerationClearAllSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + get: + operationId: getPlayerModerations + summary: Search Player Moderations + description: |- + Returns a list of all player moderations made by **you**. + + This endpoint does not have pagination, and will return *all* results. Use query parameters to limit your query if needed. + tags: + - playermoderation + parameters: + - name: type + description: Must be one of PlayerModerationType. + in: query + schema: + $ref: '#/components/schemas/PlayerModerationType' + - name: targetUserId + description: Must be valid UserID. + in: query + schema: + $ref: '#/components/schemas/UserID' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PlayerModerationListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: moderateUser + summary: Moderate User + description: |- + Moderate a user, e.g. unmute them or show their avatar. + + Please see the [Player Moderation docs](https://vrchatapi.github.io/docs/api/#tag--playermoderation) on what playerModerations are, and how they differ from staff moderations. + tags: + - playermoderation + requestBody: + description: '' + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ModerateUserRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PlayerModerationResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/resendEmail: + post: + operationId: resendEmailConfirmation + summary: Resend Email Confirmation + description: Requests a resend of pending email address confirmation email + tags: + - authentication + parameters: [] + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ResendVerificationEmailSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/subscription: + get: + operationId: getCurrentSubscriptions + summary: Get Current Subscriptions + description: Get a list of all current user subscriptions. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserSubscriptionListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/twofactorauth/otp: + get: + operationId: getRecoveryCodes + summary: Get 2FA Recovery codes + description: Gets the OTP (One Time Password) recovery codes for accounts with 2FA-protection enabled. + tags: + - authentication + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/Get2FARecoveryCodesResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/user/unplayermoderate: + put: + operationId: unmoderateUser + summary: Unmoderate User + description: Removes a player moderation previously added through `moderateUser`. E.g if you previously have shown their avatar, but now want to reset it to default. + tags: + - playermoderation + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ModerateUserRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PlayerModerationUnmoderatedSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /auth/verifyLoginPlace: + get: + operationId: verifyLoginPlace + summary: Verify Login Place + description: Verifies a login attempt for a user + tags: + - authentication + parameters: + - $ref: '#/components/parameters/userIdQuery' + - $ref: '#/components/parameters/verifyLoginPlaceToken' + responses: + '302': + $ref: '#/components/responses/VerifyLoginPlaceResponse' + /avatarStyles: + get: + operationId: getAvatarStyles + summary: Get Avatar Styles + description: List avatar styles. + tags: + - avatars + responses: + '200': + $ref: '#/components/responses/AvatarStyleListResponse' + /avatars: + get: + operationId: searchAvatars + summary: Search Avatars + description: Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars. + tags: + - avatars + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sort' + - name: user + description: Set to `me` for searching own avatars. + required: false + in: query + schema: + type: string + enum: + - me + - $ref: '#/components/parameters/userIdQuery' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/isInternalVariant' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: createAvatar + summary: Create Avatar + description: Create an avatar. It's possible to optionally specify a ID if you want a custom one. Attempting to create an Avatar with an already claimed ID will result in a DB error. + tags: + - avatars + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAvatarRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarResponse' + '400': + $ref: '#/components/responses/UnableToCreateAvatarNowError' + '401': + $ref: '#/components/responses/FeaturedSetNotAdminError' + /avatars/favorites: + get: + operationId: getFavoritedAvatars + summary: List Favorited Avatars + description: Search and list favorited avatars by query filters. + tags: + - avatars + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sort' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/userIdAdmin' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/AvatarSeeOtherUserFavoritesError' + /avatars/impostor/queue/stats: + get: + operationId: getImpostorQueueStats + summary: Get Impostor Queue Stats + description: Gets service stats for queued impostor. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarImpostorQueueStatsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /avatars/licensed: + get: + operationId: getLicensedAvatars + summary: List Licensed Avatars + description: List licensed avatars. + tags: + - avatars + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /avatars/{avatarId}: + parameters: + - $ref: '#/components/parameters/avatarId' + get: + operationId: getAvatar + summary: Get Avatar + description: Get information about a specific Avatar. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/AvatarNotFoundError' + put: + operationId: updateAvatar + summary: Update Avatar + description: Update information about a specific avatar. + tags: + - avatars + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAvatarRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/AvatarNotFoundError' + delete: + operationId: deleteAvatar + summary: Delete Avatar + description: Delete an avatar. Notice an avatar is never fully "deleted", only its ReleaseStatus is set to "hidden" and the linked Files are deleted. The AvatarID is permanently reserved. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/AvatarNotFoundError' + /avatars/{avatarId}/impostor: + parameters: + - $ref: '#/components/parameters/avatarId' + delete: + operationId: deleteImpostor + summary: Delete generated Impostor + description: Delete generated Impostor for that avatar. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + description: The Impostors generated for that avatar are deleted. + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/AvatarNotFoundError' + /avatars/{avatarId}/impostor/enqueue: + parameters: + - $ref: '#/components/parameters/avatarId' + post: + operationId: enqueueImpostor + summary: Enqueue Impostor generation + description: Enqueue Impostor generation for that avatar. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarImpostorEnqueueResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/AvatarNotFoundError' + /avatars/{avatarId}/select: + parameters: + - $ref: '#/components/parameters/avatarId' + put: + operationId: selectAvatar + summary: Select Avatar + description: Switches into that avatar. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CurrentUserResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/AvatarNotFoundError' + /avatars/{avatarId}/selectFallback: + parameters: + - $ref: '#/components/parameters/avatarId' + put: + operationId: selectFallbackAvatar + deprecated: true + summary: Select Fallback Avatar + description: Switches into that avatar as your fallback avatar. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CurrentUserResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/AvatarNotTaggedAsFallbackError' + '404': + $ref: '#/components/responses/AvatarNotFoundError' + /calendar: + get: + operationId: getCalendarEvents + summary: List calendar events + description: Get a list of a user's calendar events for the month in ?date + tags: + - calendar + parameters: + - $ref: '#/components/parameters/monthDate' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/discover: + get: + operationId: discoverCalendarEvents + summary: Discover calendar events + description: |- + Get a list of calendar events + Initially, call without a `nextCursor` parameter + For every successive call, use the `nextCursor` property returned in the previous call & the `number` of entries desired for this call + The `nextCursor` internally keeps track of the `offset` of the results, the initial request parameters, and accounts for discrepancies that might arise from time elapsed between calls + tags: + - calendar + parameters: + - $ref: '#/components/parameters/calendarDiscoveryScope' + - $ref: '#/components/parameters/calendarDiscoveryCategories' + - $ref: '#/components/parameters/calendarDiscoveryTags' + - $ref: '#/components/parameters/calendarDiscoveryFeatured' + - $ref: '#/components/parameters/calendarDiscoveryNonFeatured' + - $ref: '#/components/parameters/calendarDiscoveryPersonalized' + - $ref: '#/components/parameters/calendarDiscoveryMinimumInterestCount' + - $ref: '#/components/parameters/calendarDiscoveryMinimumRemainingMinutes' + - $ref: '#/components/parameters/calendarDiscoveryUpcomingOffsetMinutes' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/calendarDiscoveryNextCursor' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventDiscoveryResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/featured: + get: + operationId: getFeaturedCalendarEvents + summary: List featured calendar events + description: Get a list of a featured calendar events for the month in ?date + tags: + - calendar + parameters: + - $ref: '#/components/parameters/monthDate' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/following: + get: + operationId: getFollowedCalendarEvents + summary: List followed calendar events + description: Get a list of a followed calendar events for the month in ?date + tags: + - calendar + parameters: + - $ref: '#/components/parameters/monthDate' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/search: + get: + operationId: searchCalendarEvents + summary: Search for calendar events + description: Get a list of calendar events by search terms + tags: + - calendar + parameters: + - $ref: '#/components/parameters/calendarSearchTerm' + - $ref: '#/components/parameters/utcOffset' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/isInternalVariant' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/{groupId}: + get: + operationId: getGroupCalendarEvents + summary: List a group's calendar events + description: Get a list of a group's calendar events + tags: + - calendar + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/monthDate' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/{groupId}/event: + parameters: + - $ref: '#/components/parameters/groupId' + post: + operationId: createGroupCalendarEvent + summary: Create a calendar event + description: Creates an event for a group on the calendar + tags: + - calendar + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCalendarEventRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventResponse' + '400': + $ref: '#/components/responses/CalendarOperationError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/CalendarOperationError' + /calendar/{groupId}/next: + get: + operationId: getGroupNextCalendarEvent + summary: Get next calendar event + description: Get the closest future calendar event scheduled for a group + tags: + - calendar + parameters: + - $ref: '#/components/parameters/groupId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/CalendarEventNotFoundError' + /calendar/{groupId}/{calendarId}: + delete: + operationId: deleteGroupCalendarEvent + summary: Delete a calendar event + description: Delete a group calendar event + tags: + - calendar + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/calendarId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteCalendarEventSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/CalendarEventNotFoundError' + get: + operationId: getGroupCalendarEvent + summary: Get a calendar event + description: Get a group calendar event + tags: + - calendar + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/calendarId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/{groupId}/{calendarId}.ics: + get: + operationId: getGroupCalendarEventICS + summary: Download calendar event as ICS + description: Returns the specified calendar in iCalendar (ICS) format. + tags: + - calendar + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/calendarId' + responses: + '200': + $ref: '#/components/responses/ICSResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/CalendarEventNotFoundError' + /calendar/{groupId}/{calendarId}/event: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/calendarId' + put: + operationId: updateGroupCalendarEvent + summary: Update a calendar event + description: Updates an event for a group on the calendar + tags: + - calendar + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCalendarEventRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /calendar/{groupId}/{calendarId}/follow: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/calendarId' + post: + operationId: followGroupCalendarEvent + summary: Follow a calendar event + description: Follow or unfollow an event on a group's calendar + tags: + - calendar + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FollowCalendarEventRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CalendarEventResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /config: + get: + operationId: getConfig + summary: Fetch API Config + description: |- + API config contains configuration that the clients needs to work properly. + + Currently the most important value here is `clientApiKey` which is used for all other API endpoints. + tags: + - miscellaneous + security: [] + responses: + '200': + $ref: '#/components/responses/APIConfigResponse' + /css/app.css: + get: + operationId: getCSS + summary: Download CSS + description: Fetches the CSS code to the frontend React website. + tags: + - miscellaneous + parameters: + - $ref: '#/components/parameters/variant' + - $ref: '#/components/parameters/branch' + responses: + '200': + description: '**Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively.' + content: + text/css: + schema: + type: string + '400': + $ref: '#/components/responses/DownloadSourceCodeAccessError' + /economy/licenses/active: + get: + operationId: getActiveLicenses + summary: Get Active Licenses + description: Gets active licenses + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LicenseListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/metrics/earnings: + parameters: + - $ref: '#/components/parameters/metricDateStart' + - $ref: '#/components/parameters/metricDateEnd' + - $ref: '#/components/parameters/sellerId' + - $ref: '#/components/parameters/groupByDuration' + get: + operationId: getEarningsMetrics + summary: Get Earnings Metrics + description: Gets earnings totals and breakdown metrics for the currently authenticated user. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/EarningsMetricsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/purchase/listing: + post: + operationId: purchaseProductListing + summary: Purchase Product Listing + description: Purchases a product listing + tags: + - economy + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseProductListingRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductPurchaseResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/purchases: + parameters: + - $ref: '#/components/parameters/buyerId' + - $ref: '#/components/parameters/sellerIdQuery' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/mostRecentFlag' + - $ref: '#/components/parameters/sortProductPurchase' + - $ref: '#/components/parameters/orderShort' + get: + operationId: getProductPurchases + summary: Get Product Purchases + description: Gets product purchases + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductPurchaseListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/purchases/{productPurchaseId}: + parameters: + - $ref: '#/components/parameters/productPurchaseId' + get: + operationId: getProductPurchase + summary: Get Product Purchase + description: Gets a single product purchase + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductPurchaseResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/purchases/{productPurchaseId}/stacks: + parameters: + - $ref: '#/components/parameters/productPurchaseId' + get: + operationId: getProductPurchaseStacks + summary: Get Product Purchase Stacks + description: Gets stacks for a product purchase + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductPurchaseStacksResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/seller/eligibility: + get: + operationId: getSellerEligibility + summary: Get Seller Eligibility + description: Get the eligibility of the currently authenticated user to become a seller + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/SellerEligibilityResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/store: + parameters: + - $ref: '#/components/parameters/storeId' + - $ref: '#/components/parameters/hydrateListings' + - $ref: '#/components/parameters/hydrateProducts' + get: + operationId: getStore + summary: Get Store + description: Gets a store + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/StoreResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/store/shelves: + parameters: + - $ref: '#/components/parameters/storeId' + - $ref: '#/components/parameters/hydrateListings' + - $ref: '#/components/parameters/storeView' + get: + operationId: getStoreShelves + summary: Get Store Shelves + description: Gets the shelves for a store + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/StoreShelfListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /economy/stores: + parameters: + - $ref: '#/components/parameters/sellerIdQuery' + - $ref: '#/components/parameters/managementPov' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + get: + operationId: listStores + summary: List Stores + description: Lists stores, optionally filtered to a seller and adjusted for management views. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/StoreListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}: + parameters: + - $ref: '#/components/parameters/favoriteGroupType' + - $ref: '#/components/parameters/favoriteGroupName' + - $ref: '#/components/parameters/userId' + get: + operationId: getFavoriteGroup + summary: Show Favorite Group + description: Fetch information about a specific favorite group. + tags: + - favorites + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoriteGroupResponse' + put: + operationId: updateFavoriteGroup + summary: Update Favorite Group + description: Update information about a specific favorite group. + tags: + - favorites + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateFavoriteGroupRequest' + security: + - authCookie: [] + responses: + '200': + description: OK + delete: + operationId: clearFavoriteGroup + summary: Clear Favorite Group + description: Clear ALL contents of a specific favorite group. + tags: + - favorites + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoriteGroupClearedSuccess' + /favorite/groups: + get: + operationId: getFavoriteGroups + summary: List Favorite Groups + description: Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`. + tags: + - favorites + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/userIdAdmin' + - name: ownerId + description: The owner of whoms favorite groups to return. Must be a UserID. + in: query + schema: + type: string + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoriteGroupListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /favorites: + get: + operationId: getFavorites + summary: List Favorites + description: Returns a list of favorites. + tags: + - favorites + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - name: type + description: The type of favorites to return, FavoriteType. + in: query + schema: + type: string + - $ref: '#/components/parameters/tag' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoriteListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: addFavorite + summary: Add Favorite + description: |- + Add a new favorite. + + Friend groups are named `group_0` through `group_3`. Avatar and World groups are named `avatars1` to `avatars4` and `worlds1` to `worlds4`. + + You cannot add people whom you are not friends with to your friends list. Destroying a friendship removes the person as favorite on both sides. + tags: + - favorites + requestBody: + description: '' + content: + application/json: + examples: + Example Favorite Avatar: + value: + type: avatar + favoriteId: avtr_912d66a4-4714-43b8-8407-7de2cafbf55b + tags: + - avatars1 + Example Favorite Friend: + value: + type: friend + favoriteId: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + tags: + - group_0 + schema: + $ref: '#/components/schemas/AddFavoriteRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoriteResponse' + '400': + $ref: '#/components/responses/FavoriteAddAlreadyFavoritedError' + '403': + $ref: '#/components/responses/FavoriteAddNotFriendsError' + /favorites/{favoriteId}: + parameters: + - $ref: '#/components/parameters/favoriteId' + delete: + operationId: removeFavorite + summary: Remove Favorite + description: Remove a favorite from your favorites list. + tags: + - favorites + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoriteRemovedSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/FavoriteNotFoundError' + /file: + post: + operationId: createFile + summary: Create File + description: Creates a new File object + tags: + - files + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFileRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + /file/image: + post: + operationId: uploadImage + summary: Upload gallery image, icon, emoji or sticker + description: Upload an image, which can be an icon, gallery image, sticker or emoji + tags: + - files + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + animationStyle: + $ref: '#/components/schemas/ImageAnimationStyle' + file: + type: string + description: The binary blob of the png file. + format: binary + frames: + type: integer + description: Required for animated images. Total number of frames of the spritesheet to be animated. + maximum: 64 + minimum: 2 + framesOverTime: + type: integer + description: Required for animated images. Animation frames per second. + maximum: 64 + minimum: 1 + loopStyle: + $ref: '#/components/schemas/ImageLoopStyle' + maskTag: + $ref: '#/components/schemas/ImageMask' + tag: + $ref: '#/components/schemas/ImagePurpose' + required: + - file + - tag + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + /file/{fileId}: + parameters: + - $ref: '#/components/parameters/fileId' + get: + operationId: getFile + summary: Show File + description: Shows general information about the "File" object. Each File can have several "Version"'s, and each Version can have multiple real files or "Data" blobs. + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + '404': + $ref: '#/components/responses/FileNotFoundError' + post: + operationId: createFileVersion + summary: Create File Version + description: Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. + tags: + - files + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFileVersionRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + delete: + operationId: deleteFile + summary: Delete File + description: Deletes a File object. + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + '404': + $ref: '#/components/responses/FileDeletedError' + /file/{fileId}/{versionId}: + parameters: + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/versionId' + get: + operationId: downloadFileVersion + summary: Download File Version + description: |- + 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. + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/RawFileResponse' + '404': + $ref: '#/components/responses/FileNotFoundError' + delete: + operationId: deleteFileVersion + summary: Delete File Version + description: Delete a specific version of a file. You can only delete the latest version. + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + '400': + $ref: '#/components/responses/FileVersionDeleteInitialError' + '500': + $ref: '#/components/responses/FileVersionDeleteMiddleError' + /file/{fileId}/{versionId}/{fileType}/finish: + parameters: + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/versionId' + - $ref: '#/components/parameters/fileType' + put: + operationId: finishFileDataUpload + summary: Finish FileData Upload + description: Finish an upload of a FileData. This will mark it as "complete". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file. + tags: + - files + requestBody: + description: |- + Please see documentation on ETag's: + [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) + + ETag's should NOT be present when uploading a `signature`. + content: + application/json: + examples: + Example Request: + value: + etags: + - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + - yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy + maxParts: '0' + nextPartNumber: '0' + schema: + $ref: '#/components/schemas/FinishFileDataUploadRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + /file/{fileId}/{versionId}/{fileType}/start: + parameters: + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/versionId' + - $ref: '#/components/parameters/fileType' + put: + operationId: startFileDataUpload + summary: Start FileData Upload + description: |- + Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on "PUT Object to S3" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. + + **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. + tags: + - files + parameters: + - name: partNumber + deprecated: true + description: The part number to start uploading. If not provided, the first part will be started. + required: false + in: query + schema: + type: integer + example: 1 + minimum: 0 + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileUploadURLResponse' + '400': + $ref: '#/components/responses/FileUploadAlreadyFinishedError' + /file/{fileId}/{versionId}/{fileType}/status: + parameters: + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/versionId' + - $ref: '#/components/parameters/fileType' + get: + operationId: getFileDataUploadStatus + summary: Check FileData Upload Status + description: Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. + tags: + - files + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileVersionUploadStatusResponse' + /files: + get: + operationId: getFiles + summary: List Files + description: Returns a list of files + tags: + - files + parameters: + - name: tag + description: Tag, for example "icon" or "gallery", not included by default. + in: query + schema: + type: string + minLength: 1 + - name: userId + deprecated: true + description: UserID, will always generate a 500 permission error. + in: query + schema: + type: string + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileListResponse' + /files/order: + put: + operationId: setGroupGalleryFileOrder + summary: Set Group Gallery File Order + description: Set the order of the files in a group gallery + tags: + - files + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GroupGalleryFileOrderRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupGalleryFileOrderResponse' + '404': + $ref: '#/components/responses/FileNotFoundError' + /gallery: + post: + operationId: uploadGalleryImage + summary: Upload gallery image + description: Upload a gallery image + tags: + - files + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + description: The binary blob of the png file. + format: binary + required: + - file + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + /groups: + get: + operationId: searchGroups + summary: Search Group + description: Searches Groups by name or shortCode + tags: + - groups + parameters: + - name: query + description: Query to search for, can be either Group Name or Group shortCode + required: false + in: query + schema: + type: string + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/number' + responses: + '200': + $ref: '#/components/responses/LimitedGroupListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: createGroup + summary: Create Group + description: Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGroupRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /groups/roleTemplates: + get: + operationId: getGroupRoleTemplates + summary: Get Group Role Templates + description: Obtain predefined templates for group roles + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupRoleTemplatesResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /groups/{groupId}: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroup + summary: Get Group by ID + description: Returns a single Group by ID. + tags: + - groups + parameters: + - name: includeRoles + description: Include roles for the Group object. Defaults to false. + required: false + in: query + schema: + type: boolean + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + put: + operationId: updateGroup + summary: Update Group + description: Updates a Group and returns it. + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGroupRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + delete: + operationId: deleteGroup + summary: Delete Group + description: Deletes a Group. + tags: + - groups + parameters: + - name: hardDelete + required: false + in: query + schema: + type: boolean + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteGroupSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/announcement: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupAnnouncements + summary: Get Group Announcement + description: |- + Returns the announcement for a Group. + If no announcement has been made, then it returns **empty object**. + If an announcement exists, then it will always return all fields except `imageId` and `imageUrl` which may be null. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupAnnouncementResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + post: + operationId: createGroupAnnouncement + summary: Create Group Announcement + description: 'Creates an Announcement for a Group. Warning: This will also remove all announcements. To make proper announcements, use the posts endpoint instead' + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGroupAnnouncementRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupAnnouncementResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + delete: + operationId: deleteGroupAnnouncement + summary: Delete Group Announcement + description: Deletes the announcement for a Group. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteGroupAnnouncementSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/auditLogTypes: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupAuditLogEntryTypes + summary: Get Group Audit Log Entry Types + description: Returns a list of audit log entry types for which the group has entries. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupAuditLogEntryTypeListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/auditLogs: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupAuditLogs + summary: Get Group Audit Logs + description: Returns a list of audit logs for a Group. + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + - $ref: '#/components/parameters/actorIds' + - $ref: '#/components/parameters/eventTypes' + - $ref: '#/components/parameters/targetIds' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupAuditLogListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/bans: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupBans + summary: Get Group Bans + description: Returns a list of banned users for a Group. + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + '404': + $ref: '#/components/responses/GroupNotFoundError' + post: + operationId: banGroupMember + summary: Ban Group Member + description: Bans a user from a Group. + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BanGroupMemberRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberResponse' + '400': + $ref: '#/components/responses/BanGroupMemberBadRequestError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/bans/{userId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/userId' + delete: + operationId: unbanGroupMember + summary: Unban Group Member + description: Unbans a user from a Group. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/block: + parameters: + - $ref: '#/components/parameters/groupId' + post: + operationId: blockGroup + summary: Block Group + description: Blocks a Group for the current user. To unblock a group, call kickGroupMember (DELETE /groups/{groupId}/members/{userId}). + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/BlockGroupSuccess' + '400': + $ref: '#/components/responses/BanGroupMemberBadRequestError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupAlreadyBlockedError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/galleries: + parameters: + - $ref: '#/components/parameters/groupId' + post: + operationId: createGroupGallery + summary: Create Group Gallery + description: Creates a gallery for a Group. + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGroupGalleryRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupGalleryResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/galleries/{groupGalleryId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/groupGalleryId' + get: + operationId: getGroupGalleryImages + summary: Get Group Gallery Images + description: Returns a list of images for a Group gallery. + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - name: approved + description: If specified, only returns images that have been approved or not approved. + required: false + in: query + schema: + type: boolean + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupGalleryImageListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + put: + operationId: updateGroupGallery + summary: Update Group Gallery + description: Updates a gallery for a Group. + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGroupGalleryRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupGalleryResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + delete: + operationId: deleteGroupGallery + summary: Delete Group Gallery + description: Deletes a gallery for a Group. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteGroupGallerySuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/galleries/{groupGalleryId}/images: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/groupGalleryId' + post: + operationId: addGroupGalleryImage + summary: Add Group Gallery Image + description: Adds an image to a Group gallery. + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddGroupGalleryImageRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupGalleryImageResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/groupGalleryId' + - $ref: '#/components/parameters/groupGalleryImageId' + delete: + operationId: deleteGroupGalleryImage + summary: Delete Group Gallery Image + description: Deletes an image from a Group gallery. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteGroupGalleryImageSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupGalleryImageDeleteForbiddenError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/instances: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupInstances + summary: Get Group Instances + description: Returns a list of group instances + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupInstanceListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/invites: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupInvites + summary: Get Group Invites Sent + description: Returns a list of members that have been invited to the Group. + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupNotMemberError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + put: + operationId: declineGroupInvite + summary: Decline Invite from Group + description: Declines an invite to the user from a group. + tags: + - groups + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/DeclineGroupInviteRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeclineGroupInviteSuccess' + '400': + $ref: '#/components/responses/DeclineGroupInviteBadRequestError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + post: + operationId: createGroupInvite + summary: Invite User to Group + description: Sends an invite to a user to join the group. + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGroupInviteRequest' + security: + - authCookie: [] + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/GroupInviteBadRequestError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupInviteForbiddenError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/invites/{userId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/userId' + delete: + operationId: deleteGroupInvite + summary: Delete User Invite + description: Deletes an Group invite sent to a User + tags: + - groups + security: + - authCookie: [] + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/DeleteGroupInviteBadRequestError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /groups/{groupId}/join: + parameters: + - $ref: '#/components/parameters/groupId' + post: + operationId: joinGroup + summary: Join Group + description: Join a Group by ID and returns the member object. + tags: + - groups + parameters: + - name: confirmOverrideBlock + description: Manually override the failure that would occur if the user has blocked the group. + required: false + in: query + schema: + type: boolean + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/JoinGroupRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberResponse' + '400': + $ref: '#/components/responses/GroupAlreadyMemberError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/leave: + parameters: + - $ref: '#/components/parameters/groupId' + post: + operationId: leaveGroup + summary: Leave Group + description: Leave a group by ID. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + description: OK + '403': + $ref: '#/components/responses/GroupNotMemberError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/members: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupMembers + summary: List Group Members + description: |- + Returns a List of all **other** Group Members. This endpoint will never return the user calling the endpoint. + Information about the user calling the endpoint must be found in the `myMember` field of the Group object. + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/groupMemberSort' + - $ref: '#/components/parameters/groupMemberRoleFilter' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberListResponse' + '400': + $ref: '#/components/responses/UsersInvalidSearchError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/members/search: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: searchGroupMembers + summary: Search Group Members + description: Search for members in the group by displayName. + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - name: query + description: Filter for member displayName. + required: true + in: query + schema: + type: string + minLength: 3 + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberSearchResponse' + '400': + $ref: '#/components/responses/UsersInvalidSearchError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/members/{userId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/userId' + get: + operationId: getGroupMember + summary: Get Group Member + description: Returns a GroupMember. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupNotMemberError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + put: + operationId: updateGroupMember + summary: Update Group Member + description: Updates a Group Member + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGroupMemberRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + delete: + operationId: kickGroupMember + summary: Kick Group Member + description: Kicks a Group Member from the Group. The current user must have the "Remove Group Members" permission. Also used for unblocking groups. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteGroupMemberSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupNotMemberError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/members/{userId}/roles/{groupRoleId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/groupRoleId' + put: + operationId: addGroupMemberRole + summary: Add Role to GroupMember + description: Adds a Role to a Group Member + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupRoleIDListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + delete: + operationId: removeGroupMemberRole + summary: Remove Role from GroupMember + description: Removes a Role from a Group Member + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupRoleIDListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/permissions: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupPermissions + summary: List Group Permissions + description: Returns a List of all possible/available permissions for a Group. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupPermissionListResponse' + '400': + $ref: '#/components/responses/UsersInvalidSearchError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/posts: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupPosts + summary: Get posts from a Group + description: Get posts from a Group + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - name: publicOnly + description: See public posts only. + in: query + schema: + type: boolean + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupPostsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: addGroupPost + summary: Create a post in a Group + description: Create a post in a Group. + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGroupPostRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupPostResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /groups/{groupId}/posts/{notificationId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/notificationId' + put: + operationId: updateGroupPost + summary: Edits a Group post + description: Edits a Group post + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGroupPostRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupPostResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupPostResponseSuccess' + delete: + operationId: deleteGroupPost + summary: Delete a Group post + description: Delete a Group post + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupPostResponseSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupPostResponseSuccess' + /groups/{groupId}/representation: + parameters: + - $ref: '#/components/parameters/groupId' + put: + operationId: updateGroupRepresentation + summary: Update Group Representation + description: |- + Updates whether the user is representing the group. + + When `isRepresenting` is set to `true`, this flag will be set to `false` for all other groups + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + isRepresenting: + type: boolean + description: Whether the user is representing the group. + required: + - isRepresenting + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UpdateGroupRepresentationSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupNotMemberError' + /groups/{groupId}/requests: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupRequests + summary: Get Group Join Requests + description: Returns a list of members that have requested to join the Group. + tags: + - groups + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - name: blocked + description: See blocked join requests + in: query + schema: + type: boolean + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupMemberListResponse' + '400': + $ref: '#/components/responses/GroupJoinRequestResponseBadRequestError' + '403': + $ref: '#/components/responses/GroupNotMemberError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + delete: + operationId: cancelGroupRequest + summary: Cancel Group Join Request + description: Cancels a request sent to join the group. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + description: OK + '400': + description: You can't cancel a join request if you didn't request to join․ + '403': + $ref: '#/components/responses/GroupNotMemberError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/requests/{userId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/userId' + put: + operationId: respondGroupJoinRequest + summary: Respond Group Join request + description: Responds to a Group Join Request with Accept/Deny + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RespondGroupJoinRequest' + security: + - authCookie: [] + responses: + '200': + description: OK + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/roles: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupRoles + summary: Get Group Roles + description: Returns a Group Role by ID. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupRoleListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + post: + operationId: createGroupRole + summary: Create GroupRole + description: Create a Group role. + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateGroupRoleRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupRoleResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /groups/{groupId}/roles/{groupRoleId}: + parameters: + - $ref: '#/components/parameters/groupId' + - $ref: '#/components/parameters/groupRoleId' + put: + operationId: updateGroupRole + summary: Update Group Role + description: Updates a group role by ID. + tags: + - groups + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateGroupRoleRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupRoleListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + delete: + operationId: deleteGroupRole + summary: Delete Group Role + description: Deletes a Group Role by ID and returns the remaining roles. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupRoleListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotMemberError' + /groups/{groupId}/transfer: + parameters: + - $ref: '#/components/parameters/groupId' + get: + operationId: getGroupTransferability + summary: Get Group Transferability + description: Returns the transferability of the group to a given user. + tags: + - groups + parameters: + - name: transferTargetId + description: The UserID of the prospective transferee. + required: false + in: query + schema: + $ref: '#/components/schemas/UserID' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupTransferableResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupNotMemberError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + post: + operationId: initiateOrAcceptGroupTransfer + summary: Initiate or Accept Group Transfer + description: 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. + tags: + - groups + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/TransferGroupRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupTransferSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/GroupTransferInvalidError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + delete: + operationId: cancelGroupTransfer + summary: Cancel Group Transfer + description: Cancel a Group Transfer. + tags: + - groups + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupTransferCanceledSuccess' + '400': + $ref: '#/components/responses/NoGroupTransferError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/GroupNotFoundError' + /health: + get: + operationId: getHealth + deprecated: true + summary: Check API Health + description: |- + ~~Gets the overall health status, the server name, and the current build version tag of the API.~~ + + **DEPRECATED:** VRChat has suddenly restricted this endpoint for unknown reasons, and now always return 401 Unauthorized. + tags: + - miscellaneous + security: [] + responses: + '200': + $ref: '#/components/responses/APIHealthResponse' + /icon: + post: + operationId: uploadIcon + summary: Upload icon + description: Upload an icon + tags: + - files + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + description: The binary blob of the png file. + format: binary + required: + - file + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FileResponse' + /infoPush: + get: + operationId: getInfoPush + summary: Show Information Notices + description: |- + IPS (Info Push System) is a system for VRChat to push out dynamic information to the client. This is primarily used by the Quick-Menu info banners, but can also be used to e.g. alert you to update your game to the latest version. + + `include` is used to query what Information Pushes should be included in the response. If include is missing or empty, then no notices will normally be returned. This is an "any of" search. + + `require` is used to limit what Information Pushes should be included in the response. This is usually used in combination with `include`, and is an "all of" search. + tags: + - miscellaneous + parameters: + - $ref: '#/components/parameters/require' + - $ref: '#/components/parameters/include' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InfoPushListResponse' + x-badges: + - color: gold + label: 'Status: Early Access (Still Under Development)' + /instances: + post: + operationId: createInstance + summary: Create Instance + description: Create an instance + tags: + - instances + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateInstanceRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InstanceResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /instances/recent: + get: + operationId: getRecentLocations + summary: List Recent Locations + description: Returns a list of recently visited locations. + tags: + - instances + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LocationIDListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /instances/s/{shortName}: + parameters: + - name: shortName + description: Must be a valid instance short name. + required: true + in: path + schema: + type: string + get: + operationId: getInstanceByShortName + summary: Get Instance By Short Name + description: Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. + tags: + - instances + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InstanceResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/InstanceNotFoundError' + /instances/{worldId}:{instanceId}: + parameters: + - $ref: '#/components/parameters/worldId' + - $ref: '#/components/parameters/instanceId' + get: + operationId: getInstance + summary: Get Instance + description: |- + Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. + + If an invalid instanceId is provided, this endpoint will simply return "null"! + tags: + - instances + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InstanceResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + delete: + operationId: closeInstance + summary: Close Instance + description: |- + Close an instance or update the closedAt time when it will be closed. + + You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-manage` permission. + tags: + - instances + parameters: + - name: hardClose + description: Whether to hard close the instance. Defaults to false. + required: false + in: query + schema: + type: boolean + - name: closedAt + description: |- + The time after which users won't be allowed to join the instances. + If omitted, the instance will be closed immediately. + in: query + schema: + type: string + format: date-time + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InstanceResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/InstanceCloseForbiddenError' + '404': + $ref: '#/components/responses/InstanceNotFoundError' + /instances/{worldId}:{instanceId}/shortName: + parameters: + - $ref: '#/components/parameters/worldId' + - $ref: '#/components/parameters/instanceId' + get: + operationId: getShortName + summary: Get Instance Short Name + description: Returns an instance short name. + tags: + - instances + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InstanceShortNameResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory: + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/inventoryHolderId' + - $ref: '#/components/parameters/inventoryEquipSlot' + - $ref: '#/components/parameters/inventorySortOrder' + - $ref: '#/components/parameters/inventoryItemTags' + - $ref: '#/components/parameters/inventoryItemTypes' + - $ref: '#/components/parameters/inventoryItemFlags' + - $ref: '#/components/parameters/inventoryItemNotTypes' + - $ref: '#/components/parameters/inventoryItemNotFlags' + - $ref: '#/components/parameters/inventoryItemArchived' + get: + operationId: getInventory + summary: Get Inventory + description: Returns an Inventory object. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + /inventory/cloning/direct: + parameters: + - $ref: '#/components/parameters/inventoryPedestalItemId' + - $ref: '#/components/parameters/inventoryPedestalDuration' + post: + operationId: shareInventoryItemDirect + summary: Share Inventory Item Direct + description: Share content directly with other users. + tags: + - inventory + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ShareInventoryItemDirectRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryShareResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/cloning/pedestal: + parameters: + - $ref: '#/components/parameters/inventoryPedestalItemId' + - $ref: '#/components/parameters/inventoryPedestalDuration' + get: + operationId: shareInventoryItemPedestal + summary: Share Inventory Item by Pedestal + description: Returns an InventorySpawn object. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventorySpawnResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/collections: + get: + operationId: getInventoryCollections + summary: List Inventory Collections + description: Returns a list of collection names. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryCollectionsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/drops: + parameters: + - $ref: '#/components/parameters/active' + get: + operationId: getInventoryDrops + summary: List Inventory Drops + description: Returns a list of InventoryDrop objects. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryDropListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/spawn: + parameters: + - $ref: '#/components/parameters/inventorySpawnItemId' + get: + operationId: spawnInventoryItem + summary: Spawn Inventory Item + description: Returns an InventorySpawn object. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventorySpawnResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/template/{inventoryTemplateId}: + parameters: + - $ref: '#/components/parameters/inventoryTemplateId' + get: + operationId: getInventoryTemplate + summary: Get Inventory Template + description: Returns an InventoryTemplate object. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryTemplateResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/{inventoryItemId}: + parameters: + - $ref: '#/components/parameters/inventoryItemId' + get: + operationId: getOwnInventoryItem + summary: Get Own Inventory Item + description: Returns an InventoryItem object held by the currently logged in user. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryItemResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + put: + operationId: updateOwnInventoryItem + summary: Update Own Inventory Item + description: Returns the modified InventoryItem object as held by the currently logged in user. + tags: + - inventory + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateInventoryItemRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryItemResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + delete: + operationId: deleteOwnInventoryItem + summary: Delete Own Inventory Item + description: Deletes an InventoryItem from the inventory of the currently logged in user. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteInventoryItemResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/{inventoryItemId}/consume: + parameters: + - $ref: '#/components/parameters/inventoryItemId' + put: + operationId: consumeOwnInventoryItem + summary: Consume Own Inventory Item + description: Returns the modified InventoryItem object as held by the currently logged in user. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ConsumeInventoryItemResponse' + '400': + $ref: '#/components/responses/InventoryItemNotConsumable' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /inventory/{inventoryItemId}/equip: + delete: + operationId: unequipOwnInventorySlot + summary: Unequip Own Inventory Slot + description: Unequips the InventoryItem in the given slot of the inventory of the currently logged in user. + tags: + - inventory + parameters: + - $ref: '#/components/parameters/inventoryItemSlotAsId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UnequipInventorySlotResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + put: + operationId: equipOwnInventoryItem + summary: Equip Own Inventory Item + description: Returns the modified InventoryItem object as held by the currently logged in user. + tags: + - inventory + parameters: + - $ref: '#/components/parameters/inventoryItemId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EquipInventoryItemRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryItemResponse' + '400': + $ref: '#/components/responses/InventoryItemNotEquippable' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /invite/myself/to/{worldId}:{instanceId}: + parameters: + - $ref: '#/components/parameters/worldId' + - $ref: '#/components/parameters/instanceId' + post: + operationId: inviteMyselfTo + summary: Invite Myself To Instance + description: Sends self an invite to an instance + tags: + - invite + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/SendNotificationResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/InstanceNotFoundError' + /invite/{notificationId}/response: + parameters: + - $ref: '#/components/parameters/notificationId' + post: + operationId: respondInvite + summary: Respond Invite + description: |- + Respond to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. + + In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. + In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead. + tags: + - invite + requestBody: + description: Slot number of the Response Message to use when responding to a user. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InviteResponse' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '400': + $ref: '#/components/responses/InviteResponse400Error' + /invite/{notificationId}/response/photo: + parameters: + - $ref: '#/components/parameters/notificationId' + post: + operationId: respondInviteWithPhoto + summary: Respond Invite with photo + description: |- + Respond with photo to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. + + In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. + In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead.' + tags: + - invite + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/InviteResponse' + image: + type: string + description: The binary blob of the png file. + format: binary + required: + - data + - image + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '400': + $ref: '#/components/responses/InviteResponse400Error' + /invite/{userId}: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: inviteUser + summary: Invite User + description: Sends an invite to a user. Returns the Notification of type `invite` that was sent. + tags: + - invite + requestBody: + description: Slot number of the Invite Message to use when inviting a user. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InviteRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/SendNotificationResponse' + '403': + $ref: '#/components/responses/InviteMustBeFriendsError' + /invite/{userId}/photo: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: inviteUserWithPhoto + summary: Invite User with photo + description: Sends an photo invite to a user. Returns the Notification of type `invite` that was sent. + tags: + - invite + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/InviteRequest' + image: + type: string + description: The binary blob of the png file. + format: binary + required: + - data + - image + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/SendNotificationResponse' + '403': + $ref: '#/components/responses/InviteMustBeFriendsError' + /jams: + get: + operationId: getJams + summary: Show jams list + description: |- + Lists World Jams or Avatar Jams, both currently running and ones that have ended. + + `isActive` is used to select only active or already ended jams. + + `type` is used to select only world or avatar jams, and can only take `world` or `avatar`. + `` + tags: + - jams + parameters: + - name: type + description: Only show jams of this type (`avatar` or `world`). + in: query + schema: + type: string + example: avatar + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/JamListResponse' + /jams/{jamId}: + parameters: + - $ref: '#/components/parameters/jamId' + get: + operationId: getJam + summary: Show jam information + description: Returns a jam. + tags: + - jams + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/JamResponse' + '404': + $ref: '#/components/responses/JamNotFoundError' + /jams/{jamId}/submissions: + parameters: + - $ref: '#/components/parameters/jamId' + get: + operationId: getJamSubmissions + summary: Show jam submissions + description: Returns all submissions of a jam. Can filter by contentId (for world or avatar jams) or submitterId (for a participant). + tags: + - jams + parameters: + - $ref: '#/components/parameters/contentId' + - $ref: '#/components/parameters/submitterId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/JamSubmissionListResponse' + '404': + $ref: '#/components/responses/JamNotFoundError' + post: + operationId: submitJamContent + summary: Submit Jam Content + description: Submits content to a jam. The content must have been uploaded by the submitter, and both the content upload and jam submission must be made within the jam's designated times. + tags: + - jams + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateJamSubmissionRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/JamSubmissionResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/JamNotFoundError' + /jams/{jamId}/submissions/{jamSubmissionId}: + parameters: + - $ref: '#/components/parameters/jamId' + - $ref: '#/components/parameters/jamSubmissionId' + delete: + operationId: deleteJamSubmission + summary: Delete Jam Submission + description: Withdraws a content submission from a jam. + tags: + - jams + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteJamSubmissionResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + '404': + $ref: '#/components/responses/JamNotFoundError' + /js/app.js: + get: + operationId: getJavaScript + summary: Download JavaScript + description: Fetches the JavaScript code to the frontend React website. + tags: + - miscellaneous + parameters: + - $ref: '#/components/parameters/variant' + - $ref: '#/components/parameters/branch' + responses: + '200': + description: '**Note:** VRChat uses 302 Redirect to Cloudfront. The implementing library **must** support and follow redirects natively.' + content: + application/javascript: + schema: + type: string + '400': + $ref: '#/components/responses/DownloadSourceCodeAccessError' + /licenseGroups/{licenseGroupId}: + parameters: + - $ref: '#/components/parameters/licenseGroupId' + get: + operationId: getLicenseGroup + summary: Get License Group + description: Get a single License Group by given ID. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LicenseGroupResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /listing: + post: + operationId: createProductListingDirect + summary: Create Product Listing + description: Creates a listing and returns the new ProductListing object. The request body is based on observed fields and may be incomplete. + tags: + - economy + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateListingRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductListingResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /listing/{productId}: + parameters: + - $ref: '#/components/parameters/productId' + - $ref: '#/components/parameters/hydrate' + get: + operationId: getProductListing + summary: Get Product Listing + description: Gets a product listing + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductListingResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + put: + operationId: updateProductListingDirect + summary: Update Product Listing + description: Updates the active state of a listing. Setting `active` to `true` publishes the listing, while `false` unpublishes it. + tags: + - economy + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateListingRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductListingResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + delete: + operationId: deleteProductListingDirect + summary: Delete Product Listing + description: Deletes a listing. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteProductListingResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /logout: + put: + operationId: logout + summary: Logout + description: Invalidates the login session. + tags: + - authentication + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LogoutSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /message/{userId}/{messageType}: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/messageType' + get: + operationId: getInviteMessages + summary: List Invite Messages + description: |- + Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users! + + Message type refers to a different collection of messages, used during different types of responses. + + * `message` = Message during a normal invite + * `response` = Message when replying to a message + * `request` = Message when requesting an invite + * `requestResponse` = Message when replying to a request for invite + tags: + - invite + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InviteMessageListResponse' + '400': + $ref: '#/components/responses/InviteMessageInvalidSlotNumberError' + '401': + $ref: '#/components/responses/NotAuthorizedActionError' + /message/{userId}/{messageType}/{slot}: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/messageType' + - $ref: '#/components/parameters/slot' + get: + operationId: getInviteMessage + summary: Get Invite Message + description: |- + Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! + + Message type refers to a different collection of messages, used during different types of responses. + + * `message` = Message during a normal invite + * `response` = Message when replying to a message + * `request` = Message when requesting an invite + * `requestResponse` = Message when replying to a request for invite + tags: + - invite + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InviteMessageResponse' + '400': + $ref: '#/components/responses/InviteMessageGetNegativeSlotError' + '401': + $ref: '#/components/responses/NotAuthorizedActionError' + '404': + $ref: '#/components/responses/InviteMessageGetTooHighSlotError' + put: + operationId: updateInviteMessage + summary: Update Invite Message + description: |- + Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! + + Updating a message automatically sets the cooldown timer to 60 minutes. + Trying to edit a message before the cooldown timer expires results in a 429 "Too Fast Error". + + Message type refers to a different collection of messages, used during different types of responses. + + * `message` = Message during a normal invite + * `response` = Message when replying to a message + * `request` = Message when requesting an invite + * `requestResponse` = Message when replying to a request for invite + tags: + - invite + requestBody: + description: Message of what to set the invite message to. + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateInviteMessageRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InviteMessageListResponse' + '400': + $ref: '#/components/responses/InviteMessageInvalidSlotNumberError' + '401': + $ref: '#/components/responses/NotAuthorizedActionError' + '429': + $ref: '#/components/responses/InviteMessageUpdateRateLimitError' + delete: + operationId: resetInviteMessage + summary: Reset Invite Message + description: |- + Resets a single Invite Message back to its original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! + + Resetting a message respects the rate-limit, so it is not possible to reset within the 60 minutes countdown. + Resetting it does however not set the rate-limit to 60 like when editing it. + It is possible to edit it right after resetting it. + Trying to edit a message before the cooldown timer expires results in a 429 "Too Fast Error". + + Message type refers to a different collection of messages, used during different types of responses. + + * `message` = Message during a normal invite + * `response` = Message when replying to a message + * `request` = Message when requesting an invite + * `requestResponse` = Message when replying to a request for invite + + The DELETE endpoint does not have/require any request body. + tags: + - invite + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InviteMessageListResponse' + '400': + $ref: '#/components/responses/InviteMessageInvalidSlotNumberError' + '401': + $ref: '#/components/responses/NotAuthorizedActionError' + '404': + $ref: '#/components/responses/InviteMessageNoEntryForSlotError' + '429': + $ref: '#/components/responses/InviteMessageUpdateRateLimitError' + /moderationReports: + get: + operationId: getModerationReports + summary: Get Moderation Reports + description: Get submitted moderation reports + tags: + - authentication + parameters: + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/moderationReportingUserId' + - $ref: '#/components/parameters/moderationReportStatus' + - $ref: '#/components/parameters/moderationReportType' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ModerationReportListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/InvalidAdminCredentialsError' + post: + operationId: submitModerationReport + summary: Submit Moderation Report + description: Submit a moderation report + tags: + - authentication + requestBody: + required: true + content: + application/json: + examples: {} + schema: + $ref: '#/components/schemas/SubmitModerationReportRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ModerationReportResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /moderationReports/{moderationReportId}: + delete: + operationId: deleteModerationReport + summary: Delete Moderation Report + description: Delete a moderation report + tags: + - authentication + parameters: + - $ref: '#/components/parameters/moderationReportId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteModerationReportResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/InvalidAdminCredentialsError' + /notifications: + delete: + operationId: deleteAllNotificationV2s + summary: Delete All NotificationV2s + description: Delete all of the current user's notifications. + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ClearNotificationsV2Success' + '401': + $ref: '#/components/responses/MissingCredentialsError' + get: + operationId: getNotificationV2s + summary: List NotificationV2s + description: Retrieve all of the current user's notifications. + tags: + - notifications + parameters: + - $ref: '#/components/parameters/limit' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationV2ListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /notifications/{notificationId}: + parameters: + - $ref: '#/components/parameters/notificationId' + get: + operationId: getNotificationV2 + deprecated: true + summary: Get NotificationV2 + description: Get a specific notification. Appears to require admin credentials by default. Expect a 403 Forbidden error response for normal users. + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationV2Response' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/InvalidAdminCredentialsError' + '404': + $ref: '#/components/responses/NotificationNotFoundError' + delete: + operationId: deleteNotificationV2 + summary: Delete NotificationV2 + description: Delete a specific notification + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ClearNotificationV2Success' + '400': + $ref: '#/components/responses/NotificationOperationError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/NotificationNotFoundError' + /notifications/{notificationId}/reply: + parameters: + - $ref: '#/components/parameters/notificationId' + post: + operationId: replyNotificationV2 + summary: Reply NotificationV2 + description: Reply to a specific notification + tags: + - notifications + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ReplyNotificationV2Request' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationV2Response' + '400': + $ref: '#/components/responses/NotificationOperationError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/NotificationNotFoundError' + /notifications/{notificationId}/respond: + parameters: + - $ref: '#/components/parameters/notificationId' + post: + operationId: respondNotificationV2 + summary: Respond NotificationV2 + description: Respond to a specific notification + tags: + - notifications + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RespondNotificationV2Request' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationV2Response' + '400': + $ref: '#/components/responses/NotificationOperationError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/NotificationNotFoundError' + /notifications/{notificationId}/see: + parameters: + - $ref: '#/components/parameters/notificationId' + post: + operationId: acknowledgeNotificationV2 + summary: Acknowledge NotificationV2 + description: Acknowledge a specific notification + tags: + - notifications + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationV2Response' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/NotificationNotFoundError' + /permissions/{permissionId}: + parameters: + - $ref: '#/components/parameters/permissionId' + get: + operationId: getPermission + summary: Get Permission + description: Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. + tags: + - miscellaneous + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PermissionResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /prints: + post: + operationId: uploadPrint + summary: Upload Print + description: Uploads and creates a print. + tags: + - prints + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + image: + type: string + description: The binary blob of the png file. + format: binary + note: + type: string + description: The caption for the image. + timestamp: + type: string + description: The time the image was captured. + format: date-time + worldId: + type: string + description: The id of the world in which the image was captured. + worldName: + type: string + description: The name of the world in which the image was captured. + required: + - image + - timestamp + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PrintResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /prints/user/{userId}: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserPrints + summary: Get Own Prints + description: Returns a list of all prints of the user. User id has to be your own userId, as you can't request other user's prints. + tags: + - prints + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PrintListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/UnableToRequestOtherUsersPrintsError' + /prints/{printId}: + parameters: + - $ref: '#/components/parameters/printId' + get: + operationId: getPrint + summary: Get Print + description: Returns a print. + tags: + - prints + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PrintResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: editPrint + summary: Edit Print + description: Edits a print. + tags: + - prints + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + image: + type: string + description: The binary blob of the png file. + format: binary + note: + type: string + description: The caption for the image. + required: + - image + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PrintResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + delete: + operationId: deletePrint + summary: Delete Print + description: Returns a print. + tags: + - prints + security: + - authCookie: [] + responses: + '200': + description: Empty response if successful + '401': + $ref: '#/components/responses/MissingCredentialsError' + /products: + post: + operationId: createProduct + summary: Create Product + description: Creates a product and returns the new Product object. + tags: + - economy + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProductRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /products/{productId}: + parameters: + - $ref: '#/components/parameters/productId' + get: + operationId: getProductListingAlternate + deprecated: true + summary: Get Product Listing (alternate) + description: Gets a product listing + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductListingResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + put: + operationId: updateProduct + summary: Update Product + description: Updates a product and returns the updated Product object. + tags: + - economy + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateProductRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + delete: + operationId: deleteProduct + summary: Delete Product + description: Deletes a product. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteProductResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /props: + get: + operationId: listProps + summary: List Props + description: Returns a list Prop objects. + tags: + - props + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/authorId' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PropListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + post: + operationId: createProp + summary: Create Prop + description: Create a Prop and return the new Prop object. + tags: + - props + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePropRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PropResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + /props/{propId}: + parameters: + - $ref: '#/components/parameters/propId' + get: + operationId: getProp + summary: Get Prop + description: Returns a Prop object. + tags: + - props + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PropResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/NoSuchPropError' + put: + operationId: updateProp + summary: Update Prop + description: Updates a Prop and returns the updated Prop object. When updating the asset bundle, all of `name`, `assetUrl`, `platform`, `unityVersion`, `assetVersion`, `spawnType`, and `worldPlacementMask` must be present, as well as `propSignature` if this value is not blank. + tags: + - props + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePropRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PropResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + '404': + $ref: '#/components/responses/NoSuchPropError' + delete: + operationId: deleteProp + summary: Delete Prop + description: Delete a Prop. + tags: + - props + security: + - authCookie: [] + responses: + '200': + description: The Prop is successfully deleted. + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + '404': + $ref: '#/components/responses/NoSuchPropError' + /props/{propId}/publish: + parameters: + - $ref: '#/components/parameters/propId' + get: + operationId: getPropPublishStatus + summary: Get Prop Publish Status + description: Returns a PropPublishStatus object. + tags: + - props + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PropPublishStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + '404': + $ref: '#/components/responses/NoSuchPropError' + put: + operationId: publishProp + summary: Publish Prop + description: Publish a Prop and return the updated PropPublishStatus object. + tags: + - props + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PropPublishStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + '404': + $ref: '#/components/responses/NoSuchPropError' + delete: + operationId: unpublishProp + summary: Unpublish Prop + description: Unpublish a Prop and return the updated PropPublishStatus object. + tags: + - props + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/PropPublishStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/NoPermission' + '404': + $ref: '#/components/responses/NoSuchPropError' + /requestInvite/{userId}: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: requestInvite + summary: Request Invite + description: Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. + tags: + - invite + requestBody: + description: Slot number of the Request Message to use when request an invite. + content: + application/json: + schema: + $ref: '#/components/schemas/RequestInviteRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '403': + $ref: '#/components/responses/InviteMustBeFriendsError' + /requestInvite/{userId}/photo: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: requestInviteWithPhoto + summary: Request Invite with photo + description: Requests with photo an invite from a user. Returns the Notification of type `requestInvite` that was sent. + tags: + - invite + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + data: + $ref: '#/components/schemas/RequestInviteRequest' + image: + type: string + description: The binary blob of the png file. + format: binary + required: + - data + - image + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '403': + $ref: '#/components/responses/InviteMustBeFriendsError' + /reward/redeem: + post: + operationId: redeemReward + summary: Redeem Reward + description: Redeem a reward for the currently logged in user. + tags: + - inventory + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RewardRedemptionRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/RewardRedemptionResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /subscriptions: + get: + operationId: getSubscriptions + summary: List Subscriptions + description: List all existing Subscriptions. For example, "vrchatplus-monthly" and "vrchatplus-yearly". + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/SubscriptionListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /tilia/status: + get: + operationId: getTiliaStatus + summary: Get Tilia Status + description: Gets the status of Tilia integration + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/TiliaStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /time: + get: + operationId: getSystemTime + summary: Current System Time + description: |- + Returns the current time of the API server. + + **NOTE:** The response type is not a JSON object, but a simple JSON string. + tags: + - miscellaneous + security: [] + responses: + '200': + $ref: '#/components/responses/SystemTimeResponse' + /tokenBundles: + get: + operationId: getTokenBundles + summary: List Token Bundles + description: Gets the list of token bundles + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/TokenBundleListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/bulk/gift/purchases: + parameters: + - $ref: '#/components/parameters/mostRecentFlag' + get: + operationId: getBulkGiftPurchases + summary: Get Bulk Gift Purchases + description: Get bulk gift purchases made by the user. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/BulkPurchasesListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/subscription/recent: + get: + operationId: getRecentSubscription + summary: Get Recent Subscription + description: Get the most recent user subscription. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserSubscriptionResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/balance: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getBalance + summary: Get Balance + description: Gets the balance of a user + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/BalanceResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/balance/earnings: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getBalanceEarnings + summary: Get Balance Earnings + description: Gets the balance of a user from earnings + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/BalanceResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/economy/account: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getEconomyAccount + summary: Get Economy Account + description: Gets the economy account of a user + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/EconomyAccountResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/economy/balances: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getEconomyBalances + summary: Get Economy Balances + description: Gets the combined balances for a user. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/EconomyBalancesResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/economy/payouts/list: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getEconomyPayouts + summary: Get Economy Payouts + description: Gets the payout history for a user. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/EconomyPayoutListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/economy/payouts/status: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getEconomyPayoutStatus + summary: Get Economy Payout Status + description: Gets the current payout status and eligibility information for a user. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/EconomyPayoutStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/economy/transactions: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/dateMin' + - $ref: '#/components/parameters/dateMax' + - $ref: '#/components/parameters/fromUserId' + - $ref: '#/components/parameters/toUserId' + - $ref: '#/components/parameters/sortProductPurchase' + - $ref: '#/components/parameters/orderShort' + get: + operationId: getProductPurchaseHistory + summary: Get Product Purchase History + description: Gets a history of product purchases + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductPurchaseHistoryResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/friendRequest: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: friend + summary: Send Friend Request + description: Send a friend request to another user. + tags: + - friends + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/NotificationResponse' + '400': + $ref: '#/components/responses/FriendBadRequestError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/UserDoesntExistError' + delete: + operationId: deleteFriendRequest + summary: Delete Friend Request + description: Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. + tags: + - friends + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteFriendSuccess' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/DeleteFriendRequestError' + /user/{userId}/friendStatus: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getFriendStatus + summary: Check Friend Status + description: Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification. + tags: + - friends + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FriendStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/inventory/{inventoryItemId}: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/inventoryItemId' + get: + operationId: getUserInventoryItem + summary: Get User Inventory Item + description: Returns an InventoryItem object held by the given user. + tags: + - inventory + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InventoryItemResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/listings: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/hydrate' + - $ref: '#/components/parameters/listingTypeFilter' + - $ref: '#/components/parameters/groupIdFilter' + - $ref: '#/components/parameters/active' + get: + operationId: getProductListings + summary: Get User Product Listings + description: Gets the product listings of a given user + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductListingListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/products: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + get: + operationId: listUserProducts + summary: List User Products + description: Gets the products of a given user. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/ProductListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/tilia/kyc: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserTiliaKyc + summary: Get User Tilia KYC + description: Gets KYC status details for a user's Tilia account. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/TiliaKycResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /user/{userId}/tilia/tos: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getTiliaTos + summary: Get Tilia TOS Agreement Status + description: Gets the status of the agreement of a user to the Tilia TOS + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/TiliaTOSResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + put: + operationId: updateTiliaTos + summary: Update Tilia TOS Agreement Status + description: Updates the status of the agreement of a user to the Tilia TOS + tags: + - economy + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTiliaTOSRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UpdateTiliaTOSResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /userNotes: + get: + operationId: getUserNotes + summary: Get User Notes + description: Get recently updated user notes + tags: + - users + parameters: + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserNoteListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: updateUserNote + summary: Update User Note + description: Updates the currently authenticated user's note on a user + tags: + - users + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUserNoteRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserNoteResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /userNotes/{userNoteId}: + parameters: + - $ref: '#/components/parameters/userNoteId' + get: + operationId: getUserNote + summary: Get User Note + description: Get a particular user note + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserNoteResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users: + get: + operationId: searchUsers + summary: Search All Users + description: Search and list any users by text query + tags: + - users + parameters: + - name: search + description: Searches by `displayName`. Will return empty array if search query is empty or missing. + in: query + schema: + type: string + minLength: 0 + - name: developerType + description: Active user by developer type, none for normal users and internal for moderators + in: query + schema: + type: string + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/isInternalVariant' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LimitedUserSearchListResponse' + '400': + $ref: '#/components/responses/UsersInvalidSearchError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUser + summary: Get User by ID + description: Get public user information about a specific user using their ID. + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + put: + operationId: updateUser + summary: Update User Info + description: Update a users information such as the email and birthday. + tags: + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUserRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CurrentUserResponse' + '400': + $ref: '#/components/responses/CurrentPasswordRequiredError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/addTags: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: addTags + summary: Add User Tags + description: Adds tags to the user's profile + tags: + - users + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ChangeUserTagsRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CurrentUserResponse' + '400': + $ref: '#/components/responses/UserTagInvalidError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/avatar: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getOwnAvatar + summary: Get Own Avatar + description: Get the current avatar for the user. This will return an error for any other user than the one logged in. + tags: + - avatars + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/AvatarResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/AvatarSeeOtherUserCurrentAvatarError' + /users/{userId}/badges/{badgeId}: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/badgeId' + put: + operationId: updateBadge + summary: Update User Badge + description: Updates a user's badge + tags: + - users + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUserBadgeRequest' + security: + - authCookie: [] + responses: + '200': + description: The user's badge is updated. + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/UserMustBeOwnError' + '404': + description: The user does not have the badge. + /users/{userId}/boop: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: boop + summary: Send Boop + description: Send a boop to another user. + tags: + - friends + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/BoopRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/BoopSuccess' + '400': + $ref: '#/components/responses/NotFriendsError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/UserDoesntExistError' + /users/{userId}/credits/eligible: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/subscriptionId' + get: + operationId: getUserCreditsEligible + summary: Get User Credits Eligiblity + description: Get the user's eligibility status for subscriptions based on available credits. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserCreditsEligibleResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/delete: + parameters: + - $ref: '#/components/parameters/userId' + put: + operationId: deleteUser + summary: Delete User + description: |- + Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. + + **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. + + **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. + tags: + - authentication + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/DeleteUserResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/feedback: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/contentId' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + get: + operationId: getUserFeedback + deprecated: true + summary: Get User Feedback + description: Get user's submitted feedback + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FeedbackListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/groups: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserGroups + summary: Get User Groups + description: Get user's public groups + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LimitedUserGroupListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/groups/invited: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getInvitedGroups + summary: Get User Group Invited + description: Returns a list of Groups the user has been invited to. + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/groups/permissions: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserAllGroupPermissions + summary: Get user's permissions for all joined groups. + description: Returns a mapping of GroupIDs to arrays of GroupPermissions. + tags: + - users + parameters: + - name: groupIds + description: Comma-separated (no spaces!) list of GroupIDs to retrieve permissions for. + required: false + in: query + schema: + type: string + example: grp_00000000-0000-0000-0000-000000000000,grp_11111111-1111-1111-1111-111111111111 + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserAllGroupPermissionsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/groups/represented: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserRepresentedGroup + summary: Get user's current represented group + description: Returns the current group that the user is currently representing + tags: + - users + security: + - authCookie: [] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RepresentedGroup' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/groups/requested: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserGroupRequests + summary: Get User Group Requests + description: Returns a list of Groups the user has requested to be invited into. + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/groups/userblocked: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getBlockedGroups + summary: Get User Group Blocks + description: Returns a list of Groups the user has blocked. + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/GroupListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/instances/groups: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserGroupInstances + summary: Get User Group Instances + description: Returns a list of group instances for a user + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserGroupInstanceListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/UserMustBeOwnError' + /users/{userId}/instances/groups/{groupId}: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/groupId' + get: + operationId: getUserGroupInstancesForGroup + summary: Get User Group Instances for a specific Group + description: Returns a list of a group's instances for a user + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserGroupInstanceListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/UserMustBeOwnError' + /users/{userId}/mutuals: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getMutuals + summary: Get User Mutuals + description: Gets the counts of mutuals between the logged in user and the specified user + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/MutualsResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/mutuals/friends: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + get: + operationId: getMutualFriends + summary: Get User Mutual Friends + description: Gets a list of mutual friends between the logged in user and the specified user + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/MutualFriendListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/mutuals/groups: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/offset' + get: + operationId: getMutualGroups + summary: Get User Mutual Groups + description: Gets a list of mutual groups between the logged in user and the specified user + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LimitedUserGroupListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/persist: + parameters: + - $ref: '#/components/parameters/userId' + delete: + operationId: deleteAllUserPersistenceData + summary: Delete All User Persistence Data + description: Deletes all of the user's persistence data for every world. + tags: + - users + - worlds + security: + - authCookie: [] + responses: + '200': + description: The user's persistence data for all worlds is deleted. + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/removeTags: + parameters: + - $ref: '#/components/parameters/userId' + post: + operationId: removeTags + summary: Remove User Tags + description: Removes tags from the user's profile + tags: + - users + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ChangeUserTagsRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/CurrentUserResponse' + '400': + $ref: '#/components/responses/UserTagInvalidError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/subscription/eligible: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/steamId' + get: + operationId: getUserSubscriptionEligible + summary: Get User Subscription Eligiblity + description: Get the user's eligibility status for subscriptions. + tags: + - economy + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserSubscriptionEligibleResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/tutorial: + parameters: + - $ref: '#/components/parameters/userId' + get: + operationId: getUserTutorialStatus + summary: Get User Tutorial Status + description: Gets the status of completed or outstanding tutorials for the specified user. + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/TutorialStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /users/{userId}/{worldId}/persist: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/worldId' + delete: + operationId: deleteUserPersistence + summary: Delete User Persistence + description: Deletes the user's persistence data for a given world + tags: + - users + - worlds + security: + - authCookie: [] + responses: + '200': + description: The user's persistence data for the given world is deleted. + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + description: The user does not have persistence data for the given world. + /users/{userId}/{worldId}/persist/exists: + parameters: + - $ref: '#/components/parameters/userId' + - $ref: '#/components/parameters/worldId' + get: + operationId: checkUserPersistenceExists + summary: Check User Persistence Exists + description: Checks whether the user has persistence data for a given world + tags: + - users + - worlds + security: + - authCookie: [] + responses: + '200': + description: The user has persistence data for the given world. + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + description: The user does not have persistence data for the given world. + /users/{username}/name: + parameters: + - name: username + description: Username of the user + required: true + in: path + schema: + type: string + get: + operationId: getUserByName + deprecated: true + summary: Get User by Username + description: |- + ~~Get public user information about a specific user using their name.~~ + + **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). + This endpoint now require Admin Credentials. + tags: + - users + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/UserResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /visits: + get: + operationId: getCurrentOnlineUsers + summary: Current Online Users + description: |- + Returns the current number of online users. + + **NOTE:** The response type is not a JSON object, but a simple JSON integer. + tags: + - miscellaneous + security: [] + responses: + '200': + $ref: '#/components/responses/CurrentOnlineUsersResponse' + /worlds: + get: + operationId: searchWorlds + summary: Search All Worlds + description: Search and list any worlds by query filters. + tags: + - worlds + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sort' + - name: user + description: Set to `me` for searching own worlds. + required: false + in: query + schema: + type: string + enum: + - me + - $ref: '#/components/parameters/userIdQuery' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/noplatform' + - $ref: '#/components/parameters/fuzzy' + - $ref: '#/components/parameters/avatarSpecific' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LimitedWorldListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + post: + operationId: createWorld + summary: Create World + description: Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. + tags: + - worlds + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWorldRequest' + responses: + '200': + $ref: '#/components/responses/WorldResponse' + '400': + $ref: '#/components/responses/WorldCreateNotAllowedYetError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /worlds/active: + get: + operationId: getActiveWorlds + summary: List Active Worlds + description: Search and list currently Active worlds by query filters. + tags: + - worlds + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sort' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/noplatform' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LimitedWorldListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /worlds/favorites: + get: + operationId: getFavoritedWorlds + summary: List Favorited Worlds + description: Search and list favorited worlds by query filters. + tags: + - worlds + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sort' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/userIdAdmin' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/FavoritedWorldListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/WorldSeeOtherUserFavoritesError' + /worlds/recent: + get: + operationId: getRecentWorlds + summary: List Recent Worlds + description: Search and list recently visited worlds by query filters. + tags: + - worlds + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sort' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/userIdAdmin' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/LimitedWorldListResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '403': + $ref: '#/components/responses/WorldSeeOtherUserRecentsError' + /worlds/{worldId}: + parameters: + - $ref: '#/components/parameters/worldId' + get: + operationId: getWorld + summary: Get World by ID + description: |- + Get information about a specific World. + Works unauthenticated but when so will always return `0` for certain fields. + tags: + - worlds + security: [] + responses: + '200': + $ref: '#/components/responses/WorldResponse' + '404': + $ref: '#/components/responses/WorldNotFoundError' + put: + operationId: updateWorld + summary: Update World + description: Update information about a specific World. + tags: + - worlds + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWorldRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/WorldResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/WorldNotFoundError' + delete: + operationId: deleteWorld + summary: Delete World + description: Delete a world. Notice a world is never fully "deleted", only its ReleaseStatus is set to "hidden" and the linked Files are deleted. The WorldID is permanently reserved. + tags: + - worlds + security: + - authCookie: [] + responses: + '200': + description: OK + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/WorldNotFoundError' + /worlds/{worldId}/addTags: + parameters: + - $ref: '#/components/parameters/worldId' + post: + operationId: addWorldTags + summary: Add World Tags + description: Adds tags to the world's profile + tags: + - worlds + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ChangeWorldTagsRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/WorldResponse' + '400': + $ref: '#/components/responses/WorldTagInvalidError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /worlds/{worldId}/metadata: + parameters: + - $ref: '#/components/parameters/worldId' + get: + operationId: getWorldMetadata + deprecated: true + summary: Get World Metadata + description: Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. + tags: + - worlds + security: [] + responses: + '200': + $ref: '#/components/responses/WorldMetadataResponse' + '404': + $ref: '#/components/responses/WorldNotFoundError' + /worlds/{worldId}/platform/{publishedPlatform}: + parameters: + - $ref: '#/components/parameters/worldId' + - $ref: '#/components/parameters/publishedPlatform' + delete: + operationId: deleteWorldPlatform + summary: Delete World Platform + description: Deletes a world platform. + tags: + - worlds + security: + - authCookie: [] + responses: + '200': + description: OK + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/WorldNotFoundError' + /worlds/{worldId}/publish: + parameters: + - $ref: '#/components/parameters/worldId' + get: + operationId: getWorldPublishStatus + summary: Get World Publish Status + description: Returns a worlds publish status. + tags: + - worlds + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/WorldPublishStatusResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/WorldNotFoundError' + put: + operationId: publishWorld + summary: Publish World + description: Publish a world. You can only publish one world per week. + tags: + - worlds + security: + - authCookie: [] + responses: + '200': + description: TODO + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/WorldNotFoundError' + delete: + operationId: unpublishWorld + summary: Unpublish World + description: Unpublish a world. + tags: + - worlds + security: + - authCookie: [] + responses: + '200': + description: OK + '401': + $ref: '#/components/responses/MissingCredentialsError' + '404': + $ref: '#/components/responses/WorldNotFoundError' + /worlds/{worldId}/removeTags: + parameters: + - $ref: '#/components/parameters/worldId' + post: + operationId: removeWorldTags + summary: Remove World Tags + description: Removes tags from the world's profile + tags: + - worlds + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ChangeWorldTagsRequest' + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/WorldResponse' + '400': + $ref: '#/components/responses/WorldTagInvalidError' + '401': + $ref: '#/components/responses/MissingCredentialsError' + /worlds/{worldId}/{instanceId}: + parameters: + - $ref: '#/components/parameters/worldId' + - $ref: '#/components/parameters/instanceId' + get: + operationId: getWorldInstance + summary: Get World Instance + description: Returns a worlds instance. + tags: + - worlds + security: + - authCookie: [] + responses: + '200': + $ref: '#/components/responses/InstanceResponse' + '401': + $ref: '#/components/responses/MissingCredentialsError' +components: + schemas: + TransactionAgreement: + title: TransactionAgreement + type: object + description: Represents a single Transaction, which is likely between VRChat and Steam. + properties: + agreement: + type: string + agreementId: + type: string + minLength: 1 + billingType: + type: string + minLength: 1 + currency: + type: string + minLength: 1 + endDate: + type: string + minLength: 1 + failedAttempts: + type: integer + frequency: + type: integer + itemId: + type: integer + lastAmount: + type: number + lastAmountVat: + type: number + lastPayment: + type: string + minLength: 1 + nextPayment: + type: string + minLength: 1 + outstanding: + type: integer + period: + type: string + minLength: 1 + recurringAmt: + type: number + startDate: + type: string + minLength: 1 + status: + type: string + description: This is NOT TransactionStatus, but whatever Steam return. + minLength: 1 + timeCreated: + type: string + minLength: 1 + required: + - agreement + - agreementId + - billingType + - currency + - endDate + - failedAttempts + - frequency + - itemId + - lastAmount + - lastAmountVat + - lastPayment + - nextPayment + - outstanding + - period + - recurringAmt + - startDate + - status + - timeCreated + TransactionID: + title: TransactionID + type: string + example: txn_e5c72948-e735-4880-8245-24b2a41198b0 + TransactionStatus: + title: TransactionStatus + type: string + enum: + - active + - chargeback + - expired + - failed + default: active + TransactionSteamWalletInfo: + title: TransactionSteamWalletInfo + type: object + description: '' + properties: + country: + type: string + default: US + example: SE + minLength: 2 + currency: + type: string + default: USD + example: EUR + minLength: 3 + state: + type: string + status: + type: string + example: Trusted + minLength: 1 + required: + - country + - currency + - state + - status + example: + country: SE + currency: EUR + state: '' + status: Trusted + TransactionSteamInfo: + title: TransactionSteamInfo + type: object + description: '' + properties: + orderId: + type: string + description: Steam Order ID + minLength: 1 + steamId: + type: string + description: Steam User ID + minLength: 1 + steamUrl: + type: string + description: Empty + transId: + type: string + description: Steam Transaction ID, NOT the same as VRChat TransactionID + minLength: 1 + walletInfo: + $ref: '#/components/schemas/TransactionSteamWalletInfo' + required: + - orderId + - steamId + - steamUrl + - transId + - walletInfo + SubscriptionPeriod: + title: SubscriptionPeriod + type: string + enum: + - day + - hour + - month + - week + - year + default: month + Subscription: + title: Subscription + type: object + description: '' + properties: + amount: + type: number + appleProductId: + type: string + minLength: 1 + description: + type: string + googlePlanId: + type: string + googleProductId: + type: string + minLength: 1 + id: + type: string + minLength: 1 + oculusSku: + type: string + minLength: 1 + period: + $ref: '#/components/schemas/SubscriptionPeriod' + picoSku: + type: string + minLength: 1 + steamItemId: + type: string + minLength: 1 + tier: + type: integer + required: + - amount + - description + - id + - period + - steamItemId + - tier + example: + id: vrchatplus-yearly + description: VRChat Plus (Yearly) + amount: 9999 + period: year + steamItemId: '5000' + tier: 5 + UserID: + title: UserID + type: string + description: 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. + example: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + Transaction: + title: Transaction + type: object + description: '' + properties: + agreement: + $ref: '#/components/schemas/TransactionAgreement' + created_at: + type: string + format: date-time + error: + type: string + nullable: true + id: + $ref: '#/components/schemas/TransactionID' + isGift: + type: boolean + default: false + isTokens: + type: boolean + default: false + sandbox: + type: boolean + default: false + status: + $ref: '#/components/schemas/TransactionStatus' + steam: + $ref: '#/components/schemas/TransactionSteamInfo' + subscription: + $ref: '#/components/schemas/Subscription' + updated_at: + type: string + format: date-time + userDisplayName: + type: string + userId: + $ref: '#/components/schemas/UserID' + required: + - created_at + - error + - id + - sandbox + - status + - subscription + - updated_at + Response: + title: Response + type: object + properties: + message: + type: string + minLength: 1 + status_code: + type: integer + minimum: 100 + required: + - status_code + Error: + title: Error + type: object + properties: + error: + $ref: '#/components/schemas/Response' + ReleaseStatus: + title: ReleaseStatus + type: string + enum: + - all + - hidden + - private + - public + default: public + example: public + Tag: + title: Tag + type: string + description: |- + 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. + minLength: 1 + Platform: + title: Platform + type: string + description: 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`. + example: standalonewindows + AdminUnityPackage: + title: AdminUnityPackage + type: object + description: '' + properties: + assetUrl: + type: string + example: https://assets.vrchat.com/adminfiles/adfl_fba880f3-7d8c-4429-87e6-0e2d50000076ie_chad_rat_standalonewindows + assetVersion: + type: integer + example: 4 + minimum: 0 + platform: + $ref: '#/components/schemas/Platform' + unityVersion: + type: string + default: 2022.3.22f1-DWR + example: 2022.3.22f1-DWR + minLength: 1 + variant: + type: string + required: + - assetUrl + - assetVersion + - platform + - unityVersion + - variant + AdminAssetBundle: + title: AdminAssetBundle + type: object + description: '' + properties: + _created_at: + type: string + format: date-time + _updated_at: + type: string + format: date-time + assetType: + type: string + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + description: + type: string + imageUrl: + type: string + name: + type: string + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + thumbnailImageUrl: + type: string + unityPackageUrl: + type: string + nullable: true + unityPackages: + type: array + items: + $ref: '#/components/schemas/AdminUnityPackage' + minItems: 1 + uniqueItems: true + required: + - _created_at + - _updated_at + - assetType + - authorId + - authorName + - description + - imageUrl + - name + - releaseStatus + - tags + - thumbnailImageUrl + - unityPackageUrl + - unityPackages + AgreementCode: + title: AgreementCode + type: string + description: The type of agreement. + enum: + - content.copyright.owned + default: content.copyright.owned + example: content.copyright.owned + AgreementStatus: + title: AgreementStatus + type: object + properties: + agreed: + type: boolean + description: Whether the user has agreed for this content. + example: false + agreementCode: + $ref: '#/components/schemas/AgreementCode' + contentId: + type: string + description: The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. + example: avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11 + userId: + $ref: '#/components/schemas/UserID' + version: + type: integer + description: The version of the agreement. + example: 1 + required: + - agreed + - agreementCode + - contentId + - userId + - version + AgreementRequest: + title: AgreementRequest + type: object + properties: + agreementCode: + $ref: '#/components/schemas/AgreementCode' + agreementFulltext: + type: string + description: 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.`). + 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. + contentId: + type: string + description: The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. + example: avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11 + version: + type: integer + description: The version of the agreement (currently `1`). + example: 1 + required: + - agreementCode + - agreementFulltext + - contentId + - version + Agreement: + title: Agreement + type: object + properties: + agreementCode: + $ref: '#/components/schemas/AgreementCode' + agreementFulltext: + type: string + description: The full text of the agreement. + 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. + contentId: + type: string + description: The id of the content being uploaded, such as a WorldID, AvatarID, or PropID. + example: avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11 + created: + type: string + description: When the agreement was created + format: datetime + id: + type: string + description: The id of the agreement. + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + userId: + $ref: '#/components/schemas/UserID' + version: + type: integer + description: The version of the agreement. + example: 1 + required: + - agreementCode + - contentId + - created + - id + - tags + - userId + - version + FileID: + title: FileID + type: string + example: file_ce35d830-e20a-4df0-a6d4-5aaef4508044 + FileAnalysisAvatarStats: + title: FileAnalysisAvatarStats + type: object + properties: + animatorCount: + type: integer + audioSourceCount: + type: integer + blendShapeCount: + type: integer + boneCount: + type: integer + bounds: + type: array + items: + type: number + cameraCount: + type: integer + clothCount: + type: integer + constraintCount: + type: integer + constraintDepth: + type: integer + contactCount: + type: integer + customExpressions: + type: boolean + customizeAnimationLayers: + type: boolean + enableEyeLook: + type: boolean + lightCount: + type: integer + lineRendererCount: + type: integer + lipSync: + type: integer + materialCount: + type: integer + materialSlotsUsed: + type: integer + meshCount: + type: integer + meshIndices: + type: integer + meshParticleMaxPolygons: + type: integer + meshPolygons: + type: integer + meshVertices: + type: integer + particleCollisionEnabled: + type: boolean + particleSystemCount: + type: integer + particleTrailsEnabled: + type: boolean + physBoneColliderCount: + type: integer + physBoneCollisionCheckCount: + type: integer + physBoneComponentCount: + type: integer + physBoneTransformCount: + type: integer + physicsColliders: + type: integer + physicsRigidbodies: + type: integer + skinnedMeshCount: + type: integer + skinnedMeshIndices: + type: integer + skinnedMeshPolygons: + type: integer + skinnedMeshVertices: + type: integer + totalClothVertices: + type: integer + totalIndices: + type: integer + totalMaxParticles: + type: integer + totalPolygons: + type: integer + totalTextureUsage: + type: integer + totalVertices: + type: integer + trailRendererCount: + type: integer + writeDefaultsUsed: + type: boolean + required: + - 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 + FileAnalysis: + title: FileAnalysis + type: object + properties: + avatarStats: + $ref: '#/components/schemas/FileAnalysisAvatarStats' + created_at: + type: string + format: date-time + encryptionKey: + type: string + fileSize: + type: integer + performanceRating: + type: string + success: + type: boolean + uncompressedSize: + type: integer + required: + - avatarStats + - fileSize + - success + - uncompressedSize + UpdateAssetReviewNotesRequest: + title: UpdateAssetReviewNotesRequest + type: object + properties: + reviewNotes: + type: string + required: + - reviewNotes + VerifyAuthTokenResult: + title: VerifyAuthTokenResult + type: object + properties: + ok: + type: boolean + token: + type: string + minLength: 1 + required: + - ok + - token + UserExists: + title: UserExists + type: object + 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. + properties: + nameOk: + type: boolean + description: Is the username valid? + default: false + userExists: + type: boolean + description: Status if a user exist with that username or userId. + default: false + required: + - userExists + BadgeID: + title: BadgeID + type: string + example: bdg_a60e514a-8cb7-4702-8f24-2786992be1a8 + PermissionID: + title: PermissionID + type: string + example: prms_804ba021-9f47-4e25-9847-1f42fdb2e6ff + Permission: + title: Permission + type: object + description: '' + properties: + data: + type: object + description: Specific values afforded the user by this permission + properties: + badges: + type: array + description: Badges afforded the user by this permission + items: + $ref: '#/components/schemas/BadgeID' + max: + type: integer + description: Maximum value afforded the user by this permission + maxFavoriteGroups: + type: object + description: Maximum favorite groups afforded the user by this permission + additionalProperties: + type: integer + maxFavoritesPerGroup: + type: object + description: Maximum favorites per group afforded the user by this permission + additionalProperties: + type: integer + tags: + type: array + description: Tags afforded the user by this permission + items: + $ref: '#/components/schemas/Tag' + description: + type: string + displayName: + type: string + id: + $ref: '#/components/schemas/PermissionID' + name: + type: string + example: permission-invite-photos + minLength: 1 + ownerDisplayName: + type: string + ownerId: + $ref: '#/components/schemas/UserID' + type: + type: string + required: + - id + - name + - ownerDisplayName + - ownerId + RegisterUserAccountRequest: + title: RegisterUserAccountRequest + type: object + properties: + acceptedTOSVersion: + type: integer + description: The most recent version of the TOS + captchaCode: + type: string + description: Captcha code + day: + type: string + description: Birth day of month + email: + type: string + description: Email address + month: + type: string + description: Birth month of year + password: + type: string + description: Password + minLength: 8 + subscribe: + type: boolean + description: Whether to recieve promotional emails + username: + type: string + description: Display Name / Username (Username is a sanitized version) + maxLength: 15 + minLength: 4 + year: + type: string + description: Birth year + required: + - acceptedTOSVersion + - captchaCode + - day + - email + - month + - password + - subscribe + - username + - year + AccountDeletionLog: + title: AccountDeletionLog + type: object + properties: + dateTime: + type: string + description: Date and time of the deletion request. + format: date-time + deletionScheduled: + type: string + description: When the deletion is scheduled to happen, standard is 14 days after the request. + nullable: true + format: date-time + message: + type: string + description: 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. + default: Deletion requested + example: Deletion requested + AgeVerificationStatus: + title: AgeVerificationStatus + type: string + description: | + `verified` is obsolete. + + User who have verified and are 18+ can switch to `plus18` status. + enum: + - 18+ + - hidden + - verified + x-enum-varnames: + - plus18 + - hidden + - verified + AgeVerified: + title: AgeVerified + type: boolean + description: '`true` if, user is age verified (not 18+).' + Badge: + title: Badge + type: object + properties: + assignedAt: + type: string + description: only present in CurrentUser badges + nullable: true + format: date-time + badgeDescription: + type: string + badgeId: + $ref: '#/components/schemas/BadgeID' + badgeImageUrl: + type: string + description: direct url to image + badgeName: + type: string + hidden: + type: boolean + description: only present in CurrentUser badges + nullable: true + showcased: + type: boolean + updatedAt: + type: string + description: only present in CurrentUser badges + nullable: true + format: date-time + required: + - badgeDescription + - badgeId + - badgeImageUrl + - badgeName + - showcased + AvatarID: + title: AvatarID + type: string + example: avtr_912d66a4-4714-43b8-8407-7de2cafbf55b + CurrentAvatarImageUrl: + title: CurrentAvatarImageUrl + type: string + description: When profilePicOverride is not empty, use it instead. + example: https://api.vrchat.cloud/api/1/file/file_ae46d521-7281-4b38-b365-804b32a1d6a7/1/file + CurrentAvatarThumbnailImageUrl: + title: CurrentAvatarThumbnailImageUrl + type: string + description: When profilePicOverride is not empty, use it instead. + example: https://api.vrchat.cloud/api/1/image/file_aae83ed9-d42d-4d72-9f4b-9f1e41ed17e1/1/256 + DeveloperType: + title: DeveloperType + type: string + description: |- + "none" User is a normal user + "trusted" Unknown + "internal" Is a VRChat Developer + "moderator" Is a VRChat Moderator + + Staff can hide their developerType at will. + enum: + - internal + - moderator + - none + - trusted + default: none + DiscordID: + title: DiscordID + type: string + description: https://discord.com/developers/docs/reference#snowflakes + example: '1280064052206370848' + DiscordDetails: + title: DiscordDetails + type: object + description: '' + properties: + global_name: + type: string + id: + $ref: '#/components/schemas/DiscordID' + WorldID: + title: WorldID + type: string + description: WorldID be "offline" on User profiles if you are not friends with that user. + example: wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd + PastDisplayName: + title: PastDisplayName + type: object + properties: + displayName: + type: string + minLength: 1 + updated_at: + type: string + format: date-time + required: + - displayName + - updated_at + GroupID: + title: GroupID + type: string + example: grp_71a7ff59-112c-4e78-a990-c7cc650776e5 + LocationID: + title: LocationID + type: string + description: Represents a unique location, consisting of a world identifier and an instance identifier, or "offline" if the user is not on your friends list. + example: wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2) + CurrentUserPresence: + title: CurrentUserPresence + type: object + properties: + avatarThumbnail: + type: string + nullable: true + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + debugflag: + type: string + displayName: + type: string + groups: + type: array + nullable: true + items: + $ref: '#/components/schemas/GroupID' + id: + $ref: '#/components/schemas/UserID' + instance: + type: string + nullable: true + instanceType: + type: string + description: either an InstanceType or an empty string + nullable: true + isRejoining: + type: string + nullable: true + platform: + $ref: '#/components/schemas/Platform' + description: either a Platform or an empty string + nullable: true + profilePicOverride: + type: string + nullable: true + status: + type: string + description: either a UserStatus or empty string + nullable: true + travelingToInstance: + type: string + nullable: true + travelingToWorld: + $ref: '#/components/schemas/LocationID' + nullable: true + userIcon: + type: string + nullable: true + world: + $ref: '#/components/schemas/WorldID' + nullable: true + UserState: + title: UserState + type: string + description: |- + * "online" User is online in VRChat + * "active" User is online, but not in VRChat + * "offline" User is offline + + Always offline when returned through `getCurrentUser` (/auth/user). + enum: + - active + - offline + - online + default: offline + UserStatus: + title: UserStatus + type: string + description: Defines the User's current status, for example "ask me", "join me" or "offline. This status is a combined indicator of their online activity and privacy preference. + enum: + - active + - ask me + - busy + - join me + - offline + default: offline + CurrentUser: + title: CurrentUser + type: object + properties: + acceptedPrivacyVersion: + type: integer + example: 0 + minimum: 0 + acceptedTOSVersion: + type: integer + example: 7 + minimum: 0 + accountDeletionDate: + type: string + nullable: true + format: date + accountDeletionLog: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/AccountDeletionLog' + activeFriends: + type: array + description: ' ' + items: + $ref: '#/components/schemas/UserID' + ageVerificationStatus: + $ref: '#/components/schemas/AgeVerificationStatus' + ageVerified: + $ref: '#/components/schemas/AgeVerified' + allowAvatarCopying: + type: boolean + authToken: + type: string + description: The auth token for NEWLY REGISTERED ACCOUNTS ONLY (/auth/register) + badges: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Badge' + bio: + type: string + bioLinks: + type: array + description: ' ' + items: + type: string + contentFilters: + type: array + description: These tags begin with `content_` and control content gating + items: + $ref: '#/components/schemas/Tag' + currentAvatar: + $ref: '#/components/schemas/AvatarID' + currentAvatarImageUrl: + $ref: '#/components/schemas/CurrentAvatarImageUrl' + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + date_joined: + type: string + format: date + developerType: + $ref: '#/components/schemas/DeveloperType' + discordDetails: + $ref: '#/components/schemas/DiscordDetails' + discordId: + $ref: '#/components/schemas/DiscordID' + displayName: + type: string + emailVerified: + type: boolean + fallbackAvatar: + deprecated: true + $ref: '#/components/schemas/AvatarID' + friendGroupNames: + deprecated: true + type: array + description: Always empty array. + items: + type: string + friendKey: + type: string + friends: + type: array + items: + $ref: '#/components/schemas/UserID' + googleDetails: + type: object + googleId: + type: string + hasBirthday: + type: boolean + hasEmail: + type: boolean + hasLoggedInFromClient: + type: boolean + hasPendingEmail: + type: boolean + hideContentFilterSettings: + type: boolean + homeLocation: + $ref: '#/components/schemas/WorldID' + id: + $ref: '#/components/schemas/UserID' + isAdult: + type: boolean + isBoopingEnabled: + type: boolean + default: true + isFriend: + type: boolean + default: false + last_activity: + type: string + format: date-time + last_login: + type: string + format: date-time + last_mobile: + type: string + nullable: true + format: date-time + last_platform: + $ref: '#/components/schemas/Platform' + obfuscatedEmail: + type: string + obfuscatedPendingEmail: + type: string + oculusId: + type: string + offlineFriends: + type: array + items: + $ref: '#/components/schemas/UserID' + onlineFriends: + type: array + items: + $ref: '#/components/schemas/UserID' + pastDisplayNames: + type: array + description: ' ' + items: + $ref: '#/components/schemas/PastDisplayName' + picoId: + type: string + platform_history: + type: array + items: + type: object + properties: + isMobile: + type: boolean + platform: + $ref: '#/components/schemas/Platform' + nullable: true + recorded: + type: string + format: date-time + presence: + $ref: '#/components/schemas/CurrentUserPresence' + profilePicOverride: + type: string + profilePicOverrideThumbnail: + type: string + pronouns: + type: string + pronounsHistory: + type: array + items: + type: string + queuedInstance: + type: string + nullable: true + receiveMobileInvitations: + type: boolean + state: + $ref: '#/components/schemas/UserState' + status: + $ref: '#/components/schemas/UserStatus' + statusDescription: + type: string + statusFirstTime: + type: boolean + statusHistory: + type: array + items: + type: string + steamDetails: + type: object + steamId: + type: string + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + twoFactorAuthEnabled: + type: boolean + twoFactorAuthEnabledDate: + type: string + nullable: true + format: date-time + unsubscribe: + type: boolean + updated_at: + type: string + format: date-time + userIcon: + type: string + userLanguage: + type: string + nullable: true + userLanguageCode: + type: string + nullable: true + username: + deprecated: true + type: string + description: '-| **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).' + usesGeneratedPassword: + type: boolean + viveId: + type: string + required: + - 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 + Disable2FAResult: + title: Disable2FAResult + type: object + properties: + removed: + type: boolean + required: + - removed + TwoFactorEmailCode: + title: TwoFactorEmailCode + type: object + properties: + code: + type: string + required: + - code + Verify2FAEmailCodeResult: + title: Verify2FAEmailCodeResult + type: object + properties: + verified: + type: boolean + required: + - verified + TwoFactorAuthCode: + title: TwoFactorAuthCode + type: object + properties: + code: + type: string + required: + - code + Verify2FAResult: + title: Verify2FAResult + type: object + properties: + enabled: + type: boolean + default: true + verified: + type: boolean + required: + - verified + Pending2FAResult: + title: Pending2FAResult + type: object + properties: + qrCodeDataUrl: + type: string + secret: + type: string + required: + - qrCodeDataUrl + - secret + AvatarModerationType: + title: AvatarModerationType + type: string + enum: + - block + example: block + AvatarModeration: + title: AvatarModeration + type: object + properties: + avatarModerationType: + $ref: '#/components/schemas/AvatarModerationType' + created: + type: string + format: date-time + targetAvatarId: + $ref: '#/components/schemas/AvatarID' + required: + - avatarModerationType + - created + - targetAvatarId + CreateAvatarModerationRequest: + title: CreateAvatarModerationRequest + type: object + properties: + avatarModerationType: + $ref: '#/components/schemas/AvatarModerationType' + targetAvatarId: + $ref: '#/components/schemas/AvatarID' + required: + - avatarModerationType + - targetAvatarId + AvatarModerationCreated: + title: AvatarModerationCreated + type: object + properties: + avatarModerationType: + $ref: '#/components/schemas/AvatarModerationType' + created: + type: integer + description: Timestamp in milliseconds since Unix epoch + format: int64 + targetAvatarId: + $ref: '#/components/schemas/AvatarID' + required: + - avatarModerationType + - created + - targetAvatarId + OkStatus2: + title: OkStatus2 + type: object + description: Another status response consisting of solely a string description of whether the result of an operation was ok. + properties: + OK: + type: string + description: The actual status itself + required: + - OK + FavoriteGroupLimits: + title: FavoriteGroupLimits + type: object + properties: + avatar: + type: integer + friend: + type: integer + vrcPlusWorld: + type: integer + world: + type: integer + required: + - avatar + - friend + - vrcPlusWorld + - world + FavoriteLimits: + title: FavoriteLimits + type: object + properties: + defaultMaxFavoriteGroups: + type: integer + defaultMaxFavoritesPerGroup: + type: integer + maxFavoriteGroups: + $ref: '#/components/schemas/FavoriteGroupLimits' + maxFavoritesPerGroup: + $ref: '#/components/schemas/FavoriteGroupLimits' + required: + - defaultMaxFavoriteGroups + - defaultMaxFavoritesPerGroup + - maxFavoriteGroups + - maxFavoritesPerGroup + LimitedUserFriend: + title: LimitedUserFriend + type: object + description: User object received when querying your friends list + properties: + bio: + type: string + bioLinks: + type: array + description: ' ' + items: + type: string + currentAvatarImageUrl: + $ref: '#/components/schemas/CurrentAvatarImageUrl' + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + developerType: + $ref: '#/components/schemas/DeveloperType' + displayName: + type: string + friendKey: + type: string + id: + $ref: '#/components/schemas/UserID' + imageUrl: + type: string + isFriend: + type: boolean + last_activity: + type: string + nullable: true + format: date-time + last_login: + type: string + nullable: true + format: date-time + last_mobile: + type: string + nullable: true + format: date-time + last_platform: + $ref: '#/components/schemas/Platform' + location: + type: string + platform: + type: string + profilePicOverride: + type: string + profilePicOverrideThumbnail: + type: string + status: + $ref: '#/components/schemas/UserStatus' + statusDescription: + type: string + tags: + type: array + description: <- Always empty. + items: + $ref: '#/components/schemas/Tag' + userIcon: + type: string + required: + - developerType + - displayName + - friendKey + - id + - imageUrl + - isFriend + - last_activity + - last_login + - last_mobile + - last_platform + - location + - platform + - status + - statusDescription + - tags + Success: + title: Success + type: object + properties: + success: + $ref: '#/components/schemas/Response' + NotificationType: + title: NotificationType + type: string + enum: + - boop + - friendRequest + - invite + - inviteResponse + - message + - requestInvite + - requestInviteResponse + - votetokick + default: friendRequest + Notification: + title: Notification + type: object + description: '' + properties: + created_at: + type: string + format: date-time + details: + type: string + description: '**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.' + default: '{}' + example: 'OneOf: {}, NotificationDetailBoop, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick' + id: + type: string + minLength: 1 + message: + type: string + description: '' + example: This is a generated invite to VRChat Hub + receiverUserId: + $ref: '#/components/schemas/UserID' + description: Not included in notification objects received from the REST API + seen: + type: boolean + description: Not included in notification objects received from the Websocket API + default: false + senderUserId: + $ref: '#/components/schemas/UserID' + senderUsername: + deprecated: true + type: string + description: '-| **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).' + minLength: 1 + type: + $ref: '#/components/schemas/NotificationType' + required: + - created_at + - details + - id + - message + - senderUserId + - type + NotificationID: + title: NotificationID + type: string + example: not_00000000-0000-0000-0000-000000000000 + PlayerModerationType: + title: PlayerModerationType + type: string + enum: + - block + - hideAvatar + - interactOff + - interactOn + - mute + - muteChat + - showAvatar + - unmute + - unmuteChat + default: unmute + example: unmute + PlayerModerationID: + title: PlayerModerationID + type: string + example: pmod_25551a8d-6f5d-430a-88d3-9c0ce08b5244 + PlayerModeration: + title: PlayerModeration + type: object + properties: + created: + type: string + format: date-time + id: + $ref: '#/components/schemas/PlayerModerationID' + sourceDisplayName: + type: string + minLength: 1 + sourceUserId: + $ref: '#/components/schemas/UserID' + targetDisplayName: + type: string + minLength: 1 + targetUserId: + $ref: '#/components/schemas/UserID' + type: + $ref: '#/components/schemas/PlayerModerationType' + required: + - created + - id + - sourceDisplayName + - sourceUserId + - targetDisplayName + - targetUserId + - type + ModerateUserRequest: + title: ModerateUserRequest + type: object + additionalProperties: false + properties: + moderated: + $ref: '#/components/schemas/UserID' + type: + $ref: '#/components/schemas/PlayerModerationType' + required: + - moderated + - type + LicenseGroupID: + title: LicenseGroupID + type: string + example: lgrp_608513da-b213-4e15-80af-bd88c27f0979 + UserSubscription: + title: UserSubscription + type: object + description: '' + properties: + active: + type: boolean + default: true + amount: + type: number + example: 9999 + created_at: + type: string + format: date-time + description: + type: string + example: VRChat Plus (Yearly) + expires: + type: string + format: date-time + id: + type: string + example: vrchatplus-yearly + minLength: 1 + isBulkGift: + type: boolean + default: false + isGift: + type: boolean + default: false + licenseGroups: + type: array + items: + $ref: '#/components/schemas/LicenseGroupID' + period: + $ref: '#/components/schemas/SubscriptionPeriod' + starts: + type: string + status: + $ref: '#/components/schemas/TransactionStatus' + steamItemId: + type: string + example: '5000' + minLength: 1 + store: + type: string + description: Which "Store" it came from. Right now only Stores are "Steam" and "Admin". + example: Steam + minLength: 1 + tier: + type: integer + example: 5 + transactionId: + $ref: '#/components/schemas/TransactionID' + updated_at: + type: string + format: date-time + required: + - active + - amount + - created_at + - description + - expires + - id + - isBulkGift + - isGift + - licenseGroups + - period + - status + - store + - tier + - transactionId + - updated_at + TwoFactorRecoveryCodes: + title: TwoFactorRecoveryCodes + type: object + properties: + otp: + type: array + items: + type: object + properties: + code: + type: string + used: + type: boolean + required: + - code + - used + requiresTwoFactorAuth: + type: array + items: + type: string + AvatarStyleID: + title: AvatarStyleID + type: string + example: avst_f0659ed2-094d-48fb-9e40-de05564d96c7 + AvatarStyle: + title: AvatarStyle + type: object + description: '' + properties: + id: + $ref: '#/components/schemas/AvatarStyleID' + styleName: + type: string + required: + - id + - styleName + SortOption: + title: SortOption + type: string + enum: + - _created_at + - _updated_at + - created + - favorites + - heat + - labsPublicationDate + - magic + - name + - order + - popularity + - publicationDate + - random + - relevance + - reportCount + - reportScore + - shuffle + - trust + - updated + default: popularity + example: popularity + OrderOption: + title: OrderOption + type: string + enum: + - ascending + - descending + default: descending + example: descending + UnityPackageID: + title: UnityPackageID + type: string + example: unp_52b12c39-4163-457d-a4a9-630e7aff1bff + PerformanceRatings: + title: PerformanceRatings + type: string + description: Avatar Performance ratings. + enum: + - Excellent + - Good + - Medium + - None + - Poor + - VeryPoor + example: Excellent + UnityPackage: + title: UnityPackage + type: object + description: '' + properties: + assetUrl: + type: string + nullable: true + example: https://api.vrchat.cloud/api/1/file/file_cd0caa7b-69ba-4715-8dfe-7d667a9d2537/65/file + assetUrlObject: + type: object + example: {} + assetVersion: + type: integer + example: 4 + minimum: 0 + created_at: + type: string + example: '2020-09-10T06:13:27.777Z' + format: date-time + id: + $ref: '#/components/schemas/UnityPackageID' + impostorUrl: + type: string + nullable: true + impostorizerVersion: + type: string + example: 0.17.0 + performanceRating: + $ref: '#/components/schemas/PerformanceRatings' + platform: + $ref: '#/components/schemas/Platform' + pluginUrl: + type: string + example: '' + pluginUrlObject: + type: object + example: {} + scanStatus: + type: string + unitySortNumber: + type: integer + example: 20180414000 + format: int64 + minimum: 0 + unityVersion: + type: string + default: 5.3.4p1 + example: 2022.3.6f1 + minLength: 1 + variant: + type: string + worldSignature: + type: string + nullable: true + example: AHiPAWerwCpeYrxDthF5TU2SdUWEWnm43UAn8PKRXlS8k8tVRQ== + required: + - assetVersion + - id + - platform + - unityVersion + Avatar: + title: Avatar + type: object + description: '' + properties: + acknowledgements: + type: string + activeAssetReviewId: + type: string + description: Only present for the avatar author on avatars under active review. + assetUrl: + type: string + description: Not present from general search `/avatars`, only on specific requests `/avatars/{avatarId}`. + minLength: 1 + assetUrlObject: + type: object + description: |- + 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. + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + minLength: 1 + created_at: + type: string + format: date-time + description: + type: string + minLength: 0 + featured: + type: boolean + default: false + highestPrice: + type: integer + id: + $ref: '#/components/schemas/AvatarID' + imageUrl: + type: string + minLength: 1 + listingDate: + type: string + nullable: true + lock: + type: boolean + lowestPrice: + type: integer + name: + type: string + minLength: 1 + pendingUpload: + type: boolean + default: false + performance: + type: object + properties: + android: + type: string + android-sort: + type: integer + ios: + type: string + ios-sort: + type: integer + standalonewindows: + type: string + standalonewindows-sort: + type: integer + productId: + type: string + publishedListings: + type: array + items: + type: object + properties: + description: + type: string + displayName: + type: string + imageId: + type: string + listingId: + type: string + listingType: + type: string + priceTokens: + type: integer + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + searchable: + type: boolean + default: false + styles: + type: object + properties: + primary: + type: string + nullable: true + secondary: + type: string + nullable: true + supplementary: + type: array + items: + type: string + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + thumbnailImageUrl: + type: string + minLength: 1 + unityPackageUrl: + type: string + unityPackageUrlObject: + deprecated: true + type: object + description: '**Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead.' + properties: + unityPackageUrl: + type: string + unityPackages: + type: array + items: + $ref: '#/components/schemas/UnityPackage' + minItems: 1 + uniqueItems: true + updated_at: + type: string + format: date-time + version: + type: integer + default: 0 + example: 68 + minimum: 0 + required: + - authorId + - authorName + - created_at + - description + - featured + - id + - imageUrl + - listingDate + - name + - performance + - releaseStatus + - styles + - tags + - thumbnailImageUrl + - unityPackageUrl + - unityPackageUrlObject + - unityPackages + - updated_at + - version + LocalDateTime: + title: LocalDateTime + type: string + description: A date and time of the pattern `M/d/yyyy h:mm:ss tt` (see C Sharp `System.DateTime`) + example: 12/12/2021 1:23:43 AM + CreateAvatarRequest: + title: CreateAvatarRequest + type: object + properties: + assetUrl: + type: string + assetVersion: + type: string + created_at: + $ref: '#/components/schemas/LocalDateTime' + description: + type: string + minLength: 1 + id: + $ref: '#/components/schemas/AvatarID' + imageUrl: + type: string + minLength: 1 + name: + type: string + minLength: 1 + platform: + $ref: '#/components/schemas/Platform' + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + thumbnailImageUrl: + type: string + minLength: 1 + unityPackageUrl: + type: string + unityVersion: + type: string + default: 5.3.4p1 + example: 2022.3.6f1 + minLength: 1 + updated_at: + $ref: '#/components/schemas/LocalDateTime' + version: + type: integer + default: 1 + minimum: 0 + required: + - imageUrl + - name + ServiceQueueStats: + title: ServiceQueueStats + type: object + description: Statistics about the user's currently queued service request + properties: + estimatedServiceDurationSeconds: + type: integer + required: + - estimatedServiceDurationSeconds + UpdateAvatarRequest: + title: UpdateAvatarRequest + type: object + properties: + assetUrl: + type: string + description: + type: string + minLength: 1 + id: + $ref: '#/components/schemas/AvatarID' + imageUrl: + type: string + minLength: 1 + name: + type: string + minLength: 1 + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + unityPackageUrl: + type: string + unityVersion: + type: string + default: 5.3.4p1 + example: 2022.3.6f1 + minLength: 1 + version: + type: integer + default: 1 + minimum: 0 + ServiceStatus: + title: ServiceStatus + type: object + description: Status information for a service request + properties: + created_at: + type: string + format: date-time + id: + type: string + description: The id of this service, NOT the id of the thing this service was requested for. + progress: + type: array + items: + type: object + requesterUserId: + $ref: '#/components/schemas/UserID' + description: The id of the user who requested this service. + state: + type: string + subjectId: + type: string + description: The id of the thing this service was requested for. + subjectType: + type: string + description: The kind of the thing this service was requested for. + type: + type: string + description: The kind of service that was requested. + updated_at: + type: string + format: date-time + required: + - created_at + - id + - progress + - requesterUserId + - state + - subjectId + - subjectType + - type + - updated_at + CalendarEventAccess: + title: CalendarEventAccess + type: string + description: Who the event is for + enum: + - group + - public + default: public + example: group + CalendarEventCategory: + title: CalendarEventCategory + type: string + description: The activity intended to take place at an event + enum: + - arts + - avatars + - dance + - education + - exploration + - film_media + - gaming + - hangout + - music + - other + - performance + - roleplaying + - wellness + default: other + example: performance + CalendarID: + title: CalendarID + type: string + example: cal_6b182f0c-61ef-4bdf-97fe-94f63bcba27b + LanguageCode: + title: LanguageCode + type: string + description: Represents a spoken language, signed language, or the absence of linguistic content. Valid language codes and display names are the keys and values respectively in the `$.constants.LANGUAGE.SPOKEN_LANGUAGE_OPTIONS` object from `GET /config`. + example: eng + CalendarEventOccurrenceKind: + title: CalendarEventOccurrenceKind + type: string + description: How an event occurs or recurs. "single" is a standalone event, "series" is a parent specification of a recurring series, and "occurrence" is an individual event in a series. + enum: + - occurrence + - series + - single + default: single + example: single + CalendarEventPlatform: + title: CalendarEventPlatform + type: string + enum: + - android + - ios + - standalonewindows + CalendarDayOfWeek: + title: CalendarDayOfWeek + type: string + description: The day of the week, used for recurring events. + enum: + - FR + - MO + - SA + - SU + - TH + - TU + - WE + default: SU + example: FR + CalendarEventRecurrenceEndType: + title: CalendarEventRecurrenceEndTyoe + type: string + description: How a recurring event stops being scheduled + enum: + - afterDate + - afterOccurrences + default: afterDate + example: afterOccurrences + CalendarEventRecurrenceEnd: + title: CalendarEventRecurrenceEnd + type: object + description: Details about how a recurring event stops being scheduled + properties: + count: + type: integer + description: Required for "afterOccurrences" - The number of times the event will be scheduled before it stops being scheduled + minimum: 1 + date: + type: string + description: Required for "afterDate" - The date and time after which the event will stop being scheduled, **without timezone or offset** + example: '2026-12-31T23:59:00' + type: + $ref: '#/components/schemas/CalendarEventRecurrenceEndType' + required: + - type + CalendarEventFrequency: + title: CalendarEventFrequency + type: string + description: The time unit used to specify how often a recurring event occurs. + enum: + - daily + - monthly + - weekly + - yearly + default: weekly + example: weekly + CalendarEventRecurrence: + title: CalendarEventRecurrence + type: object + description: Details about how a recurring event will be scheduled. If the event is to be scheduled indefinitely, this will lack an "end" property. + nullable: true + properties: + daysOfWeek: + type: array + description: Which days of the week the event will be scheduled, only valid/present for "weekly" recurring events + items: + $ref: '#/components/schemas/CalendarDayOfWeek' + end: + $ref: '#/components/schemas/CalendarEventRecurrenceEnd' + frequency: + $ref: '#/components/schemas/CalendarEventFrequency' + interval: + type: integer + description: How often the event will be scheduled, in units of "frequency" + minimum: 1 + timezone: + type: string + description: The timezone the event will be scheduled in, in Area/Location format + example: America/Chicago + required: + - frequency + - interval + - timezone + GroupRoleID: + title: GroupRoleID + type: string + example: grol_459d3911-f672-44bc-b84d-e54ffe7960fe + CalendarEvent: + title: CalendarEvent + type: object + description: An event scheduled on a group's calendar + properties: + accessType: + $ref: '#/components/schemas/CalendarEventAccess' + category: + $ref: '#/components/schemas/CalendarEventCategory' + closeInstanceAfterEndMinutes: + type: integer + createdAt: + type: string + format: date-time + deletedAt: + type: string + nullable: true + format: date-time + description: + type: string + durationInMs: + type: integer + format: int64 + endsAt: + type: string + format: date-time + featured: + type: boolean + guestEarlyJoinMinutes: + type: integer + hostEarlyJoinMinutes: + type: integer + id: + $ref: '#/components/schemas/CalendarID' + imageId: + $ref: '#/components/schemas/FileID' + nullable: true + imageUrl: + type: string + nullable: true + interestedUserCount: + type: integer + isDraft: + type: boolean + languages: + type: array + description: Languages that might be spoken at this event + items: + $ref: '#/components/schemas/LanguageCode' + occurrenceKind: + $ref: '#/components/schemas/CalendarEventOccurrenceKind' + ownerId: + $ref: '#/components/schemas/GroupID' + platforms: + type: array + items: + $ref: '#/components/schemas/CalendarEventPlatform' + recurrence: + $ref: '#/components/schemas/CalendarEventRecurrence' + roleIds: + type: array + description: Group roles that may join this event + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + seriesId: + type: string + description: So far unused, always "null" + nullable: true + startsAt: + type: string + format: date-time + tags: + type: array + description: Custom tags for this event + items: + $ref: '#/components/schemas/Tag' + title: + type: string + minLength: 1 + type: + type: string + example: event + updatedAt: + type: string + format: date-time + userInterest: + type: object + properties: + createdAt: + type: string + format: date-time + isFollowing: + type: boolean + updatedAt: + type: string + format: date-time + usesInstanceOverflow: + type: boolean + required: + - accessType + - category + - description + - endsAt + - id + - startsAt + - title + PaginatedCalendarEventList: + title: PaginatedCalendarEventList + type: object + description: An offset-based list of CalendarEvents + properties: + hasNext: + type: boolean + description: Whether there are more results after this page. + results: + type: array + description: ' ' + items: + $ref: '#/components/schemas/CalendarEvent' + totalCount: + type: integer + description: The total number of results that the query would return if there were no pagination. + CalendarEventDiscoveryScope: + title: CalendarEventDiscoveryScope + type: string + enum: + - all + - live + - upcoming + default: upcoming + example: upcoming + CalendarEventDiscoveryInclusion: + title: CalendarEventDiscoveryInclusion + type: string + enum: + - exclude + - include + - skip + default: include + example: include + CalendarEventDiscovery: + title: CalendarEventDiscovery + type: object + properties: + nextCursor: + type: string + description: |- + 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 + format: string + results: + type: array + items: + $ref: '#/components/schemas/CalendarEvent' + required: + - nextCursor + - results + CreateCalendarEventRequest: + title: CreateCalendarEventRequest + type: object + properties: + accessType: + $ref: '#/components/schemas/CalendarEventAccess' + category: + $ref: '#/components/schemas/CalendarEventCategory' + closeInstanceAfterEndMinutes: + type: integer + example: 5 + description: + type: string + minLength: 1 + endsAt: + type: string + description: Time the event ends at + format: date-time + featured: + type: boolean + guestEarlyJoinMinutes: + type: integer + example: 5 + hostEarlyJoinMinutes: + type: integer + example: 60 + imageId: + $ref: '#/components/schemas/FileID' + isDraft: + type: boolean + languages: + type: array + items: + $ref: '#/components/schemas/LanguageCode' + maxItems: 3 + minItems: 0 + occurrenceKind: + $ref: '#/components/schemas/CalendarEventOccurrenceKind' + parentId: + $ref: '#/components/schemas/CalendarID' + platforms: + type: array + items: + $ref: '#/components/schemas/CalendarEventPlatform' + recurrence: + $ref: '#/components/schemas/CalendarEventRecurrence' + roleIds: + type: array + items: + $ref: '#/components/schemas/GroupRoleID' + sendCreationNotification: + type: boolean + description: Send notification to group members. + example: false + startsAt: + type: string + description: Time the event starts at + format: date-time + tags: + type: array + items: + type: string + maxLength: 100 + minLength: 1 + maxItems: 5 + minItems: 0 + title: + type: string + description: Event title + example: Performance Event! + maxLength: 64 + minLength: 1 + usesInstanceOverflow: + type: boolean + example: true + required: + - accessType + - category + - description + - endsAt + - sendCreationNotification + - startsAt + - title + UpdateCalendarEventRequest: + title: UpdateCalendarEventRequest + type: object + properties: + category: + type: string + example: performance + closeInstanceAfterEndMinutes: + type: integer + example: 5 + description: + type: string + minLength: 1 + endsAt: + type: string + description: Time the vent starts at + format: date-time + featured: + type: boolean + guestEarlyJoinMinutes: + type: integer + example: 5 + hostEarlyJoinMinutes: + type: integer + example: 60 + imageId: + $ref: '#/components/schemas/FileID' + isDraft: + type: boolean + languages: + type: array + items: + type: string + parentId: + type: string + platforms: + type: array + items: + type: string + recurrence: + $ref: '#/components/schemas/CalendarEventRecurrence' + roleIds: + type: array + items: + type: string + sendCreationNotification: + type: boolean + description: Send notification to group members. + default: false + example: false + startsAt: + type: string + description: Time the vent starts at + format: date-time + tags: + type: array + items: + type: string + title: + type: string + description: Event title + example: Performance Event! + minLength: 1 + usesInstanceOverflow: + type: boolean + example: true + FollowCalendarEventRequest: + title: FollowCalendarEventRequest + type: object + properties: + isFollowing: + type: boolean + example: true + required: + - isFollowing + APIConfigAnnouncement: + title: APIConfigAnnouncement + deprecated: true + type: object + description: Public Announcement + properties: + name: + type: string + description: Announcement name + minLength: 1 + text: + type: string + description: Announcement text + minLength: 1 + required: + - name + - text + APIConfigAudioConfig: + title: APIConfigAudioConfig + type: object + description: Global configuration for Steam Audio + properties: + eq: + type: number + description: Unknown + nearFieldILDNudge: + type: number + description: Unknown + nearFieldILDNudgeDistance: + type: number + description: Unknown + nearFieldILDNudgeEarRadius: + type: number + description: Unknown + perEarDirectionalityEarRadius: + type: number + description: Unknown + perEarDirectionalityFadeDistance: + type: number + description: Unknown + perEarDirectionalityMaxScale: + type: number + description: Unknown + perEarDirectionalityPCFactor: + type: number + description: Unknown + trackingScaleMax: + type: number + description: Unknown + trackingScaleMin: + type: number + description: Unknown + trackingScaleMultiplier: + type: number + description: Unknown + required: + - eq + - nearFieldILDNudge + - nearFieldILDNudgeDistance + - nearFieldILDNudgeEarRadius + - perEarDirectionalityEarRadius + - perEarDirectionalityFadeDistance + - perEarDirectionalityMaxScale + - perEarDirectionalityPCFactor + - trackingScaleMax + - trackingScaleMin + - trackingScaleMultiplier + PerformanceLimiterInfo: + title: PerformanceLimiterInfo + type: object + description: Info about the performance limits on a platform + properties: + maxSeats: + type: integer + description: Maximum amount of seats. -1 means no limit. + required: + - maxSeats + APIConfigConstants: + title: APIConfigConstants + type: object + description: Constants + properties: + GROUPS: + type: object + description: Group-related constants + properties: + CAPACITY: + type: integer + description: Maximum group capacity + default: 100000 + GROUP_TRANSFER_REQUIREMENTS: + type: array + description: Requirements for transferring group ownership + items: + type: string + description: Requirement for transferring group ownership + MAX_INVITES_REQUESTS: + type: integer + description: Maximum number of invite requests + default: 50 + MAX_JOINED: + type: integer + description: Maximum number of joined groups + default: 100 + MAX_JOINED_PLUS: + type: integer + description: Maximum number of joined groups for VRChat Plus members + default: 200 + MAX_LANGUAGES: + type: integer + description: Maximum number of supported languages + default: 10 + MAX_LINKS: + type: integer + description: Maximum number of group links + default: 3 + MAX_MANAGEMENT_ROLES: + type: integer + description: Maximum number of management roles in a group + default: 5 + MAX_OWNED: + type: integer + description: Maximum number of groups a user can own + default: 5 + MAX_ROLES: + type: integer + description: Maximum number of roles in a group + default: 50 + INSTANCE: + type: object + description: Instance-related constants + properties: + POPULATION_BRACKETS: + type: object + description: Population brackets based on instance population + properties: + CROWDED: + type: object + description: Crowded population range + properties: + max: + type: integer + description: Maximum population for a crowded instance + min: + type: integer + description: Minimum population for a crowded instance + FEW: + type: object + description: Few population range + properties: + max: + type: integer + description: Maximum population for a few instance + min: + type: integer + description: Minimum population for a few instance + MANY: + type: object + description: Many population range + properties: + max: + type: integer + description: Maximum population for a many instance + min: + type: integer + description: Minimum population for a many instance + LANGUAGE: + type: object + description: Language-related constants + properties: + SPOKEN_LANGUAGE_OPTIONS: + type: object + description: Supported spoken language options + additionalProperties: + type: string + required: + - GROUPS + - INSTANCE + - LANGUAGE + APIConfigDownloadURLList: + title: APIConfigDownloadURLList + type: object + description: Download links for various development assets. + additionalProperties: false + properties: + bootstrap: + type: string + description: Download link for ??? + minLength: 1 + sdk2: + deprecated: true + type: string + description: Download link for legacy SDK2 + minLength: 1 + sdk3-avatars: + type: string + description: Download link for SDK3 for Avatars + minLength: 1 + sdk3-worlds: + type: string + description: Download link for SDK3 for Worlds + minLength: 1 + vcc: + type: string + description: Download link for the Creator Companion + minLength: 1 + required: + - bootstrap + - sdk2 + - sdk3-avatars + - sdk3-worlds + - vcc + DynamicContentRow: + title: DynamicContentRow + type: object + properties: + index: + type: integer + minimum: 0 + name: + type: string + minLength: 1 + platform: + $ref: '#/components/schemas/Platform' + description: Usually "ThisPlatformSupported", but can also be other values such as "all" or platform specific identifiers. + minLength: 1 + sortHeading: + type: string + minLength: 1 + sortOrder: + type: string + minLength: 1 + sortOwnership: + type: string + minLength: 1 + tag: + $ref: '#/components/schemas/Tag' + description: Tag to filter content for this row. + minLength: 1 + type: + type: string + description: Type is not present if it is a world. + example: avatar + required: + - name + - platform + - sortHeading + - sortOrder + - sortOwnership + APIConfigEvents: + title: APIConfigEvents + type: object + properties: + distanceClose: + type: integer + description: Unknown + distanceFactor: + type: integer + description: Unknown + distanceFar: + type: integer + description: Unknown + groupDistance: + type: integer + description: Unknown + maximumBunchSize: + type: integer + description: Unknown + notVisibleFactor: + type: integer + description: Unknown + playerOrderBucketSize: + type: integer + description: Unknown + playerOrderFactor: + type: integer + description: Unknown + slowUpdateFactorThreshold: + type: integer + description: Unknown + useDirectPlayerSerialization: + type: boolean + description: Unknown + viewSegmentLength: + type: integer + description: Unknown + required: + - distanceClose + - distanceFactor + - distanceFar + - groupDistance + - maximumBunchSize + - notVisibleFactor + - playerOrderBucketSize + - playerOrderFactor + - slowUpdateFactorThreshold + - useDirectPlayerSerialization + - viewSegmentLength + PlatformBuildInfo: + title: PlatformBuildInfo + type: object + description: Build information for a platform + properties: + minBuildNumber: + type: integer + description: Minimum build number required for the platform + redirectionAddress: + type: string + description: Redirection URL for updating the app + required: + - minBuildNumber + ReportCategory: + title: ReportCategory + type: object + description: A category used for reporting content + properties: + description: + type: string + description: The description of the report category + text: + type: string + description: The label of the report category + title: + type: string + description: The title of the report category + tooltip: + type: string + description: The tooltip that describes the category + required: + - text + - tooltip + ReportReason: + title: ReportReason + type: object + description: A reason used for reporting users + properties: + text: + type: string + description: The label or name of the report reason + tooltip: + type: string + description: A brief explanation of what this reason entails + required: + - text + - tooltip + APIConfig: + title: APIConfig + type: object + description: Global configuration for various features. + properties: + CampaignStatus: + type: string + description: The current platform-wide event taking place + DisableBackgroundPreloads: + type: boolean + description: Toggles if certain assets are preloaded in the background + default: true + LocationGiftingNonSubPrioEnabled: + type: boolean + description: Toggles whether users without a current VRC+ subscription are priority recipients for gift drops + default: true + VoiceEnableDegradation: + type: boolean + description: Unknown, probably voice optimization testing + default: false + VoiceEnableReceiverLimiting: + type: boolean + description: Unknown, probably voice optimization testing + default: true + accessLogsUrls: + type: object + properties: + Default: + type: string + example: https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR + format: uri + Pico: + type: string + example: https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR + format: uri + Quest: + type: string + example: https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR + format: uri + XRElite: + type: string + example: https://help.vrchat.com/hc/en-us/articles/9521522810899-Where-do-I-find-my-output-logs#h_01HT1ZV67JGKX5AE4R1P28XMXR + format: uri + address: + type: string + description: VRChat's office address + minLength: 1 + ageVerificationInviteVisible: + type: boolean + ageVerificationP: + type: boolean + ageVerificationStatusVisible: + type: boolean + analysisMaxRetries: + type: integer + description: Max retries for avatar analysis requests + analysisRetryInterval: + type: integer + description: Interval between retries for avatar analysis requests + analyticsSegment_NewUI_PctOfUsers: + type: integer + description: Unknown + analyticsSegment_NewUI_Salt: + type: string + description: Unknown + announcements: + type: array + description: Public Announcements + items: + $ref: '#/components/schemas/APIConfigAnnouncement' + minItems: 0 + uniqueItems: true + audioConfig: + $ref: '#/components/schemas/APIConfigAudioConfig' + availableLanguageCodes: + type: array + description: List of supported Languages + items: + type: string + availableLanguages: + type: array + description: List of supported Languages + items: + type: string + avatarPerfLimiter: + type: object + properties: + AndroidMobile: + $ref: '#/components/schemas/PerformanceLimiterInfo' + PC: + $ref: '#/components/schemas/PerformanceLimiterInfo' + Pico: + $ref: '#/components/schemas/PerformanceLimiterInfo' + Quest: + $ref: '#/components/schemas/PerformanceLimiterInfo' + XRElite: + $ref: '#/components/schemas/PerformanceLimiterInfo' + iOSMobile: + $ref: '#/components/schemas/PerformanceLimiterInfo' + required: + - AndroidMobile + - PC + - Pico + - Quest + - XRElite + - iOSMobile + chatboxLogBufferSeconds: + type: integer + description: Unknown + default: 40 + clientApiKey: + type: string + description: apiKey to be used for all other requests + minLength: 1 + clientBPSCeiling: + type: integer + description: Unknown + default: 18432 + clientDisconnectTimeout: + type: integer + description: Unknown + default: 30000 + clientNetDispatchThread: + type: boolean + description: Unknown + default: false + clientNetDispatchThreadMobile: + type: boolean + description: Unknown + default: true + clientNetInThread: + type: boolean + description: Unknown + default: false + clientNetInThread2: + type: boolean + description: Unknown + default: false + clientNetInThreadMobile: + type: boolean + description: Unknown + default: false + clientNetInThreadMobile2: + type: boolean + description: Unknown + default: false + clientNetOutThread: + type: boolean + description: Unknown + default: false + clientNetOutThread2: + type: boolean + description: Unknown + default: false + clientNetOutThreadMobile: + type: boolean + description: Unknown + default: false + clientNetOutThreadMobile2: + type: boolean + description: Unknown + default: false + clientQR: + type: integer + description: Unknown + default: 1 + clientReservedPlayerBPS: + type: integer + description: Unknown + default: 7168 + clientSentCountAllowance: + type: integer + description: Unknown + default: 15 + constants: + $ref: '#/components/schemas/APIConfigConstants' + contactEmail: + type: string + description: VRChat's contact email + minLength: 1 + copyrightEmail: + type: string + description: VRChat's copyright-issues-related email + minLength: 1 + copyrightFormUrl: + type: string + description: VRChat's DMCA claim webform url + minLength: 1 + currentPrivacyVersion: + type: integer + description: Current version number of the Privacy Agreement + default: 1 + currentTOSVersion: + type: integer + description: Current version number of the Terms of Service + example: 7 + minimum: 0 + defaultAvatar: + $ref: '#/components/schemas/AvatarID' + defaultStickerSet: + type: string + devLanguageCodes: + type: array + description: Unknown + items: + type: string + devSdkUrl: + deprecated: true + type: string + description: Link to download the development SDK, use downloadUrls instead + minLength: 1 + devSdkVersion: + deprecated: true + type: string + description: Version of the development SDK + minLength: 1 + dis-countdown: + type: string + description: Unknown, "dis" maybe for disconnect? + format: date-time + disableAVProInProton: + type: boolean + description: Unknown + default: false + disableAvatarCopying: + type: boolean + description: Toggles if copying avatars should be disabled + default: false + disableAvatarGating: + type: boolean + description: 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 + default: false + disableCaptcha: + type: boolean + description: Unknown + default: true + disableCommunityLabs: + type: boolean + description: Toggles if the Community Labs should be disabled + default: false + disableCommunityLabsPromotion: + type: boolean + description: Toggles if promotion out of Community Labs should be disabled + default: false + disableEmail: + type: boolean + description: Unknown + default: false + disableEventStream: + type: boolean + description: Toggles if Analytics should be disabled. + default: false + disableFeedbackGating: + type: boolean + description: 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. + default: false + disableFrontendBuilds: + type: boolean + description: Unknown, probably toggles compilation of frontend web builds? So internal flag? + default: false + disableGiftDrops: + type: boolean + description: Toggles if gift drops should be disabled + default: false + disableHello: + type: boolean + description: Unknown + default: false + disableOculusSubs: + type: boolean + description: Toggles if signing up for Subscriptions in Oculus is disabled or not. + default: false + disableRegistration: + type: boolean + description: Toggles if new user account registration should be disabled. + default: false + disableSteamNetworking: + type: boolean + description: Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead. + default: true + disableTwoFactorAuth: + deprecated: true + type: boolean + description: Toggles if 2FA should be disabled. + default: false + disableUdon: + type: boolean + description: Toggles if Udon should be universally disabled in-game. + default: false + disableUpgradeAccount: + type: boolean + description: Toggles if account upgrading "linking with Steam/Oculus" should be disabled. + default: false + downloadLinkWindows: + type: string + description: Download link for game on the Oculus Rift website. + minLength: 1 + downloadUrls: + $ref: '#/components/schemas/APIConfigDownloadURLList' + dynamicWorldRows: + type: array + description: Array of DynamicWorldRow objects, used by the game to display the list of world rows + items: + $ref: '#/components/schemas/DynamicContentRow' + minItems: 1 + uniqueItems: true + economyLedgerBackfill: + type: boolean + description: Unknown + economyLedgerMigrationStop: + type: string + description: Unknown + economyLedgerMode: + type: string + description: Unknown + economyPauseEnd: + type: string + description: Unknown + format: date-time + economyPauseStart: + type: string + description: Unknown + format: date-time + economyPurchaseRepairEnabled: + type: boolean + description: Unknown + economyState: + type: integer + description: Unknown + default: 1 + events: + $ref: '#/components/schemas/APIConfigEvents' + forceUseLatestWorld: + type: boolean + description: Unknown + default: true + giftDisplayType: + type: string + description: Display type of gifts + googleApiClientId: + type: string + description: Unknown + default: 827942544393-r2ouvckvouldn9dg9uruseje575e878f.apps.googleusercontent.com + homeWorldId: + $ref: '#/components/schemas/WorldID' + homepageRedirectTarget: + type: string + description: Redirect target if you try to open the base API domain in your browser + default: https://hello.vrchat.com + minLength: 1 + hubWorldId: + $ref: '#/components/schemas/WorldID' + imageHostUrlList: + type: array + description: 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). + items: + type: string + iosAppVersion: + type: array + description: Current app version for iOS + items: + type: string + iosVersion: + type: object + description: Current version for iOS + properties: + major: + type: integer + minor: + type: integer + required: + - major + - minor + jobsEmail: + type: string + description: VRChat's job application email + minLength: 1 + maxUserEmoji: + type: integer + description: The maximum number of custom emoji each user may have at a given time. + default: 18 + maxUserStickers: + type: integer + description: The maximum number of custom stickers each user may have at a given time. + default: 18 + minSupportedClientBuildNumber: + type: object + description: Minimum supported client build number for various platforms + properties: + AppStore: + $ref: '#/components/schemas/PlatformBuildInfo' + Default: + $ref: '#/components/schemas/PlatformBuildInfo' + Firebase: + $ref: '#/components/schemas/PlatformBuildInfo' + FirebaseiOS: + $ref: '#/components/schemas/PlatformBuildInfo' + GooglePlay: + $ref: '#/components/schemas/PlatformBuildInfo' + PC: + $ref: '#/components/schemas/PlatformBuildInfo' + PicoStore: + $ref: '#/components/schemas/PlatformBuildInfo' + QuestAppLab: + $ref: '#/components/schemas/PlatformBuildInfo' + QuestStore: + $ref: '#/components/schemas/PlatformBuildInfo' + TestFlight: + $ref: '#/components/schemas/PlatformBuildInfo' + XRElite: + $ref: '#/components/schemas/PlatformBuildInfo' + required: + - AppStore + - Default + - Firebase + - FirebaseiOS + - GooglePlay + - PC + - PicoStore + - QuestAppLab + - QuestStore + - TestFlight + - XRElite + minimumUnityVersionForUploads: + type: string + description: Minimum Unity version required for uploading assets + default: 2019.0.0f1 + moderationEmail: + type: string + description: VRChat's moderation related email + minLength: 1 + notAllowedToSelectAvatarInPrivateWorldMessage: + type: string + description: Used in-game to notify a user they aren't allowed to select avatars in private worlds + minLength: 1 + offlineAnalysis: + type: object + description: Whether to allow offline analysis + properties: + android: + type: boolean + description: Whether to allow offline analysis + default: true + standalonewindows: + type: boolean + description: Whether to allow offline analysis + default: true + photonNameserverOverrides: + type: array + description: Unknown + items: + type: string + photonPublicKeys: + type: array + description: Unknown + items: + type: string + player-url-resolver-sha1: + type: string + description: Currently used youtube-dl.exe hash in SHA1-delimited format + minLength: 1 + player-url-resolver-version: + type: string + description: Currently used youtube-dl.exe version + minLength: 1 + publicKey: + type: string + description: Public key, hex encoded + reportCategories: + type: object + description: Categories available for reporting objectionable content + additionalProperties: + $ref: '#/components/schemas/ReportCategory' + reportFormUrl: + type: string + description: URL to the report form + default: 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} + reportOptions: + type: object + description: |- + 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. + additionalProperties: + type: object + additionalProperties: + type: array + items: + type: string + reportReasons: + type: object + description: Reasons available for submitting a report + additionalProperties: + $ref: '#/components/schemas/ReportReason' + requireAgeVerificationBetaTag: + type: boolean + sdkDeveloperFaqUrl: + type: string + description: Link to the developer FAQ + minLength: 1 + sdkDiscordUrl: + type: string + description: Link to the official VRChat Discord + minLength: 1 + sdkNotAllowedToPublishMessage: + type: string + description: Used in the SDK to notify a user they aren't allowed to upload avatars/worlds yet + minLength: 1 + sdkUnityVersion: + type: string + description: Unity version supported by the SDK + minLength: 1 + stringHostUrlList: + type: array + description: 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). + items: + type: string + supportEmail: + type: string + description: VRChat's support email + minLength: 1 + supportFormUrl: + type: string + description: VRChat's support form + timeOutWorldId: + $ref: '#/components/schemas/WorldID' + timekeeping: + type: boolean + description: Unknown + default: true + tutorialWorldId: + $ref: '#/components/schemas/WorldID' + updateRateMsMaximum: + type: integer + description: Unknown + updateRateMsMinimum: + type: integer + description: Unknown + updateRateMsNormal: + type: integer + description: Unknown + updateRateMsUdonManual: + type: integer + description: Unknown + uploadAnalysisPercent: + type: integer + description: Unknown + urlList: + type: array + description: List of allowed URLs that bypass the "Allow untrusted URL's" setting in-game + items: + type: string + useReliableUdpForVoice: + type: boolean + description: Unknown + default: false + viveWindowsUrl: + type: string + description: Download link for game on the Steam website. + minLength: 1 + websocketMaxFriendsRefreshDelay: + type: integer + description: Unknown + default: 900 + websocketQuickReconnectTime: + type: integer + description: Unknown + default: 2 + websocketReconnectMaxDelay: + type: integer + description: Unknown + default: 2 + whiteListedAssetUrls: + type: array + description: List of allowed URLs that are allowed to host avatar assets + items: + type: string + required: + - 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 + LicenseAction: + title: LicenseAction + type: string + enum: + - have + - wear + default: have + example: have + LicenseType: + title: LicenseType + type: string + enum: + - avatar + - licenseGroup + - permission + - product + default: permission + example: permission + License: + title: License + type: object + properties: + forAction: + $ref: '#/components/schemas/LicenseAction' + forId: + type: string + description: Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. + minLength: 1 + forName: + type: string + minLength: 1 + forType: + $ref: '#/components/schemas/LicenseType' + required: + - forAction + - forId + - forName + - forType + EarningsMetrics: + title: EarningsMetrics + type: object + properties: + breakdown: + type: array + items: + type: object + sellerId: + $ref: '#/components/schemas/UserID' + totals: + type: object + properties: + otpEarnings: + type: integer + minimum: 0 + otpPurchaseCount: + type: integer + minimum: 0 + subscriberEarnings: + type: integer + minimum: 0 + subscriberMonths: + type: integer + minimum: 0 + totalEarnings: + type: integer + minimum: 0 + required: + - otpEarnings + - otpPurchaseCount + - subscriberEarnings + - subscriberMonths + - totalEarnings + required: + - breakdown + - sellerId + - totals + ProductPurchaseLocationType: + title: ProductPurchaseLocationType + type: string + enum: + - client_avatar_marketplace + - client_creator_store + - client_group_store + - client_world_component + - client_world_store + - undefined + - web_any + - web_avatar_marketplace + - web_creator_store + - web_group_store + - web_world_store + default: web_group_store + StoreID: + title: StoreID + type: string + example: esto_713b247d-2b5d-41a0-bba3-50db28dc1498 + ProductID: + title: ProductID + type: string + example: prod_bfbc2315-247a-44d7-bfea-5237f8d56cb4 + ProductListingVariantID: + title: ProductListingVariantID + type: string + example: listvar_e8658b56-1662-436c-935a-afcf6a7d4fed + PurchaseProductListingRequest: + title: PurchaseProductListingRequest + type: object + properties: + contextData: + title: PurchaseContextData + type: object + properties: + locationType: + $ref: '#/components/schemas/ProductPurchaseLocationType' + storeId: + $ref: '#/components/schemas/StoreID' + worldId: + $ref: '#/components/schemas/WorldID' + required: + - locationType + listingId: + $ref: '#/components/schemas/ProductID' + listingVariantId: + $ref: '#/components/schemas/ProductListingVariantID' + quantity: + type: integer + default: 1 + maximum: 99 + minimum: 1 + receiverId: + $ref: '#/components/schemas/UserID' + stackable: + type: boolean + totalPrice: + type: integer + minimum: 0 + required: + - listingId + - quantity + - totalPrice + ProductListingType: + title: ProductListingType + type: string + enum: + - duration + - instant + - permanent + - subscription + default: subscription + ProductType: + title: ProductType + type: string + enum: + - inventory + - listing + - role + - udon + default: udon + ProductPurchaseProduct: + title: ProductPurchaseProduct + type: object + properties: + displayName: + type: string + id: + $ref: '#/components/schemas/ProductID' + imageId: + $ref: '#/components/schemas/FileID' + nullable: true + licenseId: + type: string + nullable: true + productType: + $ref: '#/components/schemas/ProductType' + required: + - displayName + - id + - productType + ProductPurchaseID: + title: ProductPurchaseID + type: string + example: pur_f0446b91-e0f7-403e-8932-609d5057898c + ProductPurchase: + title: ProductPurchase + type: object + properties: + buyerDisplayName: + type: string + buyerId: + $ref: '#/components/schemas/UserID' + firstParty: + type: boolean + isBuyer: + type: boolean + isGift: + type: boolean + isReceiver: + type: boolean + isSeller: + type: boolean + ledgerTransactionId: + type: integer + listingCurrentlyAvailable: + type: boolean + listingDescription: + type: string + listingDisplayName: + type: string + listingId: + $ref: '#/components/schemas/ProductID' + listingImageId: + $ref: '#/components/schemas/FileID' + nullable: true + listingSubtitle: + type: string + listingType: + $ref: '#/components/schemas/ProductListingType' + products: + type: array + items: + $ref: '#/components/schemas/ProductPurchaseProduct' + purchaseActive: + type: boolean + purchaseContext: + type: object + properties: + locationType: + type: string + example: undefined + worldId: + $ref: '#/components/schemas/WorldID' + worldName: + type: string + purchaseCurrentStatus: + type: string + purchaseDate: + type: string + format: date-time + purchaseDuration: + type: integer + purchaseDurationType: + type: string + purchaseEndDate: + type: string + nullable: true + format: date-time + purchaseFee: + type: integer + purchaseId: + $ref: '#/components/schemas/ProductPurchaseID' + purchaseLatest: + type: boolean + purchasePrice: + type: integer + purchaseQuantity: + type: integer + purchaseStartDate: + type: string + nullable: true + format: date-time + purchaseToken: + type: object + nullable: true + purchaseType: + type: string + purchaseUnitPrice: + type: integer + purchaseValue: + type: integer + receiverDisplayName: + type: string + receiverId: + $ref: '#/components/schemas/UserID' + recurrable: + type: boolean + refundable: + type: boolean + sellerDisplayName: + type: string + sellerId: + $ref: '#/components/schemas/UserID' + stackable: + type: boolean + willRecur: + type: boolean + required: + - 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 + SortOptionProductPurchase: + title: SortOptionProductPurchase + type: string + enum: + - purchaseDate + default: purchaseDate + example: purchaseDate + OrderOptionShort: + title: OrderOptionShort + type: string + enum: + - asc + - desc + default: desc + example: desc + SellerEligibility: + title: SellerEligibility + type: object + properties: + eligible: + type: boolean + required: + - eligible + Product: + title: Product + type: object + properties: + archived: + type: boolean + created: + type: string + format: date-time + description: + type: string + displayName: + type: string + groupAccess: + type: boolean + default: false + groupAccessRemove: + type: boolean + default: false + groupId: + $ref: '#/components/schemas/GroupID' + groupRoleId: + $ref: '#/components/schemas/GroupRoleID' + id: + $ref: '#/components/schemas/ProductID' + imageId: + $ref: '#/components/schemas/FileID' + nullable: true + imageUrl: + type: string + nullable: true + parentListings: + type: array + items: + $ref: '#/components/schemas/ProductID' + productType: + $ref: '#/components/schemas/ProductType' + productTypeLabel: + type: string + purchaseCount: + type: integer + purchaseCountQuantity: + type: integer + sellerDisplayName: + type: string + sellerId: + type: string + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + updated: + type: string + nullable: true + format: date-time + useForSubscriberList: + type: boolean + default: false + required: + - description + - displayName + - id + - imageId + - parentListings + - productType + - sellerDisplayName + - sellerId + - tags + ProductListingVariant: + title: ProductListingVariant + type: object + properties: + effectiveFrom: + type: string + format: date-time + listingVariantId: + $ref: '#/components/schemas/ProductListingVariantID' + nullable: true + nonRefundable: + type: boolean + quantity: + type: integer + sellerVariant: + type: boolean + unitPriceTokens: + type: integer + required: + - listingVariantId + - nonRefundable + - quantity + - sellerVariant + - unitPriceTokens + ProductListing: + title: Listing + type: object + properties: + active: + type: boolean + archived: + type: boolean + buyerRefundable: + type: boolean + created: + type: string + format: date-time + description: + type: string + displayName: + type: string + duration: + type: integer + nullable: true + durationType: + type: string + nullable: true + groupIcon: + $ref: '#/components/schemas/FileID' + nullable: true + groupId: + $ref: '#/components/schemas/GroupID' + groupName: + type: string + nullable: true + hasAvatar: + type: boolean + hasUdon: + type: boolean + hydratedProducts: + type: array + items: + $ref: '#/components/schemas/Product' + id: + $ref: '#/components/schemas/ProductID' + imageId: + $ref: '#/components/schemas/FileID' + nullable: true + imageUrl: + type: string + nullable: true + listingType: + $ref: '#/components/schemas/ProductListingType' + listingVariants: + type: array + items: + $ref: '#/components/schemas/ProductListingVariant' + permanent: + type: boolean + priceTokens: + type: integer + productIds: + type: array + items: + $ref: '#/components/schemas/ProductID' + productType: + $ref: '#/components/schemas/ProductType' + products: + type: array + items: + type: object + description: Either a ProductID or a Product, depending on hydration + purchaseCount: + type: integer + purchaseCountQuantity: + type: integer + quantifiable: + type: boolean + recurrable: + type: boolean + refundable: + type: boolean + sellerDisplayName: + type: string + sellerId: + type: string + soldByVrc: + type: boolean + stackable: + type: boolean + storeIds: + type: array + items: + type: string + subtitle: + type: string + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + updated: + type: string + format: date-time + vrcPlusDiscountPrice: + type: integer + whenToExpire: + type: string + nullable: true + format: date-time + required: + - active + - buyerRefundable + - description + - displayName + - hasAvatar + - hasUdon + - id + - listingType + - priceTokens + - productIds + - productType + - products + - recurrable + - refundable + - sellerDisplayName + - sellerId + - stackable + - storeIds + StoreShelfID: + title: StoreShelfID + type: string + example: ess_964dd7aa-f881-4ba1-adf7-261e906b9189 + StoreShelf: + title: StoreShelf + type: object + properties: + highlightListing: + $ref: '#/components/schemas/ProductListing' + highlightListingId: + $ref: '#/components/schemas/ProductID' + id: + $ref: '#/components/schemas/StoreShelfID' + listingIds: + type: array + items: + $ref: '#/components/schemas/ProductID' + listings: + type: array + items: + $ref: '#/components/schemas/ProductListing' + shelfDescription: + type: string + shelfLayout: + type: string + shelfTitle: + type: string + updatedAt: + type: string + format: date-time + required: + - id + - listingIds + - shelfDescription + - shelfLayout + - shelfTitle + - updatedAt + StoreContext: + title: StoreContext + type: object + properties: + id: + type: string + imageUrl: + type: string + nullable: true + name: + type: string + required: + - id + - imageUrl + - name + StoreType: + title: StoreType + type: string + enum: + - group + - house + - world + default: group + Store: + title: Store + type: object + properties: + created: + type: string + format: date-time + description: + type: string + displayName: + type: string + groupId: + $ref: '#/components/schemas/GroupID' + description: Only for store type group + id: + $ref: '#/components/schemas/StoreID' + listingIds: + type: array + description: Only for store type world and group + items: + $ref: '#/components/schemas/ProductID' + listings: + type: array + description: Only for store type world and group + items: + $ref: '#/components/schemas/ProductListing' + sellerDisplayName: + type: string + sellerId: + $ref: '#/components/schemas/UserID' + shelfIds: + type: array + description: Only for store type house + items: + $ref: '#/components/schemas/StoreShelfID' + shelves: + type: array + description: Only for store type house + items: + $ref: '#/components/schemas/StoreShelf' + storeContext: + $ref: '#/components/schemas/StoreContext' + storeId: + $ref: '#/components/schemas/StoreID' + storeStatus: + type: string + storeType: + $ref: '#/components/schemas/StoreType' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + updated: + type: string + format: date-time + worldId: + $ref: '#/components/schemas/WorldID' + description: Only for store type world + required: + - description + - displayName + - id + - sellerDisplayName + - sellerId + - storeId + - storeType + - tags + StoreView: + title: StoreView + type: string + enum: + - all + - draft + - preview + - public + - publicPreview + default: public + FavoriteType: + title: FavoriteType + type: string + enum: + - avatar + - friend + - vrcPlusWorld + - world + default: friend + FavoriteName: + title: FavoriteName + type: string + default: group_0 + example: | + avatar: [ avatars1, avatars2, avatars3, avatars4, avatars5, avatars6 ] friend: [ group_0, group_1, group_2 ] vrcPlusWorld: [ vrcPlusWorlds1, vrcPlusWorlds2, vrcPlusWorlds3, vrcPlusWorlds4 ] world: [ worlds1, worlds2, worlds3, worlds4 ] + FavoriteGroupID: + title: FavoriteGroupID + type: string + example: fvgrp_8a02a44b-dc3a-4a9a-bc77-77fa37996fc7 + FavoriteGroupVisibility: + title: FavoriteGroupVisibility + type: string + enum: + - friends + - private + - public + default: private + example: private + FavoriteGroup: + title: FavoriteGroup + type: object + description: '' + properties: + displayName: + type: string + minLength: 1 + id: + $ref: '#/components/schemas/FavoriteGroupID' + name: + type: string + minLength: 1 + ownerDisplayName: + type: string + minLength: 1 + ownerId: + $ref: '#/components/schemas/UserID' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + type: + $ref: '#/components/schemas/FavoriteType' + visibility: + $ref: '#/components/schemas/FavoriteGroupVisibility' + required: + - displayName + - id + - name + - ownerDisplayName + - ownerId + - tags + - type + - visibility + UpdateFavoriteGroupRequest: + title: UpdateFavoriteGroupRequest + type: object + properties: + displayName: + type: string + tags: + type: array + description: Tags on FavoriteGroups are believed to do nothing. + items: + $ref: '#/components/schemas/Tag' + visibility: + $ref: '#/components/schemas/FavoriteGroupVisibility' + FavoriteID: + title: FavoriteID + type: string + example: fvrt_9568d189-8776-44a5-a8c8-defc981e44de + Favorite: + title: Favorite + type: object + description: '' + properties: + favoriteId: + type: string + description: MUST be either AvatarID, UserID or WorldID. + id: + $ref: '#/components/schemas/FavoriteID' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + type: + $ref: '#/components/schemas/FavoriteType' + required: + - favoriteId + - id + - tags + - type + AddFavoriteRequest: + type: object + properties: + favoriteId: + type: string + description: Must be either AvatarID, WorldID or UserID. + tags: + type: array + description: 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. + items: + $ref: '#/components/schemas/Tag' + type: + $ref: '#/components/schemas/FavoriteType' + required: + - favoriteId + - tags + - type + MIMEType: + title: MIMEType + type: string + enum: + - application/gzip + - application/octet-stream + - application/x-avatar + - application/x-prop + - application/x-rsync-delta + - application/x-rsync-signature + - application/x-world + - image/bmp + - image/gif + - image/jpeg + - image/jpg + - image/png + - image/svg+xml + - image/tiff + - image/webp + default: image/jpeg + example: image/jpeg + CreateFileRequest: + title: CreateFileRequest + type: object + properties: + extension: + type: string + minLength: 1 + mimeType: + $ref: '#/components/schemas/MIMEType' + name: + type: string + minLength: 0 + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + required: + - extension + - mimeType + - name + ImageAnimationStyle: + title: ImageAnimationStyle + type: string + description: Animation style for images. + enum: + - aura + - bats + - bees + - bounce + - cloud + - confetti + - crying + - dislike + - fire + - idea + - lasers + - like + - magnet + - mistletoe + - money + - noise + - orbit + - pizza + - rain + - rotate + - shake + - snow + - snowball + - spin + - splash + - stop + - zzz + example: bats + ImageLoopStyle: + title: ImageLoopStyle + type: string + description: Animation looping style for images. + enum: + - linear + - pingpong + default: linear + ImageMask: + title: ImageMask + type: string + description: Mask shape for images. + enum: + - circle + - flower + - heart + - pow + - square + - star + default: square + example: circle + FileStatus: + title: FileStatus + type: string + enum: + - complete + - none + - queued + - waiting + default: waiting + example: complete + FileData: + title: FileData + type: object + description: '' + properties: + category: + type: string + enum: + - multipart + - queued + - simple + default: queued + minLength: 1 + fileName: + type: string + minLength: 1 + md5: + type: string + minLength: 0 + sizeInBytes: + type: integer + minimum: 0 + status: + $ref: '#/components/schemas/FileStatus' + uploadId: + type: string + default: '' + minLength: 0 + url: + type: string + minLength: 1 + required: + - category + - fileName + - sizeInBytes + - status + - uploadId + - url + FileVersion: + title: FileVersion + type: object + description: '' + properties: + created_at: + type: string + format: date-time + deleted: + type: boolean + description: Usually only present if `true` + default: true + delta: + $ref: '#/components/schemas/FileData' + file: + $ref: '#/components/schemas/FileData' + signature: + $ref: '#/components/schemas/FileData' + status: + $ref: '#/components/schemas/FileStatus' + version: + type: integer + description: Incremental version counter, can only be increased. + default: 0 + minimum: 0 + required: + - created_at + - status + - version + File: + title: File + type: object + description: '' + properties: + animationStyle: + $ref: '#/components/schemas/ImageAnimationStyle' + extension: + type: string + example: .unitypackage + minLength: 1 + frames: + type: integer + description: The number of frames for animated spritesheet images. + maximum: 64 + minimum: 2 + framesOverTime: + type: integer + description: The frames per second for animated spritesheet images. + maximum: 64 + minimum: 1 + id: + $ref: '#/components/schemas/FileID' + loopStyle: + $ref: '#/components/schemas/ImageLoopStyle' + maskTag: + $ref: '#/components/schemas/ImageMask' + mimeType: + $ref: '#/components/schemas/MIMEType' + modifiedThumbnailFileName: + type: string + example: thumbnails/file_00000000-0000-0000-0000-000000000000.ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.1.modified-thumbnail-256.png + name: + type: string + description: '' + example: Example File + minLength: 0 + ownerId: + $ref: '#/components/schemas/UserID' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + versions: + type: array + description: ' ' + items: + $ref: '#/components/schemas/FileVersion' + minItems: 1 + uniqueItems: true + required: + - extension + - id + - mimeType + - name + - ownerId + - tags + - versions + ImagePurpose: + title: ImagePurpose + type: string + description: Indication of the purpose for uploading images. + enum: + - admin + - avatargallery + - avatarimage + - bundle + - emoji + - emojianimated + - gallery + - icon + - listinggallery + - product + - sticker + default: gallery + example: emojianimated + CreateFileVersionRequest: + title: CreateFileVersionRequest + type: object + properties: + fileMd5: + type: string + minLength: 1 + fileSizeInBytes: + type: integer + signatureMd5: + type: string + minLength: 1 + signatureSizeInBytes: + type: integer + required: + - signatureMd5 + - signatureSizeInBytes + FinishFileDataUploadRequest: + title: FinishFileDataUploadRequest + type: object + description: '' + properties: + etags: + type: array + description: Array of ETags uploaded. + items: + type: string + minItems: 1 + uniqueItems: true + maxParts: + deprecated: true + type: string + description: Always a zero in string form, despite how many parts uploaded. + default: '0' + example: '0' + maxLength: 1 + minLength: 1 + nextPartNumber: + deprecated: true + type: string + description: Always a zero in string form, despite how many parts uploaded. + default: '0' + example: '0' + maxLength: 1 + minLength: 1 + required: + - maxParts + - nextPartNumber + FileUploadURL: + title: FileUploadURL + type: object + description: '' + properties: + url: + type: string + description: '' + minLength: 1 + required: + - url + FileVersionUploadStatus: + title: FileVersionUploadStatus + type: object + description: '' + properties: + etags: + type: array + description: Unknown + items: + type: object + minItems: 0 + fileName: + type: string + example: Avatar-MyAvatar-Un.file_00000000-0000-0000-0000-000000000000.1.unitypackage + minLength: 1 + maxParts: + type: integer + example: 1000 + minimum: 1 + nextPartNumber: + type: integer + example: 0 + minimum: 0 + parts: + type: array + items: + type: object + minItems: 0 + uploadId: + type: string + example: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxx + minLength: 1 + required: + - etags + - fileName + - maxParts + - nextPartNumber + - parts + - uploadId + GroupGalleryID: + title: GroupGalleryID + type: string + example: ggal_a03a4b55-4ca6-4490-9519-40ba6351a233 + GroupGalleryFileOrderRequest: + title: GroupGalleryFileOrderRequest + type: object + properties: + galleryId: + $ref: '#/components/schemas/GroupGalleryID' + ids: + type: array + items: + $ref: '#/components/schemas/FileID' + required: + - galleryId + - ids + GroupGalleryFileOrder: + title: GroupGalleryFileOrder + type: object + properties: + ids: + type: array + items: + $ref: '#/components/schemas/FileID' + required: + - ids + GroupDiscriminator: + title: GroupDiscriminator + type: string + example: '0000' + GroupGallery: + title: GroupGallery + type: object + properties: + createdAt: + type: string + format: date-time + description: + type: string + description: Description of the gallery. + example: Example Description + minLength: 0 + id: + $ref: '#/components/schemas/GroupGalleryID' + membersOnly: + type: boolean + description: Whether the gallery is members only. + default: false + example: false + name: + type: string + description: Name of the gallery. + example: Example Gallery + minLength: 1 + roleIdsToAutoApprove: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToManage: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToSubmit: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToView: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + updatedAt: + type: string + format: date-time + GroupMemberStatus: + type: string + enum: + - banned + - inactive + - invited + - member + - requested + - userblocked + default: inactive + example: member + GroupShortCode: + title: GroupShortCode + type: string + example: VRCHAT + LimitedGroup: + title: LimitedGroup + type: object + properties: + bannerId: + type: string + nullable: true + bannerUrl: + type: string + nullable: true + createdAt: + type: string + format: date-time + description: + type: string + discriminator: + $ref: '#/components/schemas/GroupDiscriminator' + galleries: + type: array + description: ' ' + items: + $ref: '#/components/schemas/GroupGallery' + iconId: + type: string + nullable: true + iconUrl: + type: string + nullable: true + id: + $ref: '#/components/schemas/GroupID' + isSearchable: + type: boolean + memberCount: + type: integer + membershipStatus: + $ref: '#/components/schemas/GroupMemberStatus' + name: + type: string + ownerId: + $ref: '#/components/schemas/UserID' + rules: + type: string + nullable: true + shortCode: + $ref: '#/components/schemas/GroupShortCode' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + GroupJoinState: + title: GroupJoinState + type: string + enum: + - closed + - invite + - open + - request + default: open + GroupPrivacy: + title: GroupPrivacy + type: string + enum: + - default + - private + default: default + GroupRoleTemplate: + title: GroupRoleTemplate + type: string + enum: + - default + - managedFree + - managedInvite + - managedRequest + default: default + CreateGroupRequest: + title: CreateGroupRequest + type: object + properties: + bannerId: + type: string + nullable: true + default: null + description: + type: string + maxLength: 250 + minLength: 0 + iconId: + type: string + nullable: true + default: null + joinState: + $ref: '#/components/schemas/GroupJoinState' + name: + type: string + maxLength: 64 + minLength: 3 + privacy: + $ref: '#/components/schemas/GroupPrivacy' + roleTemplate: + $ref: '#/components/schemas/GroupRoleTemplate' + shortCode: + type: string + maxLength: 6 + minLength: 3 + required: + - name + - roleTemplate + - shortCode + GroupMemberID: + title: GroupMemberID + type: string + example: gmem_95cdb3b4-4643-4eb6-bdab-46a4e1e5ce37 + GroupPermissions: + title: GroupPermissions + type: string + enum: + - '*' + - group-announcement-manage + - group-audit-view + - group-bans-manage + - group-calendar-manage + - group-data-manage + - group-default-role-manage + - group-galleries-manage + - group-instance-age-gated-create + - group-instance-announcement-create + - group-instance-bypass-avatar-performance + - group-instance-calendar-link + - group-instance-join + - group-instance-manage + - group-instance-moderate + - group-instance-open-create + - group-instance-plus-create + - group-instance-plus-portal + - group-instance-plus-portal-unlocked + - group-instance-public-create + - group-instance-queue-priority + - group-instance-restricted-create + - group-invites-manage + - group-members-manage + - group-members-remove + - group-members-viewall + - group-roles-assign + - group-roles-manage + x-enum-varnames: + - group_all + - group_announcement_manage + - group_audit_view + - group_bans_manage + - group_calendar_manage + - group_data_manage + - group_default_role_manage + - group_galleries_manage + - group_instance_age_gated_create + - group_instance_announcement_create + - group_instance_bypass_avatar_performance + - group_instance_calendar_link + - group_instance_join + - group_instance_manage + - group_instance_moderate + - group_instance_open_create + - group_instance_plus_create + - group_instance_plus_portal + - group_instance_plus_portal_unlocked + - group_instance_public_create + - group_instance_queue_priority + - group_instance_restricted_create + - group_invites_manage + - group_members_manage + - group_members_remove + - group_members_viewall + - group_roles_assign + - group_roles_manage + GroupMyMember: + title: GroupMyMember + type: object + properties: + acceptedByDisplayName: + type: string + nullable: true + acceptedById: + type: string + nullable: true + bannedAt: + type: string + nullable: true + createdAt: + type: string + format: date-time + groupId: + $ref: '#/components/schemas/GroupID' + has2FA: + type: boolean + default: false + hasJoinedFromPurchase: + type: boolean + default: false + id: + $ref: '#/components/schemas/GroupMemberID' + isRepresenting: + type: boolean + default: false + isSubscribedToAnnouncements: + type: boolean + default: true + isSubscribedToEventAnnouncements: + type: boolean + joinedAt: + type: string + format: date-time + lastPostReadAt: + type: string + nullable: true + format: date-time + mRoleIds: + type: array + items: + type: string + managerNotes: + type: string + membershipStatus: + type: string + example: member + permissions: + type: array + items: + $ref: '#/components/schemas/GroupPermissions' + roleIds: + type: array + items: + $ref: '#/components/schemas/GroupRoleID' + userId: + $ref: '#/components/schemas/UserID' + visibility: + type: string + example: visible + GroupRole: + title: GroupRole + type: object + properties: + createdAt: + type: string + format: date-time + description: + type: string + groupId: + $ref: '#/components/schemas/GroupID' + id: + $ref: '#/components/schemas/GroupRoleID' + isManagementRole: + type: boolean + default: false + isSelfAssignable: + type: boolean + default: false + name: + type: string + order: + type: integer + permissions: + type: array + items: + $ref: '#/components/schemas/GroupPermissions' + requiresPurchase: + type: boolean + default: false + requiresTwoFactor: + type: boolean + default: false + updatedAt: + type: string + format: date-time + Group: + title: Group + type: object + properties: + ageVerificationBetaCode: + type: string + example: abc1234 + ageVerificationBetaSlots: + type: number + example: 500 + ageVerificationSlotsAvailable: + type: boolean + allowGroupJoinPrompt: + type: boolean + badges: + type: array + items: + type: string + bannerId: + type: string + nullable: true + bannerUrl: + type: string + nullable: true + createdAt: + type: string + format: date-time + description: + type: string + discriminator: + $ref: '#/components/schemas/GroupDiscriminator' + galleries: + type: array + items: + $ref: '#/components/schemas/GroupGallery' + iconId: + type: string + nullable: true + iconUrl: + type: string + nullable: true + id: + $ref: '#/components/schemas/GroupID' + isVerified: + type: boolean + default: false + joinState: + $ref: '#/components/schemas/GroupJoinState' + languages: + type: array + items: + type: string + lastPostCreatedAt: + type: string + nullable: true + format: date-time + links: + type: array + items: + type: string + memberCount: + type: integer + memberCountSyncedAt: + type: string + format: date-time + membershipStatus: + $ref: '#/components/schemas/GroupMemberStatus' + myMember: + $ref: '#/components/schemas/GroupMyMember' + nullable: true + name: + type: string + onlineMemberCount: + type: integer + ownerId: + $ref: '#/components/schemas/UserID' + privacy: + $ref: '#/components/schemas/GroupPrivacy' + roles: + type: array + description: Only returned if ?includeRoles=true is specified. + nullable: true + items: + $ref: '#/components/schemas/GroupRole' + rules: + type: string + nullable: true + shortCode: + $ref: '#/components/schemas/GroupShortCode' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + transferTargetId: + $ref: '#/components/schemas/UserID' + nullable: true + updatedAt: + type: string + format: date-time + GroupRoleTemplateValues: + title: GroupRoleTemplateValues + type: object + properties: + basePermissions: + type: array + items: + $ref: '#/components/schemas/GroupPermissions' + description: + type: string + name: + type: string + roles: + type: object + properties: + name: + type: string + description: + type: string + basePermissions: + type: array + items: + $ref: '#/components/schemas/GroupPermissions' + isAddedOnJoin: + type: boolean + default: false + required: + - basePermissions + - description + - name + - roles + UpdateGroupRequest: + title: UpdateGroupRequest + type: object + properties: + bannerId: + type: string + nullable: true + default: null + description: + type: string + maxLength: 250 + minLength: 0 + iconId: + type: string + nullable: true + default: null + joinState: + $ref: '#/components/schemas/GroupJoinState' + languages: + type: array + description: 3 letter language code + items: + type: string + maxLength: 3 + maxItems: 3 + links: + type: array + items: + type: string + maxItems: 3 + name: + type: string + maxLength: 64 + minLength: 3 + rules: + type: string + shortCode: + type: string + maxLength: 6 + minLength: 3 + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + GroupAnnouncementID: + title: GroupAnnouncementID + type: string + example: gpos_71a7ff59-112c-4e78-a990-c7cc650776e5 + GroupAnnouncement: + title: GroupAnnouncement + type: object + properties: + authorId: + $ref: '#/components/schemas/UserID' + nullable: true + createdAt: + type: string + nullable: true + format: date-time + groupId: + $ref: '#/components/schemas/GroupID' + nullable: true + id: + $ref: '#/components/schemas/GroupAnnouncementID' + nullable: true + imageId: + $ref: '#/components/schemas/FileID' + nullable: true + imageUrl: + type: string + nullable: true + text: + type: string + nullable: true + title: + type: string + nullable: true + updatedAt: + type: string + nullable: true + format: date-time + CreateGroupAnnouncementRequest: + title: CreateGroupAnnouncementRequest + type: object + properties: + imageId: + $ref: '#/components/schemas/FileID' + sendNotification: + type: boolean + description: Send notification to group members. + default: false + example: false + text: + type: string + description: Announcement text + example: Come join us for the event! + minLength: 1 + title: + type: string + description: Announcement title + example: Event is starting soon! + minLength: 1 + required: + - favoriteId + - title + GroupAuditLogEntryType: + title: GroupAuditLogEntryType + type: string + description: 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`. + default: group.update + example: group.role.update + GroupAuditLogID: + title: GroupAuditLogID + type: string + example: gaud_71a7ff59-112c-4e78-a990-c7cc650776e5 + GroupAuditLogEntry: + title: GroupAuditLogEntry + type: object + properties: + actorDisplayName: + type: string + actorId: + $ref: '#/components/schemas/UserID' + created_at: + type: string + format: date-time + data: + type: object + description: The data associated with the event. The format of this data is dependent on the event type. + 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 + description: + type: string + description: A human-readable description of the event. + example: Group role updated + eventType: + $ref: '#/components/schemas/GroupAuditLogEntryType' + groupId: + $ref: '#/components/schemas/GroupID' + id: + $ref: '#/components/schemas/GroupAuditLogID' + targetId: + type: string + description: Typically a UserID, GroupID, GroupRoleID, or Location, but could be other types of IDs. + PaginatedGroupAuditLogEntryList: + title: PaginatedGroupAuditLogEntryList + type: object + properties: + hasNext: + type: boolean + description: Whether there are more results after this page. + results: + type: array + description: ' ' + items: + $ref: '#/components/schemas/GroupAuditLogEntry' + totalCount: + type: integer + description: The total number of results that the query would return if there were no pagination. + GroupMemberLimitedUser: + title: GroupMemberLimitedUser + type: object + description: Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + nullable: true + properties: + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + type: string + nullable: true + displayName: + type: string + iconUrl: + type: string + id: + $ref: '#/components/schemas/UserID' + profilePicOverride: + type: string + thumbnailUrl: + type: string + nullable: true + GroupMember: + title: GroupMember + type: object + description: May be null when attempting to retrieve group membership for a user who is not part of the group + nullable: true + properties: + acceptedByDisplayName: + type: string + description: Only missing when explicitly fetching own user. + nullable: true + acceptedById: + type: string + description: Only missing when explicitly fetching own user. + nullable: true + bannedAt: + type: string + description: Only missing when explicitly fetching own user. + nullable: true + format: date-time + createdAt: + type: string + description: Only missing when explicitly fetching own user. + nullable: true + format: date-time + groupId: + $ref: '#/components/schemas/GroupID' + hasJoinedFromPurchase: + type: boolean + description: Missing when explicitly fetching own user, or when group isn't linked to a purchase. + id: + $ref: '#/components/schemas/GroupMemberID' + isRepresenting: + type: boolean + description: Whether the user is representing the group. This makes the group show up above the name tag in-game. + default: false + example: true + isSubscribedToAnnouncements: + type: boolean + default: false + isSubscribedToEventAnnouncements: + type: boolean + description: Only missing when explicitly fetching own user. + joinedAt: + type: string + nullable: true + format: date-time + lastPostReadAt: + type: string + nullable: true + format: date-time + mRoleIds: + type: array + items: + $ref: '#/components/schemas/GroupRoleID' + managerNotes: + type: string + description: Only missing when explicitly fetching own user. + nullable: true + membershipStatus: + $ref: '#/components/schemas/GroupMemberStatus' + roleIds: + type: array + items: + $ref: '#/components/schemas/GroupRoleID' + user: + $ref: '#/components/schemas/GroupMemberLimitedUser' + userId: + $ref: '#/components/schemas/UserID' + visibility: + type: string + example: visible + required: + - groupId + - id + - isRepresenting + - isSubscribedToAnnouncements + - joinedAt + - lastPostReadAt + - mRoleIds + - membershipStatus + - roleIds + - userId + - visibility + BanGroupMemberRequest: + title: BanGroupMemberRequest + type: object + properties: + userId: + $ref: '#/components/schemas/UserID' + required: + - userId + CreateGroupGalleryRequest: + title: CreateGroupGalleryRequest + type: object + properties: + description: + type: string + description: Description of the gallery. + example: Example Description + minLength: 0 + membersOnly: + type: boolean + description: Whether the gallery is members only. + default: false + example: false + name: + type: string + description: Name of the gallery. + example: Example Gallery + minLength: 1 + roleIdsToAutoApprove: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToManage: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToSubmit: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToView: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + required: + - name + GroupGalleryImageID: + title: GroupGalleryImageID + type: string + example: ggim_71a7ff59-112c-4e78-a990-c7cc650776e5 + GroupGalleryImage: + title: GroupGalleryImage + type: object + properties: + approved: + type: boolean + default: false + example: true + approvedAt: + type: string + format: date-time + approvedByUserId: + $ref: '#/components/schemas/UserID' + createdAt: + type: string + format: date-time + fileId: + $ref: '#/components/schemas/FileID' + galleryId: + $ref: '#/components/schemas/GroupGalleryID' + groupId: + $ref: '#/components/schemas/GroupID' + id: + $ref: '#/components/schemas/GroupGalleryImageID' + imageUrl: + type: string + example: https://api.vrchat.cloud/api/1/file/file_ce35d830-e20a-4df0-a6d4-5aaef4508044/1/file + format: uri + submittedByUserId: + $ref: '#/components/schemas/UserID' + UpdateGroupGalleryRequest: + title: UpdateGroupGalleryRequest + type: object + properties: + description: + type: string + description: Description of the gallery. + example: Example Description + minLength: 0 + membersOnly: + type: boolean + description: Whether the gallery is members only. + default: false + example: false + name: + type: string + description: Name of the gallery. + example: Example Gallery + minLength: 1 + roleIdsToAutoApprove: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToManage: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToSubmit: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + roleIdsToView: + type: array + description: ' ' + nullable: true + items: + $ref: '#/components/schemas/GroupRoleID' + AddGroupGalleryImageRequest: + title: AddGroupGalleryImageRequest + type: object + properties: + fileId: + $ref: '#/components/schemas/FileID' + required: + - fileId + InstanceID: + title: InstanceID + type: string + description: 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. + example: 12345~hidden(usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469)~region(eu)~nonce(27e8414a-59a0-4f3d-af1f-f27557eb49a2) + InstanceContentSettings: + title: InstanceContentSettings + type: object + description: Types of dynamic user content permitted in an instance + properties: + drones: + type: boolean + default: true + emoji: + type: boolean + default: true + pedestals: + type: boolean + default: true + prints: + type: boolean + default: true + props: + type: boolean + default: true + stickers: + type: boolean + default: true + UdonProductId: + title: UdonProductId + type: string + description: A unique ID of a Udon Product + example: prod_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + World: + title: World + type: object + description: '' + properties: + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + minLength: 1 + capacity: + type: integer + example: 8 + created_at: + type: string + format: date-time + defaultContentSettings: + $ref: '#/components/schemas/InstanceContentSettings' + description: + type: string + minLength: 0 + favorites: + type: integer + default: 0 + example: 12024 + minimum: 0 + featured: + type: boolean + default: false + heat: + type: integer + default: 0 + example: 5 + minimum: 0 + id: + $ref: '#/components/schemas/WorldID' + imageUrl: + type: string + minLength: 1 + instances: + type: array + description: Will always be an empty list when unauthenticated. + items: + type: array + items: {} + maxItems: 2 + minItems: 2 + labsPublicationDate: + type: string + example: none + minLength: 1 + name: + type: string + minLength: 0 + namespace: + type: string + occupants: + type: integer + description: Will always be `0` when unauthenticated. + default: 0 + example: 47 + minimum: 0 + organization: + type: string + default: vrchat + minLength: 1 + popularity: + type: integer + default: 0 + example: 8 + minimum: 0 + previewYoutubeId: + type: string + nullable: true + privateOccupants: + type: integer + description: Will always be `0` when unauthenticated. + default: 0 + example: 1 + minimum: 0 + publicOccupants: + type: integer + description: Will always be `0` when unauthenticated. + default: 0 + example: 46 + minimum: 0 + publicationDate: + type: string + example: none + minLength: 1 + recommendedCapacity: + type: integer + example: 4 + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + storeId: + $ref: '#/components/schemas/StoreID' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + thumbnailImageUrl: + type: string + minLength: 1 + udonProducts: + type: array + items: + $ref: '#/components/schemas/UdonProductId' + unityPackages: + type: array + description: Empty if unauthenticated. + items: + $ref: '#/components/schemas/UnityPackage' + updated_at: + type: string + format: date-time + urlList: + type: array + items: + type: string + version: + type: integer + default: 0 + example: 68 + minimum: 0 + visits: + type: integer + default: 0 + example: 9988675 + minimum: 0 + required: + - authorId + - authorName + - capacity + - created_at + - description + - featured + - heat + - id + - imageUrl + - labsPublicationDate + - name + - organization + - popularity + - publicationDate + - recommendedCapacity + - releaseStatus + - tags + - thumbnailImageUrl + - updated_at + - version + - visits + GroupInstance: + title: GroupInstance + type: object + properties: + instanceId: + $ref: '#/components/schemas/InstanceID' + location: + $ref: '#/components/schemas/LocationID' + memberCount: + type: integer + example: 6 + minimum: 0 + world: + $ref: '#/components/schemas/World' + required: + - instanceId + - location + - memberCount + - world + DeclineGroupInviteRequest: + title: DeclineGroupInviteRequest + type: object + properties: + block: + type: boolean + default: false + CreateGroupInviteRequest: + title: CreateGroupInviteRequest + type: object + properties: + confirmOverrideBlock: + type: boolean + default: true + userId: + $ref: '#/components/schemas/UserID' + required: + - userId + JoinGroupRequest: + title: JoinGroupRequest + type: object + properties: + inviteId: + type: string + GroupSearchSort: + title: GroupSearchSort + type: string + enum: + - joinedAt:asc + - joinedAt:desc + example: joinedAt:asc + GroupUserVisibility: + title: GroupUserVisibility + type: string + enum: + - friends + - hidden + - visible + example: visible + UpdateGroupMemberRequest: + title: UpdateGroupMemberRequest + type: object + properties: + isSubscribedToAnnouncements: + type: boolean + isSubscribedToEventAnnouncements: + type: boolean + managerNotes: + type: string + visibility: + $ref: '#/components/schemas/GroupUserVisibility' + GroupRoleIDList: + title: GroupRoleIDList + type: array + description: ' ' + items: + $ref: '#/components/schemas/GroupRoleID' + GroupPermission: + title: GroupPermission + type: object + description: A permission that can be granted to a role in a group. + properties: + allowedToAdd: + type: boolean + description: Whether the user is allowed to add this permission to a role. + default: false + example: true + displayName: + type: string + description: The display name of the permission. + example: Manage Group Data + help: + type: string + description: Human-readable description of the permission. + example: Allows role to edit group details (name, description, joinState, initialRoles, etc). + isManagementPermission: + type: boolean + description: Whether this permission is a "management" permission. + default: false + example: true + name: + type: string + description: The name of the permission. + example: group-data-manage + GroupPostVisibility: + title: GroupPostVisibility + type: string + enum: + - group + - public + example: public + GroupPost: + title: GroupPost + type: object + properties: + authorId: + $ref: '#/components/schemas/UserID' + createdAt: + type: string + format: date-time + editorId: + $ref: '#/components/schemas/UserID' + nullable: true + groupId: + $ref: '#/components/schemas/GroupID' + id: + $ref: '#/components/schemas/NotificationID' + imageId: + $ref: '#/components/schemas/FileID' + nullable: true + imageUrl: + type: string + nullable: true + roleId: + $ref: '#/components/schemas/GroupRoleIDList' + text: + type: string + title: + type: string + updatedAt: + type: string + format: date-time + visibility: + $ref: '#/components/schemas/GroupPostVisibility' + CreateGroupPostRequest: + title: CreateGroupPostRequest + type: object + properties: + imageId: + $ref: '#/components/schemas/FileID' + roleIds: + $ref: '#/components/schemas/GroupRoleIDList' + sendNotification: + type: boolean + description: Send notification to group members. + default: false + example: false + text: + type: string + description: Post text + example: Come join us for the event! + minLength: 1 + title: + type: string + description: Post title + example: Event is starting soon! + minLength: 1 + visibility: + $ref: '#/components/schemas/GroupPostVisibility' + required: + - sendNotification + - text + - title + - visibility + GroupJoinRequestAction: + title: GroupJoinRequestAction + type: string + enum: + - accept + - reject + example: accept + RespondGroupJoinRequest: + title: RespondGroupJoinRequest + type: object + properties: + action: + $ref: '#/components/schemas/GroupJoinRequestAction' + block: + type: boolean + description: Whether to block the user from requesting again + required: + - action + CreateGroupRoleRequest: + title: CreateGroupRequest + type: object + properties: + description: + type: string + id: + type: string + isSelfAssignable: + type: boolean + default: false + name: + type: string + permissions: + type: array + items: + $ref: '#/components/schemas/GroupPermissions' + UpdateGroupRoleRequest: + title: UpdateGroupRoleRequest + type: object + properties: + description: + type: string + isSelfAssignable: + type: boolean + default: false + name: + type: string + order: + type: integer + permissions: + type: array + items: + $ref: '#/components/schemas/GroupPermissions' + GroupTransferable: + title: GroupTransferable + type: object + properties: + requirements: + type: object + properties: + groupNotMonetized: + type: boolean + default: false + hasVRCPlus: + type: boolean + default: false + hasVerifiedEmail: + type: boolean + default: false + targetCanOwnMoreGroups: + type: boolean + default: false + targetIsGroupMember: + type: boolean + default: false + required: + - groupNotMonetized + - hasVRCPlus + - hasVerifiedEmail + - targetCanOwnMoreGroups + - targetIsGroupMember + required: + - requirements + TransferGroupRequest: + title: TransferGroupRequest + type: object + properties: + transferTargetId: + $ref: '#/components/schemas/UserID' + APIHealth: + title: APIHealth + type: object + properties: + buildVersionTag: + type: string + minLength: 1 + ok: + type: boolean + serverName: + type: string + minLength: 1 + required: + - buildVersionTag + - ok + - serverName + InfoPushDataClickable: + title: InfoPushDataClickable + type: object + properties: + parameters: + type: array + description: In case of OpenURL, this would contain the link. + items: + type: string + command: + type: string + enum: + - CannedWorldSearch + - OpenSafetyMenu + - OpenURL + - OpenVRCPlusMenu + example: OpenURL + minLength: 1 + required: + - command + InfoPushDataArticleContent: + title: InfoPushDataArticleContent + type: object + properties: + imageUrl: + type: string + onPressed: + $ref: '#/components/schemas/InfoPushDataClickable' + text: + type: string + InfoPushDataArticle: + title: InfoPushDataArticle + type: object + properties: + content: + $ref: '#/components/schemas/InfoPushDataArticleContent' + InfoPushData: + title: InfoPushData + type: object + description: '' + properties: + article: + $ref: '#/components/schemas/InfoPushDataArticle' + contentList: + $ref: '#/components/schemas/DynamicContentRow' + description: + type: string + imageUrl: + type: string + minLength: 1 + name: + type: string + onPressed: + $ref: '#/components/schemas/InfoPushDataClickable' + template: + type: string + version: + type: string + example: 2021.3.4 + minLength: 1 + InfoPush: + title: InfoPush + type: object + description: '' + properties: + createdAt: + type: string + format: date-time + data: + $ref: '#/components/schemas/InfoPushData' + endDate: + type: string + format: date-time + hash: + type: string + description: Unknown usage, MD5 + minLength: 1 + id: + type: string + example: launch-beta + minLength: 1 + isEnabled: + type: boolean + default: true + priority: + type: integer + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + startDate: + type: string + description: '' + format: date-time + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + updatedAt: + type: string + format: date-time + required: + - createdAt + - data + - hash + - id + - isEnabled + - priority + - releaseStatus + - tags + - updatedAt + GroupAccessType: + title: GroupAccessType + type: string + description: Group access type when the instance type is "group" + enum: + - members + - plus + - public + default: members + example: members + InstanceOwnerId: + title: InstanceOwnerId + type: string + description: A groupId if the instance type is "group", null if instance type is public, or a userId otherwise + nullable: true + example: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + InstanceRegion: + title: InstanceRegion + type: string + description: Instance region + enum: + - eu + - jp + - unknown + - us + - use + default: us + example: us + InstanceType: + title: InstanceType + type: string + description: '' + enum: + - friends + - group + - hidden + - private + - public + example: hidden + CreateInstanceRequest: + title: CreateInstanceRequest + type: object + properties: + ageGate: + type: boolean + default: false + calendarEntryId: + type: string + canRequestInvite: + type: boolean + description: Only applies to invite type instances to make them invite+ + default: false + closedAt: + type: string + description: The time after which users won't be allowed to join the instance. This doesn't work for public instances. + format: date-time + contentSettings: + $ref: '#/components/schemas/InstanceContentSettings' + displayName: + type: string + nullable: true + groupAccessType: + $ref: '#/components/schemas/GroupAccessType' + hardClose: + type: boolean + description: Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. + default: false + instancePersistenceEnabled: + type: boolean + nullable: true + inviteOnly: + type: boolean + default: false + ownerId: + $ref: '#/components/schemas/InstanceOwnerId' + playerPersistenceEnabled: + type: boolean + nullable: true + queueEnabled: + type: boolean + default: false + region: + $ref: '#/components/schemas/InstanceRegion' + roleIds: + type: array + description: Group roleIds that are allowed to join if the type is "group" and groupAccessType is "member" + items: + $ref: '#/components/schemas/GroupRoleID' + type: + $ref: '#/components/schemas/InstanceType' + worldId: + $ref: '#/components/schemas/WorldID' + required: + - region + - type + - worldId + Region: + title: Region + type: string + description: API/Photon region. + enum: + - eu + - jp + - unknown + - us + - use + - usw + - usx + default: us + example: eu + InstancePlatforms: + title: InstancePlatforms + type: object + additionalProperties: false + properties: + android: + type: integer + example: 1 + minimum: 0 + ios: + type: integer + example: 1 + minimum: 0 + standalonewindows: + type: integer + example: 5 + minimum: 0 + required: + - android + - standalonewindows + LimitedUserInstance: + title: LimitedUserInstance + type: object + description: User object received when querying your own instance + properties: + ageVerificationStatus: + $ref: '#/components/schemas/AgeVerificationStatus' + ageVerified: + $ref: '#/components/schemas/AgeVerified' + allowAvatarCopying: + type: boolean + bio: + type: string + bioLinks: + type: array + description: ' ' + items: + type: string + currentAvatarImageUrl: + $ref: '#/components/schemas/CurrentAvatarImageUrl' + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + date_joined: + type: string + nullable: true + format: date-time + developerType: + $ref: '#/components/schemas/DeveloperType' + displayName: + type: string + friendKey: + type: string + id: + $ref: '#/components/schemas/UserID' + imageUrl: + type: string + isFriend: + type: boolean + last_activity: + type: string + nullable: true + format: date-time + last_mobile: + type: string + nullable: true + format: date-time + last_platform: + $ref: '#/components/schemas/Platform' + platform: + $ref: '#/components/schemas/Platform' + profilePicOverride: + type: string + profilePicOverrideThumbnail: + type: string + pronouns: + type: string + state: + $ref: '#/components/schemas/UserState' + status: + $ref: '#/components/schemas/UserStatus' + statusDescription: + type: string + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + userIcon: + type: string + required: + - ageVerificationStatus + - ageVerified + - allowAvatarCopying + - currentAvatarImageUrl + - currentAvatarTags + - currentAvatarThumbnailImageUrl + - date_joined + - developerType + - displayName + - friendKey + - id + - isFriend + - last_activity + - last_platform + - pronouns + - status + - statusDescription + - tags + Instance: + title: Instance + type: object + 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. + properties: + active: + type: boolean + default: true + example: true + ageGate: + type: boolean + nullable: true + calendarEntryId: + type: string + nullable: true + canRequestInvite: + type: boolean + default: true + example: true + capacity: + type: integer + example: 8 + minimum: 0 + clientNumber: + deprecated: true + type: string + description: Always returns "unknown". + minLength: 1 + closedAt: + type: string + nullable: true + format: date-time + contentSettings: + $ref: '#/components/schemas/InstanceContentSettings' + creatorId: + $ref: '#/components/schemas/UserID' + displayName: + type: string + nullable: true + friends: + $ref: '#/components/schemas/UserID' + full: + type: boolean + default: false + gameServerVersion: + type: integer + nullable: true + groupAccessType: + $ref: '#/components/schemas/GroupAccessType' + hardClose: + type: boolean + nullable: true + hasCapacityForYou: + type: boolean + hidden: + $ref: '#/components/schemas/UserID' + id: + $ref: '#/components/schemas/InstanceID' + instanceId: + $ref: '#/components/schemas/InstanceID' + instancePersistenceEnabled: + type: boolean + nullable: true + location: + $ref: '#/components/schemas/LocationID' + n_users: + type: integer + example: 6 + minimum: 0 + name: + type: string + example: '12345' + minLength: 1 + nonce: + type: string + ownerId: + $ref: '#/components/schemas/InstanceOwnerId' + permanent: + type: boolean + default: false + photonRegion: + $ref: '#/components/schemas/Region' + platforms: + $ref: '#/components/schemas/InstancePlatforms' + playerPersistenceEnabled: + type: boolean + nullable: true + private: + $ref: '#/components/schemas/UserID' + queueEnabled: + type: boolean + queueSize: + type: integer + example: 6 + minimum: 0 + recommendedCapacity: + type: integer + example: 6 + minimum: 0 + region: + $ref: '#/components/schemas/InstanceRegion' + roleRestricted: + type: boolean + secureName: + type: string + example: 7eavhhng + minLength: 1 + shortName: + type: string + nullable: true + example: 02u7yz8j + minLength: 1 + strict: + type: boolean + tags: + type: array + description: 'The tags array on Instances usually contain the language tags of the people in the instance. ' + example: + - language_eng + - language_jpn + - show_social_rank + items: + $ref: '#/components/schemas/Tag' + type: + $ref: '#/components/schemas/InstanceType' + userCount: + type: integer + example: 6 + minimum: 0 + users: + type: array + description: The users field is present on instances created by the requesting user. + items: + $ref: '#/components/schemas/LimitedUserInstance' + world: + $ref: '#/components/schemas/World' + worldId: + $ref: '#/components/schemas/WorldID' + required: + - clientNumber + - full + - id + - instanceId + - location + - n_users + - name + - permanent + - photonRegion + - platforms + - queueEnabled + - queueSize + - recommendedCapacity + - region + - secureName + - strict + - tags + - type + - userCount + - world + - worldId + InstanceShortNameResponse: + title: InstanceShortNameResponse + type: object + properties: + secureName: + type: string + example: 7eavhhng + minLength: 1 + shortName: + type: string + nullable: true + example: 02u7yz8j + minLength: 1 + required: + - secureName + InventoryEquipSlot: + title: InventoryEquipSlot + type: string + enum: + - '' + - drone + - portal + - warp + default: '' + example: drone + InventoryItemType: + title: InventoryItemType + type: string + enum: + - bundle + - droneskin + - emoji + - portalskin + - prop + - sticker + - warpeffect + default: bundle + example: prop + InventoryFlag: + title: InventoryFlag + type: string + enum: + - archivable + - cloneable + - consumable + - equippable + - instantiatable + - trashable + - ugc + - unique + default: instantiatable + example: consumable + InventoryDefaultAttributes: + title: InventoryDefaultAttributes + type: object + additionalProperties: + type: object + properties: + defaultValue: + type: string + validator: + type: object + properties: + type: + type: string + InventoryItemID: + title: InventoryItemID + type: string + example: inv_10bce5b0-2d2b-44e0-900d-db6534615162 + InventoryTemplateID: + title: InventoryTemplateID + type: string + example: invt_b80ce14b-038b-4f56-b970-d232771d62e3 + PropID: + title: PropID + type: string + example: prop_829ba6f6-b837-49d9-b9a9-056b82103b58 + InventoryMetadata: + title: InventoryMetadata + type: object + properties: + animated: + type: boolean + animationStyle: + type: string + assetBundleId: + type: string + fileId: + type: string + imageUrl: + type: string + inventoryItemsToInstantiate: + type: array + description: Only in bundles + items: + $ref: '#/components/schemas/InventoryTemplateID' + maskTag: + type: string + propId: + $ref: '#/components/schemas/PropID' + InventoryUserAttributes: + title: InventoryUserAttributes + type: object + properties: + primaryColor: + type: string + secondaryColor: + type: string + trailColor: + type: string + InventoryItem: + title: InventoryItem + type: object + properties: + collections: + type: array + items: + type: string + created_at: + type: string + example: '2025-06-13T05:00:45.455Z' + format: date-time + defaultAttributes: + $ref: '#/components/schemas/InventoryDefaultAttributes' + description: + type: string + equipSlot: + $ref: '#/components/schemas/InventoryEquipSlot' + equipSlots: + type: array + items: + $ref: '#/components/schemas/InventoryEquipSlot' + expiryDate: + type: string + nullable: true + example: '2025-06-13T05:00:45.455Z' + format: date-time + flags: + type: array + items: + type: string + holderId: + $ref: '#/components/schemas/UserID' + id: + $ref: '#/components/schemas/InventoryItemID' + imageUrl: + type: string + isArchived: + type: boolean + isSeen: + type: boolean + itemType: + $ref: '#/components/schemas/InventoryItemType' + itemTypeLabel: + type: string + metadata: + $ref: '#/components/schemas/InventoryMetadata' + name: + type: string + quantifiable: + type: boolean + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + templateId: + $ref: '#/components/schemas/InventoryTemplateID' + template_created_at: + type: string + example: '2025-06-09T16:31:40.785Z' + format: date-time + template_updated_at: + type: string + example: '2025-06-25T00:34:14.578Z' + format: date-time + updated_at: + type: string + example: '2025-06-25T00:34:15.965Z' + format: date-time + userAttributes: + $ref: '#/components/schemas/InventoryUserAttributes' + validateUserAttributes: + type: boolean + required: + - 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 + Inventory: + title: Inventory + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/InventoryItem' + totalCount: + type: integer + required: + - data + - totalCount + ShareInventoryItemDirectRequest: + title: ShareInventoryItemDirectRequest + type: object + properties: + itemId: + $ref: '#/components/schemas/InventoryItemID' + users: + type: array + items: + $ref: '#/components/schemas/UserID' + required: + - itemId + - users + OkStatus: + title: OkStatus + type: object + description: A status response consisting of solely a string description of whether the result of an operation was ok. + properties: + ok: + type: string + description: The actual status itself + default: maybe? + required: + - ok + InventorySpawn: + title: InventorySpawn + type: object + properties: + token: + type: string + version: + type: integer + required: + - token + - version + InventoryDropID: + title: InventoryDropID + type: string + example: invd_ee3a8f7f-1454-4748-a935-99bf9865f33d + InventoryNotificationDetails: + title: InventoryNotificationDetails + type: object + properties: + body: + type: string + imageUrl: + type: string + title: + type: string + required: + - body + - imageUrl + - title + InventoryDrop: + title: InventoryDrop + type: object + properties: + authorId: + $ref: '#/components/schemas/UserID' + created_at: + type: string + example: '2025-06-10T20:37:31.837Z' + format: date-time + dropExpiryDate: + type: string + nullable: true + format: date-time + endDropDate: + type: string + example: '2184-07-24T00:00:00.000Z' + format: date-time + id: + $ref: '#/components/schemas/InventoryDropID' + isDisabled: + type: boolean + name: + type: string + notificationDetails: + $ref: '#/components/schemas/InventoryNotificationDetails' + startDropDate: + type: string + example: '2025-06-09T10:00:00.000Z' + format: date-time + status: + type: string + example: active + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + targetGroup: + type: string + example: everyone + templateIds: + type: array + items: + $ref: '#/components/schemas/InventoryTemplateID' + updated_at: + type: string + example: '2025-06-10T20:37:31.837Z' + format: date-time + required: + - authorId + - created_at + - dropExpiryDate + - endDropDate + - id + - isDisabled + - name + - notificationDetails + - startDropDate + - status + - tags + - targetGroup + - templateIds + - updated_at + InventoryTemplate: + title: InventoryTemplate + type: object + properties: + authorId: + $ref: '#/components/schemas/UserID' + collections: + type: array + items: + type: string + created_at: + type: string + example: '2025-06-12T20:21:15.056Z' + format: date-time + defaultAttributes: + type: object + description: + type: string + equipSlots: + type: array + items: + type: string + flags: + type: array + items: + type: string + id: + $ref: '#/components/schemas/InventoryTemplateID' + imageUrl: + type: string + itemType: + $ref: '#/components/schemas/InventoryItemType' + itemTypeLabel: + type: string + metadata: + $ref: '#/components/schemas/InventoryMetadata' + name: + type: string + notificationDetails: + $ref: '#/components/schemas/InventoryNotificationDetails' + status: + type: string + example: live + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + updated_at: + type: string + example: '2025-06-10T20:37:31.837Z' + format: date-time + validateUserAttributes: + type: boolean + required: + - authorId + - collections + - created_at + - defaultAttributes + - description + - equipSlots + - flags + - id + - imageUrl + - itemType + - itemTypeLabel + - name + - status + - tags + - updated_at + - validateUserAttributes + UpdateInventoryItemRequest: + title: UpdateInventoryItemRequest + type: object + properties: + isArchived: + type: boolean + isSeen: + type: boolean + userAttributes: + $ref: '#/components/schemas/InventoryUserAttributes' + SuccessFlag: + title: SuccessFlag + type: object + properties: + success: + type: boolean + required: + - success + InventoryConsumptionResults: + title: InventoryConsumptionResults + type: object + properties: + errors: + type: array + items: + type: object + inventoryItems: + type: array + items: + $ref: '#/components/schemas/InventoryItem' + inventoryItemsCreated: + type: integer + required: + - errors + - inventoryItems + - inventoryItemsCreated + EquipInventoryItemRequest: + title: EquipInventoryItemRequest + type: object + properties: + equipSlot: + $ref: '#/components/schemas/InventoryEquipSlot' + required: + - equipSlot + NotificationDetailGeneric: + title: NotificationDetailGeneric + type: object + additionalProperties: + type: string + SentNotification: + title: SentNotification + type: object + description: '' + properties: + created_at: + type: string + format: date-time + details: + $ref: '#/components/schemas/NotificationDetailGeneric' + id: + type: string + minLength: 1 + message: + type: string + description: '' + example: This is a generated invite to VRChat Hub + receiverUserId: + $ref: '#/components/schemas/UserID' + senderUserId: + $ref: '#/components/schemas/UserID' + senderUsername: + deprecated: true + type: string + description: '-| **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).' + minLength: 1 + type: + $ref: '#/components/schemas/NotificationType' + required: + - created_at + - details + - id + - message + - receiverUserId + - senderUserId + - type + InviteResponse: + title: InviteResponse + type: object + properties: + responseSlot: + type: integer + maximum: 11 + minimum: 0 + required: + - responseSlot + InviteRequest: + title: InviteRequest + type: object + properties: + instanceId: + $ref: '#/components/schemas/InstanceID' + messageSlot: + type: integer + maximum: 11 + minimum: 0 + required: + - instanceId + JamID: + title: JamID + type: string + example: jam_0b7e3f6d-4647-4648-b2a1-1431e76906d9 + Jam: + title: Jam + type: object + description: '' + properties: + description: + type: string + minLength: 1 + id: + $ref: '#/components/schemas/JamID' + isVisible: + type: boolean + moreInfo: + type: string + minLength: 1 + state: + type: string + description: |- + One of: + - submissions_open + - closed + minLength: 1 + stateChangeDates: + type: object + properties: + closed: + type: string + nullable: true + format: date-time + submissionsClosed: + type: string + nullable: true + format: date-time + submissionsOpened: + type: string + nullable: true + format: date-time + winnersSelected: + type: string + nullable: true + example: null + format: date-time + submissionContentGateDate: + type: string + nullable: true + format: date-time + submissionContentGated: + type: boolean + title: + type: string + minLength: 1 + updated_at: + type: string + format: date-time + required: + - description + - id + - isVisible + - moreInfo + - state + - stateChangeDates + - submissionContentGateDate + - submissionContentGated + - title + - type + - updated_at + JamSubmissionID: + title: JamSubmissionID + type: string + example: jsub_f01f44fa-89fa-443c-ab4c-7fed9245970f + JamSubmission: + title: JamSubmission + type: object + description: '' + properties: + contentId: + type: string + description: Either world ID or avatar ID + minLength: 1 + created_at: + type: string + format: date-time + description: + type: string + id: + $ref: '#/components/schemas/JamSubmissionID' + jamId: + $ref: '#/components/schemas/JamID' + ratingScore: + type: integer + minimum: 0 + submitterId: + $ref: '#/components/schemas/UserID' + required: + - contentId + - created_at + - description + - id + - jamId + - ratingsScore + - submitterId + CreateJamSubmissionRequest: + title: CreateJamSubmissionRequest + type: object + description: Submit content for a Jam. Both content upload by submitter and jam submission itself must be made within the jam's designated times. + properties: + contentId: + type: string + description: The id of the uploaded content (e.g., avatar, world) being submitted. + example: avtr_c38a1615-5bf5-42b4-84eb-a8b6c37cbd11 + description: + type: string + description: A description of the content being submitted. + example: My awesomely unique avatar for the jam! + required: + - contentId + - description + LicenseGroup: + title: LicenseGroup + type: object + description: '' + properties: + description: + type: string + id: + $ref: '#/components/schemas/LicenseGroupID' + licenses: + type: array + items: + $ref: '#/components/schemas/License' + name: + type: string + minLength: 1 + required: + - description + - id + - licenses + - name + example: + id: lgrp_608513da-b213-4e15-80af-bd88c27f0979 + name: vrcplus + description: VRC+ benefits + licenses: + - forAction: have + forId: prms_1d9549db-d30a-48f3-a6b8-6741ce5a4283 + forName: permission-user-icons + forType: permission + - forAction: have + forId: prms_76f33deb-dd5d-46b7-b79d-e1f8f0a9a1e0 + forName: permission-supporter-tags + forType: permission + - forAction: have + forId: prms_0d9549db-d30a-48f3-a6b8-6741ce5a4283 + forName: permission-invite-photos + forType: permission + - forAction: have + forId: prms_dc02c512-4c03-479c-8c6a-d9329c023baf + forName: permission-user-gallery + forType: permission + - forAction: have + forId: prms_153ac0b7-c2dd-43f9-96e3-c61fd2e85509 + forName: permission-profile-pic-override + forType: permission + CreateListingRequest: + title: CreateListingRequest + type: object + description: Observed create-listing payload fields. Additional fields may exist. + properties: + active: + type: boolean + description: + type: string + displayName: + type: string + imageId: + $ref: '#/components/schemas/FileID' + listingType: + $ref: '#/components/schemas/ProductListingType' + priceTokens: + type: integer + productIds: + type: array + items: + $ref: '#/components/schemas/ProductID' + storeIds: + type: array + items: + $ref: '#/components/schemas/StoreID' + required: + - description + - displayName + - imageId + - listingType + - priceTokens + - productIds + - storeIds + UpdateListingRequest: + title: UpdateListingRequest + type: object + properties: + active: + type: boolean + required: + - active + InviteMessageType: + title: InviteMessageType + type: string + description: '' + enum: + - message + - request + - requestResponse + - response + default: message + InviteMessageID: + title: InviteMessageID + type: string + example: invm_24a1c14d-5e24-48e5-90e3-c3f712420ffa + InviteMessage: + title: InviteMessage + type: object + description: '' + properties: + canBeUpdated: + type: boolean + default: true + id: + $ref: '#/components/schemas/InviteMessageID' + message: + type: string + minLength: 1 + messageType: + $ref: '#/components/schemas/InviteMessageType' + remainingCooldownMinutes: + type: integer + description: Changes to 60 when updated, although probably server-side configurable. + default: 0 + minimum: 0 + slot: + type: integer + maximum: 11 + minimum: 0 + updatedAt: + type: string + format: date-time + required: + - canBeUpdated + - id + - message + - messageType + - remainingCooldownMinutes + - slot + - updatedAt + UpdateInviteMessageRequest: + title: UpdateInviteMessageRequest + type: object + properties: + message: + type: string + required: + - message + ModerationReportID: + title: ModerationReportID + type: string + example: modReport_a09eb23c-2c62-4ea9-b885-6198f23c5313 + ModerationReport: + title: ModerationReport + type: object + properties: + category: + type: string + description: Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`. + example: behavior + contentId: + type: string + example: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + contentName: + type: string + contentThumbnailImageUrl: + type: string + nullable: true + description: + type: string + description: The subjective reason for the report + example: iz bulli + evidenceRequired: + type: boolean + id: + $ref: '#/components/schemas/ModerationReportID' + reason: + type: string + description: Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`. + supportRequired: + type: boolean + type: + type: string + description: Valid values are the keys of the object `$.reportOptions` from `GET /config`. + example: user + required: + - category + - contentId + - contentName + - contentThumbnailImageUrl + - description + - evidenceRequired + - id + - reason + - supportRequired + - type + PaginatedModerationReportList: + title: PaginatedModerationReportList + type: object + properties: + hasNext: + type: boolean + description: Whether there are more results after this page. + results: + type: array + description: The list of moderation reports. + items: + $ref: '#/components/schemas/ModerationReport' + totalCount: + type: integer + description: The total number of results that the query would return if there were no pagination. + ContentFilter: + title: ContentFilter + type: string + description: Flags for content filtering + enum: + - content_adult + - content_gore + - content_horror + - content_sex + - content_violence + SubmitModerationReportRequest: + title: SubmitModerationReportRequest + type: object + 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() + properties: + category: + type: string + description: Valid values are the keys of the object `$.reportOptions[type]` from `GET /config`. Descriptions of these are found at `$.reportCategories[type]`. + example: behavior + contentId: + type: string + description: The id of the user, group, world, avatar, inventory item, print, etc. being reported. + example: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + description: + type: string + description: The subjective reason for the report + example: iz bulli + details: + type: object + 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. + properties: + fileId: + $ref: '#/components/schemas/FileID' + holderId: + $ref: '#/components/schemas/UserID' + imageType: + type: string + description: Relevant detail for reports about image content, such as emoji. + instanceAgeGated: + type: boolean + description: Relevant detail for reports taking place from within an instance. + instanceType: + type: string + description: Relevant detail for reports taking place from within an instance. + suggestedWarnings: + type: array + description: Relevant detail for reports about content that might not be tagged properly. + items: + $ref: '#/components/schemas/ContentFilter' + userInSameInstance: + type: boolean + description: Relevant detail for reports involving another user in the same instance world. + reason: + type: string + description: Valid values are the strings in the array `$.reportOptions[type][category]` from `GET /config`. Descriptions of these are found at `$.reportReasons[type]`. + example: child + type: + type: string + description: Valid values are the keys of the object `$.reportOptions` from `GET /config`. + example: user + required: + - category + - contentId + - reason + - type + NotificationV2Category: + title: NotificationV2Category + type: string + example: | + Event: + value: event + Group: + value: social.group + NotificationV2DataGeneric: + title: NotificationV2DataGeneric + type: object + additionalProperties: + type: string + EmojiID: + title: EmojiID + type: string + description: Either a FileID or a string constant for default emojis + 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 + NotificationV2DetailsBoop: + title: NotificationV2DetailsBoop + type: object + description: Either inventoryItemId by itself, or emojiId with optional emojiVersion + properties: + emojiId: + $ref: '#/components/schemas/EmojiID' + emojiVersion: + type: integer + nullable: true + inventoryItemId: + $ref: '#/components/schemas/InventoryItemID' + required: + - emojiId + - emojiVersion + - inventoryItemId + NotificationV2ResponseIcon: + title: NotificationV2ResponseIcon + type: string + example: | + Bell: + value: bell + Bell Slash: + value: bell-slash + Check: + value: check + NotificationV2ResponseType: + title: NotificationV2ResponseType + type: string + example: | + Accept: + value: accept + Boop: + value: boop + Decline: + value: decline + Delete: + value: delete + Unsubscribe: + value: unsubscribe + NotificationV2Response: + title: NotificationV2Response + type: object + properties: + data: + type: string + icon: + $ref: '#/components/schemas/NotificationV2ResponseIcon' + text: + type: string + textKey: + type: string + nullable: true + type: + $ref: '#/components/schemas/NotificationV2ResponseType' + required: + - data + - icon + - text + - textKey + - type + NotificationV2Type: + title: NotificationV2Type + type: string + enum: + - avatarreview.failure + - avatarreview.success + - badge.earned + - boop + - economy.alert + - economy.received.gift + - event.announcement + - group.announcement + - group.event.created + - group.event.starting + - group.informative + - group.invite + - group.joinRequest + - group.post + - group.transfer + - invite.instance.contentGated + - moderation.contentrestriction + - moderation.notice + - moderation.report.closed + - moderation.warning.group + - promo.redeem + - text.adventure + - vrcplus.gift + default: group.announcement + NotificationV2: + title: NotificationV2 + type: object + description: '' + properties: + canDelete: + type: boolean + category: + $ref: '#/components/schemas/NotificationV2Category' + createdAt: + type: string + format: date-time + data: + $ref: '#/components/schemas/NotificationV2DataGeneric' + details: + $ref: '#/components/schemas/NotificationV2DetailsBoop' + expiresAt: + type: string + format: date-time + expiryAfterSeen: + type: integer + nullable: true + id: + type: string + ignoreDND: + type: boolean + imageUrl: + type: string + nullable: true + isSystem: + type: boolean + link: + type: string + example: event:grp_00000000-0000-0000-0000-000000000000,cal_00000000-0000-0000-0000-000000000000 + linkText: + type: string + linkTextKey: + type: string + nullable: true + message: + type: string + messageKey: + type: string + nullable: true + receiverUserId: + $ref: '#/components/schemas/UserID' + relatedNotificationsId: + type: string + nullable: true + example: cal_00000000-0000-0000-0000-000000000000 + requireSeen: + type: boolean + responses: + type: array + items: + $ref: '#/components/schemas/NotificationV2Response' + seen: + type: boolean + senderUserId: + $ref: '#/components/schemas/UserID' + senderUsername: + type: string + nullable: true + title: + type: string + titleKey: + type: string + nullable: true + type: + $ref: '#/components/schemas/NotificationV2Type' + updatedAt: + type: string + format: date-time + version: + type: integer + default: 2 + required: + - 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 + ReplyNotificationV2Request: + title: ReplyNotificationV2Request + type: object + RespondNotificationV2Request: + title: RespondNotificationV2Request + type: object + properties: + responseData: + type: string + default: '' + responseType: + $ref: '#/components/schemas/NotificationV2ResponseType' + required: + - responseType + PrintID: + title: PrintID + type: string + example: prnt_0a0aa0a0-85ea-42eb-b2f7-4840d7f341fa + Print: + title: Print + type: object + description: Info about a print + properties: + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + createdAt: + type: string + format: date-time + files: + type: object + properties: + fileId: + $ref: '#/components/schemas/FileID' + image: + type: string + description: Link to file, e.g. https://api.vrchat.cloud/api/1/file/file_66fe782d-f2bd-4462-9761-1d766d7b2b26/1/file + id: + $ref: '#/components/schemas/PrintID' + note: + type: string + ownerId: + $ref: '#/components/schemas/UserID' + timestamp: + type: string + format: date-time + worldId: + $ref: '#/components/schemas/WorldID' + worldName: + type: string + required: + - authorId + - authorName + - createdAt + - files + - id + - note + - timestamp + - worldId + - worldName + CreateProductRequest: + title: CreateProductRequest + type: object + properties: + description: + type: string + displayName: + type: string + imageId: + $ref: '#/components/schemas/FileID' + productType: + $ref: '#/components/schemas/ProductType' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + useForSubscriberList: + type: boolean + required: + - description + - displayName + - imageId + - productType + - tags + - useForSubscriberList + UpdateProductRequest: + title: UpdateProductRequest + type: object + properties: + description: + type: string + displayName: + type: string + imageId: + $ref: '#/components/schemas/FileID' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + useForSubscriberList: + type: boolean + PropSpawnType: + title: PropSpawnType + type: integer + description: |- + 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: ??? + default: 1 + minimum: 0 + PropUnityPackage: + title: PropUnityPackage + type: object + description: '' + properties: + assetUrl: + type: string + example: https://api.vrchat.cloud/api/1/file/file_c991c050-8b43-4046-8182-24d068524ac5/24/file + assetVersion: + type: integer + example: 4 + minimum: 0 + platform: + $ref: '#/components/schemas/Platform' + propSignature: + type: string + unityVersion: + type: string + default: 2022.3.22f1 + example: 2022.3.22f1 + minLength: 1 + variant: + type: string + required: + - assetUrl + - assetVersion + - platform + - propSignature + - unityVersion + - variant + PropPlacementMask: + title: PropPlacementMask + type: integer + description: |- + Bitmask for restrictions on what world surfaces a prop may be summoned. + 0: no restrictions + 1: floors + 2: walls + 4: ceilings + default: 1 + minimum: 0 + Prop: + title: Prop + type: object + description: '' + properties: + _created_at: + type: string + format: date-time + _updated_at: + type: string + format: date-time + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + description: + type: string + id: + $ref: '#/components/schemas/PropID' + imageUrl: + type: string + maxCountPerUser: + type: integer + default: 1 + name: + type: string + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + spawnType: + $ref: '#/components/schemas/PropSpawnType' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + thumbnailImageUrl: + type: string + unityPackageUrl: + type: string + nullable: true + unityPackages: + type: array + items: + $ref: '#/components/schemas/PropUnityPackage' + minItems: 1 + uniqueItems: true + worldPlacementMask: + $ref: '#/components/schemas/PropPlacementMask' + required: + - _created_at + - _updated_at + - authorId + - authorName + - description + - id + - imageUrl + - maxCountPerUser + - name + - releaseStatus + - spawnType + - tags + - thumbnailImageUrl + - unityPackageUrl + - unityPackages + - worldPlacementMask + CreatePropRequest: + title: CreatePropRequest + type: object + properties: + assetUrl: + type: string + assetVersion: + type: integer + description: + type: string + id: + $ref: '#/components/schemas/PropID' + imageUrl: + type: string + name: + type: string + platform: + $ref: '#/components/schemas/Platform' + propSignature: + type: string + spawnType: + $ref: '#/components/schemas/PropSpawnType' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + unityVersion: + type: string + worldPlacementMask: + $ref: '#/components/schemas/PropPlacementMask' + required: + - assetUrl + - assetVersion + - description + - id + - imageUrl + - name + - platform + - spawnType + - tags + - unityVersion + - worldPlacementMask + UpdatePropRequest: + title: UpdatePropRequest + type: object + properties: + assetUrl: + type: string + assetVersion: + type: integer + description: + type: string + imageUrl: + type: string + name: + type: string + platform: + $ref: '#/components/schemas/Platform' + propSignature: + type: string + spawnType: + $ref: '#/components/schemas/PropSpawnType' + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + unityVersion: + type: string + worldPlacementMask: + $ref: '#/components/schemas/PropPlacementMask' + PropPublishStatus: + title: PropPublishStatus + type: object + properties: + canPublish: + type: boolean + default: false + RequestInviteRequest: + title: RequestInviteRequest + type: object + properties: + requestSlot: + type: integer + maximum: 11 + minimum: 0 + required: + - instanceId + RewardRedemptionRequest: + title: RewardRedemptionRequest + type: object + properties: + code: + type: string + required: + - code + RewardBadge: + title: RewardBadge + type: object + properties: + createdAt: + type: string + format: date-time + createdBy: + $ref: '#/components/schemas/UserID' + description: + type: string + fileName: + type: string + hidden: + type: boolean + id: + $ref: '#/components/schemas/BadgeID' + imageUrl: + type: string + isLocalizationEnabled: + type: boolean + machineName: + type: string + name: + type: string + type: + type: string + updatedAt: + type: string + format: date-time + required: + - createdAt + - createdBy + - description + - fileName + - hidden + - id + - imageUrl + - isLocalizationEnabled + - name + - type + - updatedAt + RewardRedemption: + title: RewardRedemption + type: object + properties: + data: + type: object + properties: + badge: + $ref: '#/components/schemas/RewardBadge' + item: + $ref: '#/components/schemas/InventoryTemplate' + type: + type: string + description: One of `badge`, `item`, ... + required: + - data + - type + RewardRedemptionResult: + title: RewardRedemptionResult + type: object + properties: + redeemedRewards: + type: array + items: + $ref: '#/components/schemas/RewardRedemption' + redemptionCode: + type: string + required: + - redeemedRewards + - redemptionCode + TiliaStatus: + title: TiliaStatus + type: object + description: '' + properties: + economyOnline: + type: boolean + economyState: + type: integer + plannedOfflineWindowEnd: + type: string + format: date-time + plannedOfflineWindowStart: + type: string + format: date-time + required: + - economyOnline + TokenBundle: + title: TokenBundle + type: object + properties: + amount: + type: integer + description: price of the bundle + appleProductId: + type: string + description: + type: string + googleProductId: + type: string + id: + type: string + imageUrl: + type: string + description: direct url to image + oculusSku: + type: string + steamItemId: + type: string + tokens: + type: integer + description: number of tokens received + required: + - amount + - appleProductId + - description + - id + - imageUrl + - oculusSku + - steamItemId + - tokens + Balance: + title: Balance + type: object + description: '' + properties: + balance: + type: integer + default: 0 + noTransactions: + type: boolean + tiliaResponse: + type: boolean + required: + - balance + EconomyAccount: + title: EconomyAccount + type: object + nullable: true + properties: + accountActivatedOn: + type: string + nullable: true + format: date-time + accountId: + type: string + nullable: true + accountSellerRegisteredOn: + type: string + nullable: true + format: date-time + accountSellerStatus: + type: string + nullable: true + blocked: + type: boolean + canEarn: + type: boolean + canPayout: + type: boolean + canSpend: + type: boolean + skrillEmail: + type: string + nullable: true + source: + type: string + tiliaId: + type: string + nullable: true + tiliaType: + type: string + nullable: true + userId: + $ref: '#/components/schemas/UserID' + required: + - accountActivatedOn + - accountId + - blocked + - canSpend + - source + - userId + EconomyBalances: + title: EconomyBalances + type: object + properties: + balance: + type: integer + earnings: + type: integer + standard: + type: integer + required: + - balance + - earnings + - standard + EconomyPayout: + title: EconomyPayout + type: object + properties: + paymentAmountTokens: + type: integer + paymentAmountUsd: + type: integer + paymentCreated: + type: string + format: date-time + paymentOutId: + type: integer + paymentPlatform: + type: string + paymentPlatformCode: + type: integer + paymentStatus: + type: string + paymentStatusCode: + type: integer + paymentUpdated: + type: string + format: date-time + platformPaymentGuid: + type: string + nullable: true + platformPaymentMethod: + type: string + nullable: true + reversalDate: + type: string + nullable: true + format: date-time + reversalReason: + type: string + nullable: true + reversalReasonCode: + type: integer + nullable: true + reversalTransactionId: + type: integer + nullable: true + transactionId: + type: integer + required: + - paymentAmountTokens + - paymentAmountUsd + - paymentCreated + - paymentOutId + - paymentPlatform + - paymentPlatformCode + - paymentStatus + - paymentStatusCode + - paymentUpdated + - transactionId + EconomyPayoutList: + title: EconomyPayoutList + type: object + properties: + payouts: + type: array + items: + $ref: '#/components/schemas/EconomyPayout' + required: + - payouts + EconomyPayoutEligibility: + title: EconomyPayoutEligibility + type: object + properties: + issue: + type: string + okBalance: + type: boolean + okFrequency: + type: boolean + okNotOngoing: + type: boolean + okStanding: + type: boolean + required: + - issue + - okBalance + - okFrequency + - okNotOngoing + - okStanding + EconomyPayoutStatus: + title: EconomyPayoutStatus + type: object + properties: + accountId: + type: integer + activePayout: + $ref: '#/components/schemas/EconomyPayout' + nullable: true + activePayoutCancellable: + type: boolean + activePayoutTiliaAmount: + type: integer + earningsBalance: + type: integer + eligibility: + $ref: '#/components/schemas/EconomyPayoutEligibility' + payoutEligible: + type: boolean + tiliaId: + type: string + required: + - accountId + - activePayoutCancellable + - activePayoutTiliaAmount + - earningsBalance + - eligibility + - payoutEligible + - tiliaId + ProductPurchaseRecord: + title: ProductPurchaseRecord + type: object + properties: + amount: + type: integer + example: 399 + balance: + type: integer + example: 399 + date: + type: string + format: date-time + fromUserDisplayName: + type: string + example: VRChat + listingDisplayName: + type: string + example: Lucky Red Envelope + listingType: + $ref: '#/components/schemas/ProductListingType' + platform: + type: string + description: Where (first- or third-party) the purchase was made + example: VRChat + purchaseId: + $ref: '#/components/schemas/ProductPurchaseID' + reason: + type: integer + example: 3002 + reasonLabel: + type: string + example: Promo Credit + transactionId: + type: integer + transactionLineId: + type: integer + required: + - amount + - balance + - date + - fromUserDisplayName + - listingDisplayName + - listingType + - platform + - purchaseId + - reason + - reasonLabel + - transactionId + - transactionLineId + ProductPurchaseHistory: + title: ProductPurchaseHistory + type: object + properties: + endDate: + type: string + format: date-time + startDate: + type: string + format: date-time + transactions: + type: array + items: + $ref: '#/components/schemas/ProductPurchaseRecord' + required: + - endDate + - startDate + - transactions + FriendStatus: + title: FriendStatus + type: object + properties: + incomingRequest: + type: boolean + default: false + isFriend: + type: boolean + default: false + outgoingRequest: + type: boolean + default: false + required: + - incomingRequest + - isFriend + - outgoingRequest + TiliaKyc: + title: TiliaKyc + type: object + properties: + account_id: + type: string + description: Tilia account identifier. + example: acct_2YYRz9C5xbJWrhI5RLWPnwDLMyq + kyc_id: + type: string + description: KYC verification identifier. + example: kyc_2tDKpjafhPTG729ceA2oIcsQlWA + kyc_requirements: + type: string + description: Requirement state reported by Tilia. + example: NONE + match_checks: + type: array + description: Match checks returned by Tilia. + items: + type: string + pii_level: + type: string + description: PII verification level. + example: FULL + rules: + type: array + description: Additional rules returned by Tilia. + items: + type: string + state: + type: string + description: Overall KYC state. + example: ACCEPT + tilia_retry_rule_code: + type: string + description: Retry rule code returned by Tilia, if any. + required: + - account_id + - kyc_id + - kyc_requirements + - match_checks + - pii_level + - rules + - state + - tilia_retry_rule_code + TiliaTOS: + title: TiliaTOS + type: object + description: '' + properties: + signed_tos: + type: boolean + required: + - signed_tos + UpdateTiliaTOSRequest: + title: UpdateTiliaTOSRequest + type: object + properties: + accepted: + type: boolean + required: + - accepted + UserNoteID: + title: UserNoteID + type: string + example: unt_e9074848-d107-4019-b4aa-bbd19e67660d + UserNote: + title: UserNote + type: object + properties: + createdAt: + type: string + format: date-time + id: + $ref: '#/components/schemas/UserNoteID' + note: + type: string + targetUser: + type: object + properties: + id: + $ref: '#/components/schemas/UserNoteID' + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + displayName: + type: string + profilePicOverride: + type: string + nullable: true + userIcon: + type: string + targetUserId: + $ref: '#/components/schemas/UserID' + userId: + $ref: '#/components/schemas/UserID' + required: + - createdAt + - id + - note + - targetUserId + - userId + UpdateUserNoteRequest: + title: UpdateUserNoteRequest + type: object + properties: + note: + type: string + targetUserId: + $ref: '#/components/schemas/UserID' + required: + - note + - targetUserId + LimitedUserSearch: + title: LimitedUserSearch + type: object + description: User object received when searching + properties: + bio: + type: string + bioLinks: + type: array + description: ' ' + items: + type: string + currentAvatarImageUrl: + $ref: '#/components/schemas/CurrentAvatarImageUrl' + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + developerType: + $ref: '#/components/schemas/DeveloperType' + displayName: + type: string + id: + $ref: '#/components/schemas/UserID' + isFriend: + type: boolean + last_platform: + $ref: '#/components/schemas/Platform' + profilePicOverride: + type: string + pronouns: + type: string + status: + $ref: '#/components/schemas/UserStatus' + statusDescription: + type: string + tags: + type: array + description: <- Always empty. + items: + $ref: '#/components/schemas/Tag' + userIcon: + type: string + required: + - currentAvatarImageUrl + - currentAvatarTags + - currentAvatarThumbnailImageUrl + - developerType + - displayName + - id + - isFriend + - last_platform + - status + - statusDescription + - tags + User: + title: User + type: object + properties: + ageVerificationStatus: + $ref: '#/components/schemas/AgeVerificationStatus' + ageVerified: + $ref: '#/components/schemas/AgeVerified' + allowAvatarCopying: + type: boolean + default: true + badges: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Badge' + bio: + type: string + maxLength: 512 + minLength: 0 + bioLinks: + type: array + items: + type: string + currentAvatarImageUrl: + $ref: '#/components/schemas/CurrentAvatarImageUrl' + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + date_joined: + type: string + format: date + developerType: + $ref: '#/components/schemas/DeveloperType' + displayName: + type: string + description: 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: + type: string + friendRequestStatus: + type: string + id: + $ref: '#/components/schemas/UserID' + instanceId: + $ref: '#/components/schemas/InstanceID' + isFriend: + type: boolean + description: Either their `friendKey`, or empty string if you are not friends. Unknown usage. + last_activity: + type: string + description: Either a date-time or empty string. + last_login: + type: string + description: Either a date-time or empty string. + last_mobile: + type: string + nullable: true + last_platform: + $ref: '#/components/schemas/Platform' + location: + $ref: '#/components/schemas/LocationID' + note: + type: string + platform: + type: string + profilePicOverride: + type: string + profilePicOverrideThumbnail: + type: string + pronouns: + type: string + state: + $ref: '#/components/schemas/UserState' + status: + $ref: '#/components/schemas/UserStatus' + statusDescription: + type: string + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + travelingToInstance: + type: string + travelingToLocation: + type: string + travelingToWorld: + type: string + userIcon: + type: string + username: + deprecated: true + type: string + description: |- + -| 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). + worldId: + $ref: '#/components/schemas/WorldID' + required: + - 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 + UpdateUserRequest: + title: UpdateUserRequest + type: object + properties: + acceptedTOSVersion: + type: integer + bio: + type: string + minLength: 0 + bioLinks: + type: array + items: + type: string + birthday: + type: string + format: date + contentFilters: + type: array + description: These tags begin with `content_` and control content gating + items: + $ref: '#/components/schemas/ContentFilter' + currentPassword: + type: string + displayName: + type: string + description: MUST specify currentPassword as well to change display name + email: + type: string + hasSharedConnectionsOptOut: + type: boolean + description: Opt out of the Mutuals feature + isBoopingEnabled: + type: boolean + password: + type: string + description: MUST specify currentPassword as well to change password + pronouns: + type: string + maxLength: 32 + minLength: 0 + revertDisplayName: + type: boolean + description: MUST specify currentPassword as well to revert display name + status: + $ref: '#/components/schemas/UserStatus' + statusDescription: + type: string + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + unsubscribe: + type: boolean + userIcon: + type: string + description: MUST be a valid VRChat /file/ url. + example: https://api.vrchat.cloud/api/1/file/file_76dc2964-0ce8-41df-b2e7-8edf994fee31/1 + minLength: 0 + ChangeUserTagsRequest: + title: ChangeUserTagsRequest + type: object + properties: + tags: + type: array + description: The tags being added or removed. + items: + $ref: '#/components/schemas/Tag' + required: + - tags + UpdateUserBadgeRequest: + title: UpdateUserBadgeRequest + type: object + properties: + hidden: + type: boolean + showcased: + type: boolean + BoopRequest: + title: BoopRequest + type: object + description: See NotificationDetailBoop; either inventoryItemId (accessed through .id) by itself, or emojiId (accessed through .metadata.fileId or built-in emoji name) with optional emojiVersion + properties: + emojiId: + $ref: '#/components/schemas/EmojiID' + emojiVersion: + type: integer + inventoryItemId: + $ref: '#/components/schemas/InventoryItemID' + UserCreditsEligible: + title: UserCreditsEligible + type: object + properties: + eligible: + type: boolean + reason: + type: string + required: + - eligible + FeedbackID: + title: FeedbackID + type: string + example: feedback_8cffb23a-f961-444e-b496-0196d1c90adb + Feedback: + title: Feedback + type: object + properties: + commenterId: + $ref: '#/components/schemas/UserID' + commenterName: + type: string + contentAuthorId: + $ref: '#/components/schemas/UserID' + nullable: true + contentAuthorName: + type: string + nullable: true + contentId: + type: string + contentName: + type: string + contentType: + type: string + contentVersion: + type: integer + nullable: true + description: + type: string + nullable: true + id: + $ref: '#/components/schemas/FeedbackID' + reason: + type: string + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + type: + type: string + required: + - commenterId + - commenterName + - contentAuthorId + - contentAuthorName + - contentId + - contentType + - contentVersion + - id + - reason + - tags + - type + LimitedUserGroups: + title: LimitedUserGroups + type: object + properties: + bannerId: + type: string + nullable: true + bannerUrl: + type: string + nullable: true + description: + type: string + discriminator: + $ref: '#/components/schemas/GroupDiscriminator' + groupId: + $ref: '#/components/schemas/GroupID' + iconId: + type: string + nullable: true + iconUrl: + type: string + nullable: true + id: + $ref: '#/components/schemas/GroupMemberID' + isRepresenting: + type: boolean + lastPostCreatedAt: + type: string + nullable: true + format: date-time + lastPostReadAt: + type: string + nullable: true + format: date-time + memberCount: + type: integer + memberVisibility: + type: string + mutualGroup: + type: boolean + name: + type: string + ownerId: + $ref: '#/components/schemas/UserID' + privacy: + type: string + shortCode: + $ref: '#/components/schemas/GroupShortCode' + UserAllGroupPermissions: + title: UserAllGroupPermissions + type: object + description: Map from GroupIDs to an array of the GroupPermissions the user has in that group. + additionalProperties: + type: array + items: + $ref: '#/components/schemas/GroupPermissions' + RepresentedGroup: + title: RepresentedGroup + type: object + properties: + bannerId: + type: string + nullable: true + bannerUrl: + type: string + nullable: true + description: + type: string + discriminator: + $ref: '#/components/schemas/GroupDiscriminator' + groupId: + $ref: '#/components/schemas/GroupID' + iconId: + type: string + nullable: true + iconUrl: + type: string + nullable: true + isRepresenting: + type: boolean + memberCount: + type: integer + memberVisibility: + $ref: '#/components/schemas/GroupUserVisibility' + name: + type: string + ownerId: + $ref: '#/components/schemas/UserID' + privacy: + $ref: '#/components/schemas/GroupPrivacy' + shortCode: + $ref: '#/components/schemas/GroupShortCode' + Mutuals: + title: Mutuals + type: object + properties: + friends: + type: integer + default: 0 + minimum: 0 + groups: + type: integer + default: 0 + minimum: 0 + required: + - friends + - groups + MutualFriend: + title: MutualFriend + type: object + description: User object received when querying mutual friends + properties: + avatarThumbnail: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + currentAvatarImageUrl: + $ref: '#/components/schemas/CurrentAvatarImageUrl' + currentAvatarTags: + type: array + items: + $ref: '#/components/schemas/Tag' + currentAvatarThumbnailImageUrl: + $ref: '#/components/schemas/CurrentAvatarThumbnailImageUrl' + displayName: + type: string + id: + $ref: '#/components/schemas/UserID' + imageUrl: + type: string + profilePicOverride: + type: string + status: + $ref: '#/components/schemas/UserStatus' + statusDescription: + type: string + required: + - currentAvatarImageUrl + - displayName + - id + - imageUrl + - status + - statusDescription + UserSubscriptionEligible: + title: UserSubscriptionEligible + type: object + properties: + activeCancelledSubscription: + type: boolean + giftEligible: + type: boolean + nonExtendVendorWillLoseGiftTime: + type: boolean + purchaseEligible: + type: boolean + subscriptionEligible: + type: boolean + subscriptionOnAltAccount: + type: boolean + required: + - activeCancelledSubscription + - giftEligible + - nonExtendVendorWillLoseGiftTime + - purchaseEligible + - subscriptionEligible + - subscriptionOnAltAccount + TutorialKey: + title: TutorialKey + type: string + description: The ID of a tutorial, in the format `{platform}:{tutorial}:{version}`. `undefined:undefined:v1` is used as a null-ish or sentinel value. + default: undefined:undefined:v1 + example: standalonewindows:steam:v1 + TutorialStatus: + title: TutorialStatus + type: object + properties: + completed: + type: boolean + completedAnyTutorial: + type: boolean + completedTutorials: + type: array + items: + $ref: '#/components/schemas/TutorialKey' + tutorialKey: + $ref: '#/components/schemas/TutorialKey' + required: + - completed + - completedAnyTutorial + - completedTutorials + - tutorialKey + LimitedUnityPackage: + title: LimitedUnityPackage + type: object + description: '' + properties: + created_at: + type: string + nullable: true + format: date-time + platform: + $ref: '#/components/schemas/Platform' + unityVersion: + type: string + example: 2022.3.6f1 + minLength: 1 + required: + - created_at + - platform + - unityVersion + LimitedWorld: + title: LimitedWorld + type: object + description: '' + properties: + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + minLength: 1 + capacity: + type: integer + example: 8 + created_at: + type: string + format: date-time + defaultContentSettings: + $ref: '#/components/schemas/InstanceContentSettings' + favorites: + type: integer + default: 0 + example: 12024 + minimum: 0 + heat: + type: integer + default: 0 + example: 5 + minimum: 0 + id: + $ref: '#/components/schemas/WorldID' + imageUrl: + type: string + minLength: 1 + labsPublicationDate: + type: string + example: none + minLength: 1 + name: + type: string + minLength: 1 + occupants: + type: integer + default: 0 + example: 47 + minimum: 0 + organization: + type: string + default: vrchat + minLength: 1 + popularity: + type: integer + default: 0 + example: 8 + minimum: 0 + previewYoutubeId: + type: string + nullable: true + publicationDate: + type: string + example: none + minLength: 1 + recommendedCapacity: + type: integer + example: 16 + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + storeId: + $ref: '#/components/schemas/StoreID' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + thumbnailImageUrl: + type: string + minLength: 1 + udonProducts: + type: array + items: + $ref: '#/components/schemas/UdonProductId' + unityPackages: + type: array + description: ' ' + items: + $ref: '#/components/schemas/LimitedUnityPackage' + minItems: 1 + updated_at: + type: string + format: date-time + visits: + type: integer + default: 0 + example: 9988675 + minimum: 0 + required: + - authorId + - authorName + - capacity + - created_at + - favorites + - heat + - id + - imageUrl + - labsPublicationDate + - name + - occupants + - organization + - popularity + - publicationDate + - releaseStatus + - tags + - thumbnailImageUrl + - unityPackages + - updated_at + CreateWorldRequest: + title: CreateWorldRequest + type: object + properties: + assetUrl: + type: string + minLength: 1 + assetVersion: + type: integer + minimum: 0 + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + minLength: 1 + capacity: + type: integer + example: 8 + maximum: 40 + minimum: 0 + description: + type: string + id: + $ref: '#/components/schemas/WorldID' + imageUrl: + type: string + minLength: 1 + name: + type: string + minLength: 1 + platform: + $ref: '#/components/schemas/Platform' + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + unityPackageUrl: + type: string + minLength: 1 + unityVersion: + type: string + default: 5.3.4p1 + example: 2022.3.6f1 + minLength: 1 + required: + - assetUrl + - imageUrl + - name + FavoritedWorld: + title: FavoritedWorld + type: object + description: '' + properties: + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + minLength: 1 + capacity: + type: integer + example: 8 + created_at: + type: string + format: date-time + defaultContentSettings: + $ref: '#/components/schemas/InstanceContentSettings' + description: + type: string + minLength: 1 + favoriteGroup: + type: string + minLength: 1 + favoriteId: + $ref: '#/components/schemas/FavoriteID' + favorites: + type: integer + default: 0 + example: 12024 + minimum: 0 + featured: + type: boolean + default: false + heat: + type: integer + default: 0 + example: 5 + minimum: 0 + id: + $ref: '#/components/schemas/WorldID' + imageUrl: + type: string + minLength: 1 + labsPublicationDate: + type: string + example: none + minLength: 1 + name: + type: string + minLength: 1 + occupants: + type: integer + default: 0 + example: 47 + minimum: 0 + organization: + type: string + default: vrchat + minLength: 1 + popularity: + type: integer + default: 0 + example: 8 + minimum: 0 + previewYoutubeId: + type: string + nullable: true + publicationDate: + type: string + example: none + minLength: 1 + recommendedCapacity: + type: integer + example: 16 + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + thumbnailImageUrl: + type: string + minLength: 1 + udonProducts: + type: array + items: + $ref: '#/components/schemas/UdonProductId' + unityPackages: + type: array + description: ' ' + items: + $ref: '#/components/schemas/UnityPackage' + minItems: 1 + updated_at: + type: string + format: date-time + urlList: + type: array + items: + type: string + version: + type: integer + minimum: 1 + visits: + type: integer + default: 0 + example: 9988675 + minimum: 0 + required: + - authorName + - capacity + - favoriteGroup + - favoriteId + - id + - imageUrl + - name + - occupants + - releaseStatus + - thumbnailImageUrl + UpdateWorldRequest: + title: UpdateWorldRequest + type: object + properties: + assetUrl: + type: string + minLength: 1 + assetVersion: + type: string + minLength: 1 + authorId: + $ref: '#/components/schemas/UserID' + authorName: + type: string + minLength: 1 + capacity: + type: integer + example: 8 + maximum: 40 + minimum: 0 + description: + type: string + imageUrl: + type: string + minLength: 1 + name: + type: string + minLength: 1 + platform: + $ref: '#/components/schemas/Platform' + releaseStatus: + $ref: '#/components/schemas/ReleaseStatus' + tags: + type: array + description: ' ' + items: + $ref: '#/components/schemas/Tag' + unityPackageUrl: + type: string + minLength: 1 + unityVersion: + type: string + default: 5.3.4p1 + example: 2022.3.6f1 + minLength: 1 + ChangeWorldTagsRequest: + title: ChangeWorldTagsRequest + type: object + properties: + tags: + type: array + description: The tags being added or removed. + items: + $ref: '#/components/schemas/Tag' + required: + - tags + WorldMetadata: + title: WorldMetadata + type: object + additionalProperties: false + properties: + id: + $ref: '#/components/schemas/WorldID' + metadata: + type: object + required: + - id + - metadata + WorldPublishStatus: + title: WorldPublishStatus + type: object + additionalProperties: false + properties: + canPublish: + type: boolean + default: true + required: + - canPublish + NotificationDetailInvite: + title: NotificationDetailInvite + type: object + properties: + inviteMessage: + type: string + worldId: + $ref: '#/components/schemas/LocationID' + worldName: + type: string + required: + - worldId + - worldName + NotificationDetailInviteResponse: + title: NotificationDetailInviteResponse + type: object + properties: + inResponseTo: + $ref: '#/components/schemas/NotificationID' + responseMessage: + type: string + required: + - inResponseTo + - responseMessage + NotificationDetailRequestInvite: + title: NotificationDetailRequestInvite + type: object + properties: + platform: + $ref: '#/components/schemas/Platform' + description: 'TODO: Does this still exist?' + requestMessage: + type: string + description: Used when using InviteMessage Slot. + NotificationDetailRequestInviteResponse: + title: NotificationDetailRequestInviteResponse + type: object + properties: + inResponseTo: + $ref: '#/components/schemas/NotificationID' + requestMessage: + type: string + description: Used when using InviteMessage Slot. + required: + - inResponseTo + NotificationDetailVoteToKick: + title: NotificationDetailVoteToKick + type: object + properties: + initiatorUserId: + $ref: '#/components/schemas/UserID' + userToKickId: + $ref: '#/components/schemas/UserID' + required: + - initiatorUserId + - userToKickId + securitySchemes: + authCookie: + name: auth + type: apiKey + description: Auth Token via Cookie + in: cookie + authHeader: + type: http + description: Auth token via Header + scheme: basic + twoFactorAuthCookie: + name: twoFactorAuth + type: apiKey + description: 2FA device remembrance via Cookie + in: cookie + responses: + TransactionListResponse: + description: Returns a list of Transaction objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Transaction' + MissingCredentialsError: + description: Error response due to missing auth cookie. + content: + application/json: + examples: + Missing Credentials Example: + value: + error: + message: '"Missing Credentials"' + status_code: 401 + schema: + $ref: '#/components/schemas/Error' + TransactionResponse: + description: Returns a single Transaction object. + content: + application/json: + schema: + $ref: '#/components/schemas/Transaction' + AdminAssetBundleResponse: + description: Returns a single AdminAssetBundle object. + content: + application/json: + schema: + $ref: '#/components/schemas/AdminAssetBundle' + AgreementStatusResponse: + description: Returns a single AgreementStatus object. + content: + application/json: + schema: + $ref: '#/components/schemas/AgreementStatus' + AgreementResponse: + description: Returns a single Agreement object. + content: + application/json: + schema: + $ref: '#/components/schemas/Agreement' + FileAnalysisResponse: + description: Returns a single FileAnalysis object. + content: + application/json: + schema: + $ref: '#/components/schemas/FileAnalysis' + AnalysisNotYetAvailableError: + description: Error response when requesting file Analysis that is not yet available. + content: + application/json: + examples: + Analysis Not Yet Available Error: + value: + error: + message: Analysis not yet available + status_code: 202 + schema: + $ref: '#/components/schemas/Error' + FileNotFoundError: + description: Error response when trying to show information about a non-existent file. + content: + application/json: + examples: + 404 File Not Found: + value: + error: + message: File 'file_ce35d830-e20a-4df0-a6d4-5aaef4508044' not found + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + VerifyAuthTokenResponse: + description: Returns wether a provided auth token is valid or not. + content: + application/json: + schema: + $ref: '#/components/schemas/VerifyAuthTokenResult' + ConfirmEmailResponse: + description: OK + UserExistsResponse: + description: Returns a response if a user exists or not. + content: + application/json: + schema: + $ref: '#/components/schemas/UserExists' + MissingParameterError: + description: Error response when missing at least 1 of the required parameters. + content: + application/json: + examples: + 400 At Least One Parameter Required: + value: + error: + message: '"username, email, or displayName required"' + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + PermissionListResponse: + description: Returns a list of Permission objects. + content: + application/json: + examples: + Standard Permissions Inherited By VRC+: + value: + - id: prms_fe07c8a7-a4ca-4eda-97e5-e241040ef6f8 + name: permission-trust-boost + ownerDisplayName: Arctor + ownerId: usr_17f19d1e-fd48-493b-a8ad-807a3d8bdd1b + - id: prms_804ba021-9f47-4e25-9847-1f42fdb2e6ff + name: permission-extra-favorites-avatar-groups + data: + maxFavoriteGroups: + avatar: 4 + maxFavoritesPerGroup: + avatar: 25 + ownerDisplayName: Arctor + ownerId: usr_17f19d1e-fd48-493b-a8ad-807a3d8bdd1b + - id: prms_ac88a3e0-c236-47c7-9b47-d795551b7520 + name: permission-early-adopter-tags + data: + tags: + - system_early_adopter + ownerDisplayName: Arctor + ownerId: usr_17f19d1e-fd48-493b-a8ad-807a3d8bdd1b + - id: prms_76f33deb-dd5d-46b7-b79d-e1f8f0a9a1e0 + name: permission-supporter-tags + data: + tags: + - system_supporter + ownerDisplayName: Arctor + ownerId: usr_17f19d1e-fd48-493b-a8ad-807a3d8bdd1b + - id: prms_0d9549db-d30a-48f3-a6b8-6741ce5a4283 + name: permission-invite-photos + data: {} + ownerDisplayName: Nyx + ownerId: usr_bc012e97-a292-4abc-b4e6-f9edcc8c0d2b + - id: prms_153ac0b7-c2dd-43f9-96e3-c61fd2e85509 + name: permission-profile-pic-override + data: {} + ownerDisplayName: Nyx + ownerId: usr_bc012e97-a292-4abc-b4e6-f9edcc8c0d2b + - id: prms_1d9549db-d30a-48f3-a6b8-6741ce5a4283 + name: permission-user-icons + data: {} + ownerDisplayName: Nyx + ownerId: usr_bc012e97-a292-4abc-b4e6-f9edcc8c0d2b + - id: prms_dc02c512-4c03-479c-8c6a-d9329c023baf + name: permission-user-gallery + data: {} + ownerDisplayName: Nyx + ownerId: usr_bc012e97-a292-4abc-b4e6-f9edcc8c0d2b + schema: + type: array + items: + $ref: '#/components/schemas/Permission' + CurrentUserLoginResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CurrentUser' + headers: + Set-Cookie: + description: Successful authentication returns an `auth` cookie. + schema: + type: string + example: auth=authcookie_00000000-0000-0000-0000-000000000000; Expires=Tue, 01 Jan 2030 00:00:00 GMT; Path=/; HttpOnly + Disable2FAResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Disable2FAResult' + Verify2FAEmailCodeResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Verify2FAEmailCodeResult' + headers: + Set-Cookie: + description: Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device. + schema: + type: string + example: twoFactorAuth=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Expires=Tue, 01 Jan 2030 00:00:00 GMT; Path=/; HttpOnly + Verify2FAResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Verify2FAResult' + headers: + Set-Cookie: + description: Provides a `twoFactorAuth` cookie, which can be used to bypasses the 2FA requirement for future logins on the same device. + schema: + type: string + example: twoFactorAuth=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Expires=Tue, 01 Jan 2030 00:00:00 GMT; Path=/; HttpOnly + Pending2FAResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Pending2FAResult' + GetAvatarModerationsResponse: + description: Returns list of globally blocked avatars with timestamps + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AvatarModeration' + CreateAvatarModerationResponse: + description: Returns a single AvatarModerationCreated object + content: + application/json: + schema: + $ref: '#/components/schemas/AvatarModerationCreated' + DeleteAvatarModerationResponse: + description: Returns a single OkStatus2 object + content: + application/json: + schema: + $ref: '#/components/schemas/OkStatus2' + FavoriteLimitsResponse: + description: Returns a single FavoriteLimits object. + content: + application/json: + schema: + $ref: '#/components/schemas/FavoriteLimits' + LimitedUserFriendListResponse: + description: Returns a list of LimitedUserFriend objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LimitedUserFriend' + UnfriendSuccess: + description: Successful response after unfriending a user. + content: + application/json: + examples: + Unfriend Success: + value: + success: + message: Friendship destroyed + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + NotFriendsError: + description: Error response when trying to unfriend someone who is not a friend. + content: + application/json: + examples: + 400 Not Friends Response: + value: + error: + message: These users are not friends + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + NotificationListResponse: + description: Returns a list of Notifcation objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Notification' + ClearNotificationsSuccess: + description: Successful response after clearing all notifications. + content: + application/json: + examples: + Unfriend Success: + value: + success: + message: Ok + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + NotificationResponse: + description: Returns a single Notifcation object. + content: + application/json: + examples: + Example Friend Request Response: + value: + id: frq_00000000-0000-0000-0000-000000000000 + type: friendRequest + created_at: '2021-01-01T00:00:00.000Z' + details: '{}' + message: '' + seen: false + senderUserId: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + schema: + $ref: '#/components/schemas/Notification' + NotificationNotFoundError: + description: Error response when trying to perform operations on a non-existing notification. + content: + application/json: + examples: + 404 World Not Found: + value: + error: + message: Notification not found + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + FriendSuccess: + description: Successful response after friending a user. + content: + application/json: + examples: + Unfriend Success: + value: + success: + message: Ok + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + AcceptFriendRequestError: + description: Error response when trying to accept a non-existent friend request. + content: + application/json: + examples: + 404 Accept Friend Request: + value: + error: + message: that friend request could not be found + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + PlayerModerationListResponse: + description: Returns a list of PlayerModeration objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PlayerModeration' + PlayerModerationResponse: + description: Returns a single PlayerModeration object. + content: + application/json: + schema: + $ref: '#/components/schemas/PlayerModeration' + PlayerModerationClearAllSuccess: + description: Success response after e.g. clearing all player moderations. + content: + application/json: + examples: + 200 OK: + value: + success: + message: OK + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + ResendVerificationEmailSuccess: + description: OK + content: + application/json: + examples: + Resend Verification Email Success: + value: + success: + message: Verification Email Sent! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + UserSubscriptionListResponse: + description: Returns a list of UserSubscription objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserSubscription' + Get2FARecoveryCodesResponse: + description: Returns the two factor recovery codes + content: + application/json: + schema: + $ref: '#/components/schemas/TwoFactorRecoveryCodes' + PlayerModerationUnmoderatedSuccess: + description: Success response after unmoderating a player moderation. + content: + application/json: + examples: + 200 All Of PlayerModerationType Unmoderated: + value: + success: + message: PlayerModerations of type undefined removed + status_code: 200 + 200 Specific User Unmoderated: + value: + success: + message: User usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 unmoderated + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + VerifyLoginPlaceResponse: + description: OK + AvatarStyleListResponse: + description: Returns a list of AvatarStyle objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AvatarStyle' + AvatarListResponse: + description: Returns a list of Avatar objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Avatar' + AvatarResponse: + description: Returns a single Avatar object. + content: + application/json: + schema: + $ref: '#/components/schemas/Avatar' + UnableToCreateAvatarNowError: + description: Error response due to missing permissions. + content: + application/json: + examples: + Unable To Create Avatar Now Example: + value: + error: + message: You can't create an avatar right now + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + FeaturedSetNotAdminError: + description: Error response when set featured to true without being an admin. + content: + application/json: + examples: + 401 Cannot Set Featured: + value: + error: + message: cannot set featured tag if you are not an admin + status_code: 401 + schema: + $ref: '#/components/schemas/Error' + AvatarSeeOtherUserFavoritesError: + description: Error response when trying to see favourited avatars of another user without sufficient admin permissions. + content: + application/json: + examples: + 403 Cant See Other User Favorite Avatars: + value: + error: + message: \"You can only see your own favorite avatars!\" + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + AvatarImpostorQueueStatsResponse: + description: Returns a Service Queue Stats. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceQueueStats' + AvatarNotFoundError: + description: Error response when trying to show information about a non-existent avatar. + content: + application/json: + examples: + 404 Avatar Not Found: + value: + error: + message: Avatar Not Found + status_code: 404 + 404 Can't find avatar: + value: + error: + message: Can't find avatar! + status_code: 404 + 404 Couldn't find that avatar: + value: + error: + message: We couldn't find that avatar! + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + AvatarImpostorEnqueueResponse: + description: Returns a Service Status. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceStatus' + CurrentUserResponse: + description: Returns a single CurrentUser object. + content: + application/json: + schema: + $ref: '#/components/schemas/CurrentUser' + AvatarNotTaggedAsFallbackError: + description: Error response when trying to select a fallback avatar that is missing the fallback tag. + content: + application/json: + examples: + 403 Cant Select Non-Fallback as Fallback: + value: + error: + message: This avatar isn't tagged as a quest fallback avatar. + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + CalendarEventListResponse: + description: Returns a list of CalendarEvent objects. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCalendarEventList' + CalendarEventDiscoveryResponse: + description: Returns a CalendarEventDiscovery objects. + content: + application/json: + schema: + $ref: '#/components/schemas/CalendarEventDiscovery' + CalendarEventResponse: + description: Returns a single CalendarEvent object. + content: + application/json: + schema: + $ref: '#/components/schemas/CalendarEvent' + CalendarOperationError: + description: Error response due to an invalid or illegal calendar request. + content: + application/json: + examples: + Event Limit Example: + value: + error: + message: You're not allowed to make more than 100 events in a single month + status_code: 403 + Insufficient Permission Example: + value: + error: + message: Can't create calendar entries for that owner ID + status_code: 403 + Retroactive Event Example: + value: + error: + message: Calendar Entry must start in the future + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + CalendarEventNotFoundError: + description: 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. + content: + application/json: + examples: + 404 File Not Found: + value: + error: + message: Calendar Entry not foundǃ + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + DeleteCalendarEventSuccess: + description: Successful response after deleting a calendar event. + content: + application/json: + examples: + Deleted Calendar Entry: + value: + success: + message: Calendar Entry deleted! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + ICSResponse: + description: iCalendar file download + content: + text/calendar: + schema: + type: string + format: binary + APIConfigResponse: + description: Returns the API's config. + content: + application/json: + schema: + $ref: '#/components/schemas/APIConfig' + DownloadSourceCodeAccessError: + description: Error response when trying to download non-public and non-main JavaScript or CSS without Admin Credentials. + content: + application/json: + examples: + Only Admins Can Get Non-Main Branches: + value: + error: + message: only admins can get non-main branches + status_code: 400 + Only Admins Can Get Non-Public Variants: + value: + error: + message: only admins can get non-public variants + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + LicenseListResponse: + description: Returns a list of License objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/License' + EarningsMetricsResponse: + description: Returns a single EarningsMetrics object. + content: + application/json: + schema: + $ref: '#/components/schemas/EarningsMetrics' + ProductPurchaseResponse: + description: Returns a single ProductPurchase object. + content: + application/json: + schema: + $ref: '#/components/schemas/ProductPurchase' + ProductPurchaseListResponse: + description: Returns a list of ProductPurchase objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductPurchase' + ProductPurchaseStacksResponse: + description: Returns a list of stacks for a product purchase. + content: + application/json: + schema: + type: array + items: + type: object + SellerEligibilityResponse: + description: Returns a single SellerEligibility object. + content: + application/json: + schema: + $ref: '#/components/schemas/SellerEligibility' + StoreResponse: + description: Returns a single Store object. + content: + application/json: + schema: + $ref: '#/components/schemas/Store' + StoreShelfListResponse: + description: Returns a list of StoreShelf objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StoreShelf' + StoreListResponse: + description: Returns a list of Store objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Store' + FavoriteGroupResponse: + description: Returns a single FavoriteGroup object. + content: + application/json: + schema: + $ref: '#/components/schemas/FavoriteGroup' + FavoriteGroupClearedSuccess: + description: Success response after clearing a favorite group. + content: + application/json: + examples: + 200 Favorite Group Cleared: + value: + success: + message: favorite deleted! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + FavoriteGroupListResponse: + description: Returns a list of FavoriteGroup objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/FavoriteGroup' + FavoriteListResponse: + description: Returns a list of Favorite objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Favorite' + FavoriteResponse: + description: Returns a single Favorite object. + content: + application/json: + schema: + $ref: '#/components/schemas/Favorite' + FavoriteAddAlreadyFavoritedError: + description: Error response when trying favorite someone or something when already having it/them favorited. + content: + application/json: + examples: + 400 Already Favorited That Friend: + value: + error: + message: You already have that friend favorited + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + FavoriteAddNotFriendsError: + description: Error response when trying favorite someone whom you are not friends with. + content: + application/json: + examples: + 403 Favorite Add Not Friends Error: + value: + error: + message: you are not friends with that userǃ + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + FavoriteRemovedSuccess: + description: Success response after removing a favorite. + content: + application/json: + examples: + 200 Favorite Removed: + value: + success: + message: favorite deleted! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + FavoriteNotFoundError: + description: Error response when trying to show information about a non-existent favorite. + content: + application/json: + examples: + 404 Favorite not found: + value: + error: + message: 404 couldn't find that favorite + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + FileResponse: + description: Returns a single File object. + content: + application/json: + examples: + Example Avatar File: + value: + id: file_00000000-0000-0000-0000-000000000000 + name: Avatar - Test Avatar - Unity package - 2017․4․28f1_3_standalonewindows_Release + extension: .unitypackage + mimeType: application/gzip + ownerId: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + tags: [] + versions: + - created_at: '2019-08-15T11:04:37.910Z' + status: complete + version: 0 + - created_at: '2019-08-15T11:04:49.702Z' + delta: + category: queued + fileName: Avatar-Test-Avatar-Unity.file_00000000-0000-0000-0000-000000000000.1.unitypackage.delta + md5: '' + sizeInBytes: 0 + status: none + uploadId: '' + url: https://s3.us-east-1.amazonaws.com/files.vrchat.cloud/Avatar-Test-Avatar-Unity.file_00000000-0000-0000-0000-000000000000.1.unitypackage.delta + file: + category: multipart + fileName: Avatar-Test-Avatar-Unity.file_00000000-0000-0000-0000-000000000000.1.unitypackage + md5: xxxxxxxxxxxxxxxxxxx== + sizeInBytes: 303055180 + status: complete + uploadId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + url: https://s3.us-east-1.amazonaws.com/files.vrchat.cloud/Avatar-Test-Avatar-Unity.file_00000000-0000-0000-0000-000000000000.1.unitypackage + signature: + category: simple + fileName: Avatar-Test-Avatar-Unity.file_00000000-0000-0000-0000-000000000000.1.unitypackage.signature + md5: xxxxxxxxxxxxxxxx== + sizeInBytes: 532748 + status: complete + uploadId: '' + url: https://s3.us-east-1.amazonaws.com/files.vrchat.cloud/Avatar-Test-Avatar-Unity.file_00000000-0000-0000-0000-000000000000.1.unitypackage.signature + status: complete + version: 1 + schema: + $ref: '#/components/schemas/File' + FileDeletedError: + description: Error response when trying to delete a non-existent file. + content: + application/json: + examples: + File Deleted Error: + value: + error: + message: File 'file_ce35d830-e20a-4df0-a6d4-5aaef4508044' not found + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + RawFileResponse: + description: Raw file + content: + image/*: + schema: + type: string + format: binary + FileVersionDeleteInitialError: + description: Error response when trying to delete the initial version of a file. Delete the main File object instead. + content: + application/json: + examples: + 400 Delete Initial File Version: + value: + error: + message: Cannot delete the initial version of the file‚ just delete the entire file record․ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + FileVersionDeleteMiddleError: + description: Error response when trying to delete any version of a file that is not the last one. + content: + application/json: + examples: + 409/500 Delete Non-Last File Version: + value: + error: + message: 409 Cannot delete against anything but the latest version of this file˸ 1‚ 11 + status_code: 500 + schema: + $ref: '#/components/schemas/Error' + FileUploadURLResponse: + description: See [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](AWS REST docs - PUT Object) + content: + application/json: + examples: + Example Response: + value: + url: https://s3.amazonaws.com/files.vrchat.cloud/Avatar-MyAvatar-Un.file_00000000-0000-0000-0000-000000000000.1.unitypackage?AWSAccessKeyId=XXXXXXXXXXXXXXXXXXXX&Expires=1626028518&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&partNumber=1&uploadId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxx + schema: + $ref: '#/components/schemas/FileUploadURL' + FileUploadAlreadyFinishedError: + description: Error response when trying to start an upload against a FileVersion that is already marked as `complete`. + content: + application/json: + examples: + Tried To Upload Against Already Finished Version: + value: + error: + message: Cannot upload against a complete version entry․ Create a new version of this file before uploading․ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + FileVersionUploadStatusResponse: + description: Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. + content: + application/json: + examples: + Example Access Key: + value: + etags: [] + fileName: Avatar-MyAvatar-Un.file_00000000-0000-0000-0000-000000000000.1.unitypackage + maxParts: 1000 + nextPartNumber: 0 + parts: [] + uploadId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxx + schema: + $ref: '#/components/schemas/FileVersionUploadStatus' + FileListResponse: + description: Returns a list of File objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/File' + GroupGalleryFileOrderResponse: + description: Returns a list of File IDs. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupGalleryFileOrder' + LimitedGroupListResponse: + description: Returns a list of LimitedGroup objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LimitedGroup' + GroupResponse: + description: Returns a single Group object. + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + GroupRoleTemplatesResponse: + description: Returns a dictionary of GroupRoleTemplate objects. + content: + application/json: + schema: + type: object + additionalProperties: + $ref: '#/components/schemas/GroupRoleTemplateValues' + GroupNotFoundError: + description: Error response when trying to perform operations on a non-existing group. + content: + application/json: + examples: + 404 World Not Found: + value: + error: + message: Can't find groupǃ + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + DeleteGroupSuccess: + description: Successful response after deleting a Group. + content: + application/json: + examples: + Deleted Group: + value: + success: + message: Group deleted! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupAnnouncementResponse: + description: Returns a single GroupAnnouncement object. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupAnnouncement' + DeleteGroupAnnouncementSuccess: + description: Successful response after deleting/clearing the group announcement. + content: + application/json: + examples: + Deleted Group Announcement: + value: + success: + message: Group announcement was cleared! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupAuditLogEntryTypeListResponse: + description: Returns a list of GroupAuditLogEntryTypes. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupAuditLogEntryType' + GroupAuditLogListResponse: + description: Returns a list of GroupAudit objects, wrapped in new pagination format. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGroupAuditLogEntryList' + GroupMemberListResponse: + description: Returns a list of GroupMember objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupMember' + NoPermission: + description: Error response due to missing permissions. + content: + application/json: + examples: + No Permission Example: + value: + error: + message: You don't have permission․ + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + GroupMemberResponse: + description: Returns a list of GroupMember objects. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupMember' + BanGroupMemberBadRequestError: + description: Bad request error response when banning a user + content: + application/json: + examples: + User Already Banned: + value: + error: + message: User is already banned․ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + BlockGroupSuccess: + description: Successful response after blocking a Group. + content: + application/json: + examples: + Blocked Group: + value: + success: + message: You've blocked the group. + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupAlreadyBlockedError: + description: Error response when trying to block a group you already have blocked. + content: + application/json: + examples: + 403 Already BLocked: + value: + error: + message: You must leave a group before blocking it․ + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + GroupGalleryResponse: + description: Returns a single GroupGallery object. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupGallery' + GroupGalleryImageListResponse: + description: Returns a list of GroupGalleryImage objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupGalleryImage' + DeleteGroupGallerySuccess: + description: Successful response after deleting a group gallery. + content: + application/json: + examples: + Deleted Group Gallery: + value: + success: + message: Gallery deleted! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupGalleryImageResponse: + description: Returns a single GroupGalleryImage object. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupGalleryImage' + DeleteGroupGalleryImageSuccess: + description: Successful response after deleting a group gallery image. + content: + application/json: + examples: + Deleted Group Gallery Image: + value: + success: + message: Gallery image removed! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupGalleryImageDeleteForbiddenError: + description: Error response when trying to delete a submission to a group's gallery when the user does not have permission to do so. + content: + application/json: + examples: + 403 Cannot Delete Submission: + value: + error: + message: You can't remove this gallery submission! + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + GroupInstanceListResponse: + description: Returns a list of GroupInstance objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupInstance' + GroupNotMemberError: + description: Error response when trying to perform operations on a group you are not member of. + content: + application/json: + examples: + 403 Not Group Member: + value: + error: + message: You're not a member. + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + DeclineGroupInviteSuccess: + description: Successful response after declining a group invite. + content: + application/json: + examples: + Blocked Group: + value: + success: + message: Invite declined. + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + DeclineGroupInviteBadRequestError: + description: Bad request error response when declining a group invite. + content: + application/json: + examples: + User Not Invited: + value: + error: + message: You can't decline an invite that wasn't sent to you․ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + GroupInviteBadRequestError: + description: Bad request error response when creating a group invite. + content: + application/json: + examples: + Group Member Already Exists: + value: + error: + message: User is already a member of this group. + status_code: 400 + User Already Invited: + value: + error: + message: User is already invited. + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + GroupInviteForbiddenError: + description: Forbidden error response when creating a group invite. + content: + application/json: + examples: + Forbidden to Invite User: + value: + error: + message: You can't invite that user․ + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + DeleteGroupInviteBadRequestError: + description: Bad request error response when deleting a group invite + content: + application/json: + examples: + User Not Invited: + value: + error: + message: You can't uninvite a user who wasn't invited․ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + GroupAlreadyMemberError: + description: Error response when trying to join a group that the user is already a member of. + content: + application/json: + examples: + 400 User Already Member: + value: + error: + message: You're already a member! + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + UsersInvalidSearchError: + description: Error response when trying to search list of users with an invalid request. + content: + application/json: + examples: + 400 N is too high: + value: + error: + message: n=1000 is much too high․ implement paging you savages․ + status_code: 400 + 400 N is too low: + value: + error: + message: n must be a positive integer˸ '-1' + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + GroupMemberSearchResponse: + description: Returns a list of GroupMember objects from a search. + content: + application/json: + schema: + type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/GroupMember' + total: + type: integer + description: Number of members returned + DeleteGroupMemberSuccess: + description: Successful response after deleting a group member. + content: + application/json: + examples: + Deleted Group Member: + value: + success: + message: Group member deleted! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupRoleIDListResponse: + description: Returns a list of GroupRoleID objects. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupRoleIDList' + GroupPermissionListResponse: + description: Returns a list of GroupPermission objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupPermission' + GroupPostsResponse: + description: Returns a GroupPost Array. + content: + application/json: + schema: + type: object + properties: + posts: + type: array + items: + $ref: '#/components/schemas/GroupPost' + GroupPostResponse: + description: Returns a GroupPost object. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupPost' + GroupPostResponseSuccess: + description: Response after deleting a group post. + content: + application/json: + examples: + Deleted Group Post: + value: + success: + message: Group Post was deleted! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + UpdateGroupRepresentationSuccess: + description: Successful response after updating group representation. + content: + application/json: + examples: + Updated Group Representation: + value: + success: + message: Group representation updated! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupJoinRequestResponseBadRequestError: + description: Bad request error response when responding to a group join request + content: + application/json: + examples: + User Join Request Not Exist: + value: + error: + message: You can't accept a join request for a user who hasn't requested to join․ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + GroupRoleListResponse: + description: Returns a list of GroupRole objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/GroupRole' + GroupRoleResponse: + description: Returns a single GroupRole object. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupRole' + GroupTransferableResponse: + description: Returns a single GroupTransferable object. + content: + application/json: + schema: + $ref: '#/components/schemas/GroupTransferable' + GroupTransferSuccess: + description: Successful response after initiating or completing a group transfer. + content: + application/json: + examples: + Complete Transfer: + value: + success: + message: Group transfer completed. + status_code: 200 + Initiate Transfer: + value: + success: + message: Group transfer initiated. + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + GroupTransferInvalidError: + description: Error response when trying to transfer a group to an ineligible target user. + content: + application/json: + examples: + 403 Ineligible Target: + value: + error: + message: Cannot transfer this group. + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + GroupTransferCanceledSuccess: + description: Successful response after cancelling a group transfer. + content: + application/json: + examples: + Initiate Transfer: + value: + success: + message: Group transfer cancelled. + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + NoGroupTransferError: + description: Error response when trying to cancel a transfer for a group without a pending transfer. + content: + application/json: + examples: + 400 No Pending Transfer: + value: + error: + message: No group transfer to cancel. + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + APIHealthResponse: + description: Returns the API's health. + content: + application/json: + examples: + Example Response: + value: + buildVersionTag: master-build-2021-06-24-fred-drakeshoot + ok: true + serverName: prod-api-green-marsh-dgt + schema: + $ref: '#/components/schemas/APIHealth' + InfoPushListResponse: + description: Returns a list of InfoPush objects. + content: + application/json: + examples: + Game Version: + value: + - id: build-config + createdAt: '2021-08-21T04:27:05+00:00' + data: + version: 2021.3.4 + hash: a76e7da333c6a5a8f7ec2adee064cac9 + isEnabled: true + priority: 1000 + releaseStatus: public + tags: + - high-priority + - user-all + updatedAt: '2021-09-18T04:37:29+00:00' + New Quick Menu: + value: + - id: launch-beta + createdAt: '2021-09-13T20:50:40+00:00' + data: + imageUrl: https://assets.vrchat.com/ips/assets/b5af844263458d3a5b3e01b52ef7fe47f7b3b563eace4ee972205f250474c879.png + onPressed: + parameters: + - https://docs.vrchat.com/v2021.4.1/docs/latest-release + command: OpenURL + hash: 69abf85064503e870124acde330bb0ae + isEnabled: true + priority: 970 + releaseStatus: public + tags: + - quick-menu-banner + - user-all + updatedAt: '2021-11-08T22:45:25+00:00' + World Hot Row: + value: + - id: world-hot + createdAt: '2020-06-05T08:23:31+00:00' + data: + contentList: + name: Hot + platform: ThisPlatformSupported + sortHeading: heat + sortOrder: descending + sortOwnership: any + imageUrl: https://assets.vrchat.com/ips/assets/40f8ad117f8d6734ac84039d8ced290b6676486099b7cc56759efe7b259ca05d.png + hash: f0e97e72c437aa437e92c1184630bec6 + isEnabled: true + priority: 1000 + releaseStatus: public + tags: + - world-category + updatedAt: '2020-08-16T07:04:07+00:00' + schema: + type: array + items: + $ref: '#/components/schemas/InfoPush' + InstanceResponse: + description: Returns a single Instance object. + content: + application/json: + schema: + $ref: '#/components/schemas/Instance' + LocationIDListResponse: + description: Returns a list of LocationIDs. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LocationID' + InstanceNotFoundError: + description: Error response due to non existant instance + content: + application/json: + examples: + Instance Not Found Example: + value: + error: + message: '"Instance not found"' + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + InstanceCloseForbiddenError: + description: Error response due to not being allowed to close an instance + content: + application/json: + examples: + Instance Already Closed Example: + value: + error: + message: You're not allowed to close an already closed instance․ + status_code: 403 + Not Allowed to Close Instance Example: + value: + error: + message: You're not allowed to close this instance․ + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + InstanceShortNameResponse: + description: Returns an instance secureName and/or shortName. + content: + application/json: + schema: + $ref: '#/components/schemas/InstanceShortNameResponse' + InventoryResponse: + description: Returns an Inventory object. + content: + application/json: + schema: + $ref: '#/components/schemas/Inventory' + InventoryShareResponse: + description: Returns an OkStatus object. + content: + application/json: + schema: + $ref: '#/components/schemas/OkStatus' + InventorySpawnResponse: + description: Returns an InventorySpawn object. + content: + application/json: + schema: + $ref: '#/components/schemas/InventorySpawn' + InventoryCollectionsResponse: + description: Returns a list of strings. + content: + application/json: + schema: + type: array + items: + type: string + InventoryDropListResponse: + description: Returns a list of InventoryDrop objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/InventoryDrop' + InventoryTemplateResponse: + description: Returns an InventoryTemplate object. + content: + application/json: + schema: + $ref: '#/components/schemas/InventoryTemplate' + InventoryItemResponse: + description: Returns an InventoryItem object. + content: + application/json: + schema: + $ref: '#/components/schemas/InventoryItem' + DeleteInventoryItemResponse: + description: Returns an SuccessFlag object. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessFlag' + ConsumeInventoryItemResponse: + description: Returns an InventoryConsumptionResults object. + content: + application/json: + schema: + $ref: '#/components/schemas/InventoryConsumptionResults' + InventoryItemNotConsumable: + description: Error response when trying to consume an InventoryItem lacking the consumable flag. + content: + application/json: + examples: + InventoryItem not consumable: + value: + error: + message: InventoryItem not consumable + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + InventoryItemNotEquippable: + description: Error response when trying to equip an InventoryItem lacking the equippable flag. + content: + application/json: + examples: + InventoryItem not equippable: + value: + error: + message: InventoryItem not equippable + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + UnequipInventorySlotResponse: + description: Returns a string. + content: + application/json: + schema: + type: string + example: OK + SendNotificationResponse: + description: Returns a single SentNotifcation object. + content: + application/json: + examples: + Example Friend Request Response: + value: + id: frq_00000000-0000-0000-0000-000000000000 + type: friendRequest + created_at: '2021-01-01T00:00:00.000Z' + details: {} + message: '' + receiverUserId: usr_00000000-0000-0000-0000-000000000000 + senderUserId: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 + schema: + $ref: '#/components/schemas/SentNotification' + InviteResponse400Error: + description: Error response when trying to respond to an invite and something went wrong. + content: + application/json: + examples: + Already Responded Error: + value: + error: + message: '"You''ve already responded to that request."' + status_code: 400 + Cannot Respond Self Invite Error: + value: + error: + message: '"You cannot respond to your own invites."' + status_code: 400 + Response Slot Out Of Bounds Error: + value: + error: + message: '"Response slot is out of bounds."' + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + InviteMustBeFriendsError: + description: Error response when trying to invite someome whom you are not friends with. + content: + application/json: + examples: + Must Be Friends Error: + value: + error: + message: '"You need to be friends with that user first."' + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + JamListResponse: + description: Returns a list of Jam objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Jam' + JamResponse: + description: Returns a Jam object. + content: + application/json: + schema: + $ref: '#/components/schemas/Jam' + JamNotFoundError: + description: Error response when trying to show information about a non-existent jam. + content: + application/json: + examples: + 404 Jam not found: + value: + error: + message: 404 id must be an ID˸ 'invalid_id_here' + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + JamSubmissionListResponse: + description: Returns a list of JamSubmission objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/JamSubmission' + JamSubmissionResponse: + description: Returns a single JamSubmission object. + content: + application/json: + schema: + $ref: '#/components/schemas/JamSubmission' + DeleteJamSubmissionResponse: + description: Returns an Success object. + content: + application/json: + schema: + $ref: '#/components/schemas/Success' + LicenseGroupResponse: + description: Returns a single LicenseGroup object. + content: + application/json: + schema: + $ref: '#/components/schemas/LicenseGroup' + ProductListingResponse: + description: Returns a single ProductListing object. + content: + application/json: + schema: + $ref: '#/components/schemas/ProductListing' + DeleteProductListingResponse: + description: Returns an SuccessFlag object. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessFlag' + LogoutSuccess: + description: OK + content: + application/json: + examples: + Logout Success: + value: + success: + message: Ok! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + headers: + Set-Cookie: + description: Clears the `auth` cookie. + schema: + type: string + default: auth=; Expires=Tue, 01 Jan 2030 00:00:00 GMT; Path=/ + \0Set-Cookie: + description: Clears the `age` cookie. + schema: + type: string + default: age=; Expires=Tue, 01 Jan 2030 00:00:00 GMT; Path=/ + \0\0Set-Cookie: + description: Clears the `tos` cookie. + schema: + type: string + default: tos=; Expires=Tue, 01 Jan 2030 00:00:00 GMT; Path=/ + InviteMessageListResponse: + description: Returns a list of InviteMessage objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/InviteMessage' + InviteMessageInvalidSlotNumberError: + description: Error response when trying to update an Invite Message with an invalid slot number. + content: + application/json: + examples: + 400 Negative Slot Number Error: + value: + error: + message: Really? A negative slot? Tsk-tsk․․․ + status_code: 400 + 400 Too High Slot Number Error: + value: + error: + message: That is too high of a slot number․ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + NotAuthorizedActionError: + description: Error response due to missing authorization to perform that action. + content: + application/json: + examples: + Not Authorized Example: + value: + error: + message: You are not authorized to perform that action. + status_code: 401 + schema: + $ref: '#/components/schemas/Error' + InviteMessageResponse: + description: Returns a single InviteMessage object. + content: + application/json: + schema: + $ref: '#/components/schemas/InviteMessage' + InviteMessageGetNegativeSlotError: + description: Error response when trying to get an Invite Message with a negative slot number. + content: + application/json: + examples: + 200 Negative Slot Number Error: + value: {} + schema: + $ref: '#/components/schemas/Error' + InviteMessageGetTooHighSlotError: + description: Error response when trying to get an Invite Message with a too high slot number. + content: + application/json: + examples: + 404 Slot Number Too High Error: + value: + error: + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + InviteMessageUpdateRateLimitError: + description: Error response when trying to update an Invite Message before the cooldown has expired. + content: + application/json: + examples: + Update Invite Message Please Wait Error: + value: + error: + message: Please wait 60 more minutes until you try again․ + status_code: 429 + schema: + $ref: '#/components/schemas/Error' + InviteMessageNoEntryForSlotError: + description: Error response when trying to reset an Invite Message whos slot doesn't exist. + content: + application/json: + examples: + 404 No Custom Invite Message In Slot: + value: + error: + message: There's no entry for that slot. + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + ModerationReportListResponse: + description: Returns a list of ModerationReport objects, wrapped in new pagination format. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedModerationReportList' + InvalidAdminCredentialsError: + description: Error response due to missing Administrator credentials. + content: + application/json: + examples: + Invalid Admin Credentials Example: + value: + error: + message: '"Invalid Admin Credentials"' + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + ModerationReportResponse: + description: Returns a single ModerationReport object. + content: + application/json: + schema: + $ref: '#/components/schemas/ModerationReport' + DeleteModerationReportResponse: + description: Returns an SuccessFlag object. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessFlag' + NotificationV2ListResponse: + description: Returns a list of NotifcationV2 objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationV2' + ClearNotificationsV2Success: + description: Successful response after clearing all notifications. + content: + application/json: + examples: + Unfriend Success: + value: + success: + message: Notifications cleared. + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + NotificationV2Response: + description: Returns a single NotifcationV2 object. + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationV2' + ClearNotificationV2Success: + description: Successful response after clearing a notification. + content: + application/json: + examples: + Unfriend Success: + value: + success: + message: Notification cleared. + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + NotificationOperationError: + description: Error response when trying to perform an invalid operations on a notification. + content: + application/json: + examples: + 400 No Reply: + value: + error: + message: This notification cannot be replied toǃ + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + PermissionResponse: + description: Returns a single Permission object. + content: + application/json: + schema: + $ref: '#/components/schemas/Permission' + PrintResponse: + description: Returns a single Print object. + content: + application/json: + schema: + $ref: '#/components/schemas/Print' + PrintListResponse: + description: Returns a list of Print objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Print' + UnableToRequestOtherUsersPrintsError: + description: Error response when trying to request another user's prints. + content: + application/json: + examples: + 403 Unable to request another user's prints: + value: + error: + message: Unable to request another user's prints. + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + ProductResponse: + description: Returns a single Product object. + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + DeleteProductResponse: + description: Returns an SuccessFlag object. + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessFlag' + PropListResponse: + description: Returns a list of Prop objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Prop' + PropResponse: + description: Returns a single Prop object. + content: + application/json: + schema: + $ref: '#/components/schemas/Prop' + NoSuchPropError: + description: Error response when trying to perform operations on a non-existing prop. + content: + application/json: + examples: + 404 Prop Not Found: + value: + error: + message: That prop does not exist. + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + PropPublishStatusResponse: + description: Returns a single PropPublishStatus object. + content: + application/json: + schema: + $ref: '#/components/schemas/PropPublishStatus' + RewardRedemptionResponse: + description: Returns a single RewardRedemptionResult object. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RewardRedemptionResult' + SubscriptionListResponse: + description: Returns a list of Subscription objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Subscription' + TiliaStatusResponse: + description: Returns a single TiliaStatus object. + content: + application/json: + schema: + $ref: '#/components/schemas/TiliaStatus' + SystemTimeResponse: + description: OK + content: + application/json: + schema: + type: string + description: Does not return millisecond precision. Always returns time in UTC. + example: '2021-08-20T12:38:42+00:00' + format: date-time + TokenBundleListResponse: + description: Returns a list of TokenBundle objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenBundle' + BulkPurchasesListResponse: + description: Returns a list of ??? objects. + content: + application/json: + schema: + type: array + items: + type: object + UserSubscriptionResponse: + description: Returns a UserSubscription object. + content: + application/json: + schema: + $ref: '#/components/schemas/UserSubscription' + BalanceResponse: + description: Returns a single Balance object. + content: + application/json: + schema: + $ref: '#/components/schemas/Balance' + EconomyAccountResponse: + description: Returns a single EconomyAccount object. + content: + application/json: + schema: + $ref: '#/components/schemas/EconomyAccount' + EconomyBalancesResponse: + description: Returns an EconomyBalances object. + content: + application/json: + schema: + $ref: '#/components/schemas/EconomyBalances' + EconomyPayoutListResponse: + description: Returns an EconomyPayoutList object. + content: + application/json: + schema: + $ref: '#/components/schemas/EconomyPayoutList' + EconomyPayoutStatusResponse: + description: Returns an EconomyPayoutStatus object. + content: + application/json: + schema: + $ref: '#/components/schemas/EconomyPayoutStatus' + ProductPurchaseHistoryResponse: + description: Returns a single ProductPurchaseHistory object. + content: + application/json: + schema: + $ref: '#/components/schemas/ProductPurchaseHistory' + FriendBadRequestError: + description: Bad request error response when sending a friend request + content: + application/json: + examples: + Already Sent a Friend Request: + value: + error: + message: This user has already been sent a friend request + status_code: 400 + Users Already Friends: + value: + error: + message: Users are already friends + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + UserDoesntExistError: + description: Error response when trying to send a friend request to a user which doesn't exist. + content: + application/json: + examples: + 404 User Doesn't Exist Response: + value: + error: + message: user doesn't existǃ + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + DeleteFriendSuccess: + description: Successful response after cancelling a friend request. + content: + application/json: + examples: + Deleted Friend Request: + value: + success: + message: Friendship request deleted + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + DeleteFriendRequestError: + description: Error response when trying to delete a non-existent friend-request. + content: + application/json: + examples: + 404 Delete Friend Request: + value: + error: + message: that friend request could not be found + status_code: 404 + schema: + $ref: '#/components/schemas/Error' + FriendStatusResponse: + description: Returns a users Friend Status. + content: + application/json: + examples: + Is Friend: + value: + incomingRequest: false + isFriend: true + outgoingRequest: false + Not Friends: + value: + incomingRequest: false + isFriend: true + outgoingRequest: false + schema: + $ref: '#/components/schemas/FriendStatus' + ProductListingListResponse: + description: Returns a list of ProductListing objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProductListing' + ProductListResponse: + description: Returns a list of Product objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Product' + TiliaKycResponse: + description: Returns a TiliaKyc object. + content: + application/json: + schema: + $ref: '#/components/schemas/TiliaKyc' + TiliaTOSResponse: + description: Returns a single TiliaTOS object. + content: + application/json: + schema: + $ref: '#/components/schemas/TiliaTOS' + UpdateTiliaTOSResponse: + description: Returns a UserSubscription object. + content: + application/json: + schema: + type: object + nullable: true + UserNoteListResponse: + description: Returns a list of UserNote objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserNote' + UserNoteResponse: + description: Returns a single UserNote object. + content: + application/json: + schema: + $ref: '#/components/schemas/UserNote' + LimitedUserSearchListResponse: + description: Returns a list of LimitedUserSearch objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LimitedUserSearch' + UserResponse: + description: Returns a single User object. + content: + application/json: + schema: + $ref: '#/components/schemas/User' + CurrentPasswordRequiredError: + description: Error response when a user attempts to change a property without supplying their current password. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + UserTagInvalidError: + description: 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. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + AvatarSeeOtherUserCurrentAvatarError: + description: Error response when trying to see another users current avatar without sufficient admin permissions. + content: + application/json: + examples: + 403 Cant See Other Users Current Avatar: + value: + error: + message: \"You do not have permission to fetch details about the avatar on this user.\" + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + UserMustBeOwnError: + description: Error response when trying get group instances of another user. + content: + application/json: + examples: + User Id must be your own: + value: + error: + message: User ID must be your own․ + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + BoopSuccess: + description: Successful response after booping a user. + content: + application/json: + examples: + Boop Success: + value: + success: + message: User booped! + status_code: 200 + schema: + $ref: '#/components/schemas/Success' + UserCreditsEligibleResponse: + description: Returns a single UserCreditsEligible object. + content: + application/json: + schema: + $ref: '#/components/schemas/UserCreditsEligible' + DeleteUserResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CurrentUser' + FeedbackListResponse: + description: Returns a list of Feedback objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Feedback' + LimitedUserGroupListResponse: + description: Returns a list of LimitedUserGroups objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LimitedUserGroups' + GroupListResponse: + description: Returns a list of Group objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Group' + UserAllGroupPermissionsResponse: + description: The group permissions the user has for every joined group. + content: + application/json: + schema: + $ref: '#/components/schemas/UserAllGroupPermissions' + UserGroupInstanceListResponse: + description: Returns a list of Instance objects with a fetched at time. + content: + application/json: + schema: + type: object + properties: + fetchedAt: + type: string + format: date-time + instances: + type: array + items: + $ref: '#/components/schemas/Instance' + MutualsResponse: + description: Returns a single Mutuals object. + content: + application/json: + schema: + $ref: '#/components/schemas/Mutuals' + MutualFriendListResponse: + description: Returns a list of MutualFriend objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MutualFriend' + UserSubscriptionEligibleResponse: + description: Returns a single UserSubscriptionEligible object. + content: + application/json: + schema: + $ref: '#/components/schemas/UserSubscriptionEligible' + TutorialStatusResponse: + description: Returns a single TutorialStatus object. + content: + application/json: + schema: + $ref: '#/components/schemas/TutorialStatus' + CurrentOnlineUsersResponse: + description: OK + content: + application/json: + schema: + type: integer + description: Number of online users + example: 12345 + minimum: 0 + LimitedWorldListResponse: + description: Returns a list of LimitedWorld objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LimitedWorld' + WorldResponse: + description: Returns a single World object. + content: + application/json: + schema: + $ref: '#/components/schemas/World' + WorldCreateNotAllowedYetError: + description: Error response when trying create a world without having the neccesary Trust rank yet. + content: + application/json: + examples: + 400 Can't Create World Yet: + value: + error: + message: \"You can't create a world right now\" + status_code: 400 + schema: + $ref: '#/components/schemas/Error' + FavoritedWorldListResponse: + description: Returns a list of FavoritedWorld objects. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/FavoritedWorld' + WorldSeeOtherUserFavoritesError: + description: Error response when trying to see favourited worlds of another user without sufficient admin permissions. + content: + application/json: + examples: + 404 Cant See Other User Favorite Worlds: + value: + error: + message: 403 You can't see another user's favorites + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + WorldSeeOtherUserRecentsError: + description: Error response when trying to see recently visited worlds of another user without sufficient admin permissions. + content: + application/json: + examples: + 403 Only See Own Recents: + value: + error: + message: \"You can only see your own recent worlds!\" + status_code: 403 + schema: + $ref: '#/components/schemas/Error' + WorldNotFoundError: + description: Error response when trying to show information about a non-existent world. Sometimes returns with `model not found` instead of `World =8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/@openapitools/openapi-generator-cli": { - "version": "2.4.25", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.4.25.tgz", - "integrity": "sha512-n2RExPLkscjgjryEW+SbhJNs22LHsCLIlBtD5FaZsW84tTcii2YcbyHOIfz9xAoNKbpshk2hgxjtnXqTK92mGg==", - "hasInstallScript": true, - "dependencies": { - "@nestjs/common": "8.2.5", - "@nestjs/core": "8.2.5", - "@nuxtjs/opencollective": "0.3.2", - "chalk": "4.1.2", - "commander": "8.3.0", - "compare-versions": "3.6.0", - "concurrently": "6.5.1", - "console.table": "0.10.0", - "fs-extra": "10.0.0", - "glob": "7.1.6", - "inquirer": "8.2.0", - "lodash": "4.17.21", - "reflect-metadata": "0.1.13", - "rxjs": "7.5.2", - "tslib": "2.0.3" - }, - "bin": { - "openapi-generator-cli": "main.js" - }, - "engines": { - "node": ">=10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/openapi_generator" - } - }, - "node_modules/@openapitools/openapi-generator-cli/node_modules/tslib": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", - "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", - "dependencies": { - "follow-redirects": "^1.14.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-spinners": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", - "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "engines": { - "node": ">= 12" - } - }, - "node_modules/compare-versions": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", - "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/concurrently": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", - "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", - "dependencies": { - "chalk": "^4.1.0", - "date-fns": "^2.16.1", - "lodash": "^4.17.21", - "rxjs": "^6.6.3", - "spawn-command": "^0.0.2-1", - "supports-color": "^8.1.0", - "tree-kill": "^1.2.2", - "yargs": "^16.2.0" - }, - "bin": { - "concurrently": "bin/concurrently.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/concurrently/node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, - "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" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/consola": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", - "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" - }, - "node_modules/console.table": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", - "integrity": "sha1-CRcCVYiHW+/XDPLv9L7yxuLXXQQ=", - "dependencies": { - "easy-table": "1.1.0" - }, - "engines": { - "node": "> 0.10" - } - }, - "node_modules/date-fns": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.27.0.tgz", - "integrity": "sha512-sj+J0Mo2p2X1e306MHq282WS4/A8Pz/95GIFcsPNMPMZVI3EUrAdSv90al1k+p74WGLCruMXk23bfEDZa71X9Q==", - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, - "node_modules/defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dependencies": { - "clone": "^1.0.2" - } - }, - "node_modules/easy-table": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", - "integrity": "sha1-hvmrTBAvA3G3KXuSplHVgkvIy3M=", - "optionalDependencies": { - "wcwidth": ">=1.0.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "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==" - }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/inquirer": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.0.tgz", - "integrity": "sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==", - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.2.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/iterare": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", - "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" - }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/object-hash": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", - "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-to-regexp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", - "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==" - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/rxjs": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.2.tgz", - "integrity": "sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" - }, - "node_modules/spawn-command": { - "version": "0.0.2-1", - "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", - "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "bin": { - "tree-kill": "cli.js" - } - }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "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==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "engines": { - "node": ">=10" - } - } - }, - "dependencies": { - "@nestjs/common": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.2.5.tgz", - "integrity": "sha512-8VOZmHcCyhBtfvxehDfudsCrNghUoqDpZA5W8d/PUhMgz4Y1eT0M2ENBIuxr3C3j1vLypFOo30La2ymfQlOC8Q==", - "requires": { - "axios": "0.24.0", - "iterare": "1.2.1", - "tslib": "2.3.1", - "uuid": "8.3.2" - } - }, - "@nestjs/core": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.2.5.tgz", - "integrity": "sha512-R0vp0VlAQFP7qBTZMzMspwOCO6MpsMJON/MsrfHVGgZS5Sd5DInfboWhe2COPnAr+VAT0o4FAKObW08Pdb5hMg==", - "requires": { - "@nuxtjs/opencollective": "0.3.2", - "fast-safe-stringify": "2.1.1", - "iterare": "1.2.1", - "object-hash": "2.2.0", - "path-to-regexp": "3.2.0", - "tslib": "2.3.1", - "uuid": "8.3.2" - } - }, - "@nuxtjs/opencollective": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", - "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", - "requires": { - "chalk": "^4.1.0", - "consola": "^2.15.0", - "node-fetch": "^2.6.1" - } - }, - "@openapitools/openapi-generator-cli": { - "version": "2.4.25", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.4.25.tgz", - "integrity": "sha512-n2RExPLkscjgjryEW+SbhJNs22LHsCLIlBtD5FaZsW84tTcii2YcbyHOIfz9xAoNKbpshk2hgxjtnXqTK92mGg==", - "requires": { - "@nestjs/common": "8.2.5", - "@nestjs/core": "8.2.5", - "@nuxtjs/opencollective": "0.3.2", - "chalk": "4.1.2", - "commander": "8.3.0", - "compare-versions": "3.6.0", - "concurrently": "6.5.1", - "console.table": "0.10.0", - "fs-extra": "10.0.0", - "glob": "7.1.6", - "inquirer": "8.2.0", - "lodash": "4.17.21", - "reflect-metadata": "0.1.13", - "rxjs": "7.5.2", - "tslib": "2.0.3" - }, - "dependencies": { - "tslib": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", - "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" - } - } - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "requires": { - "type-fest": "^0.21.3" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", - "requires": { - "follow-redirects": "^1.14.4" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-spinners": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", - "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==" - }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==" - }, - "compare-versions": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", - "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concurrently": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", - "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", - "requires": { - "chalk": "^4.1.0", - "date-fns": "^2.16.1", - "lodash": "^4.17.21", - "rxjs": "^6.6.3", - "spawn-command": "^0.0.2-1", - "supports-color": "^8.1.0", - "tree-kill": "^1.2.2", - "yargs": "^16.2.0" - }, - "dependencies": { - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "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" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - } - } - }, - "consola": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", - "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" - }, - "console.table": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", - "integrity": "sha1-CRcCVYiHW+/XDPLv9L7yxuLXXQQ=", - "requires": { - "easy-table": "1.1.0" - } - }, - "date-fns": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.27.0.tgz", - "integrity": "sha512-sj+J0Mo2p2X1e306MHq282WS4/A8Pz/95GIFcsPNMPMZVI3EUrAdSv90al1k+p74WGLCruMXk23bfEDZa71X9Q==" - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "requires": { - "clone": "^1.0.2" - } - }, - "easy-table": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", - "integrity": "sha1-hvmrTBAvA3G3KXuSplHVgkvIy3M=", - "requires": { - "wcwidth": ">=1.0.1" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "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==" - }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" - }, - "fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "inquirer": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.0.tgz", - "integrity": "sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==", - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.2.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" - }, - "iterare": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", - "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==" - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "object-hash": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", - "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "requires": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-to-regexp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", - "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==" - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" - }, - "rxjs": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.2.tgz", - "integrity": "sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w==", - "requires": { - "tslib": "^2.1.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" - }, - "spawn-command": { - "version": "0.0.2-1", - "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", - "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==" - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "requires": { - "defaults": "^1.0.3" - } - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "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==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 79e12e89..00000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@openapitools/openapi-generator-cli": "^2.4.25" - } -} diff --git a/pom.xml b/pom.xml index a01cd855..12f8ff9a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ vrchatapi jar vrchatapi - 1.6.9 + 1.20.8 https://github.com/openapitools/openapi-generator OpenAPI Java @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M1 + 3.4.1 enforce-maven @@ -70,21 +70,30 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M4 + 2.22.2 - + loggerPath conf/log4j.properties - + -Xms512m -Xmx1500m methods 10 + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + maven-dependency-plugin + 3.6.1 package @@ -97,16 +106,14 @@ - org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 - jar test-jar @@ -114,11 +121,10 @@ - org.codehaus.mojo build-helper-maven-plugin - 1.10 + 3.5.0 add_sources @@ -149,7 +155,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.6.3 attach-javadocs @@ -172,7 +178,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.3.0 attach-sources @@ -182,6 +188,48 @@ + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + @@ -193,7 +241,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.2.1 sign-artifacts @@ -210,11 +258,6 @@ - - io.swagger - swagger-annotations - ${swagger-core-version} - com.google.code.findbugs @@ -246,11 +289,6 @@ commons-lang3 ${commons-lang3-version} - - org.threeten - threetenbp - ${threetenbp-version} - jakarta.annotation jakarta.annotation-api @@ -262,17 +300,22 @@ jackson-databind-nullable ${jackson-databind-nullable-version} + + jakarta.ws.rs + jakarta.ws.rs-api + ${jakarta.ws.rs-api-version} + - junit - junit + org.junit.jupiter + junit-jupiter-engine ${junit-version} test - org.mockito - mockito-core - 3.11.2 + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} test @@ -280,15 +323,18 @@ 1.8 ${java.version} ${java.version} - 1.8.5 - 1.6.2 - 4.9.1 - 2.8.6 - 3.11 - 0.2.1 - 1.5.0 + 1.9.0 + 4.12.0 + 2.10.1 + 3.18.0 + 0.2.10 1.3.5 - 4.13.1 + 2.0.2 + 5.10.3 + 1.10.0 + 2.1.6 + 1.1.1 UTF-8 + 2.43.0 diff --git a/src/main/java/io/github/vrchatapi/ApiCallback.java b/src/main/java/io/github/vrchatapi/ApiCallback.java index fe018ec1..2f3684ed 100644 --- a/src/main/java/io/github/vrchatapi/ApiCallback.java +++ b/src/main/java/io/github/vrchatapi/ApiCallback.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/main/java/io/github/vrchatapi/ApiClient.java b/src/main/java/io/github/vrchatapi/ApiClient.java index 90941a18..18ed6b4e 100644 --- a/src/main/java/io/github/vrchatapi/ApiClient.java +++ b/src/main/java/io/github/vrchatapi/ApiClient.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,11 +17,9 @@ import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; import okio.BufferedSink; import okio.Okio; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; import javax.net.ssl.*; import java.io.File; @@ -42,9 +40,13 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; 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; @@ -53,31 +55,44 @@ import io.github.vrchatapi.auth.HttpBearerAuth; import io.github.vrchatapi.auth.ApiKeyAuth; +/** + *

ApiClient class.

+ */ 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; + 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; - private HttpLoggingInterceptor loggingInterceptor; - - /* + /** * Basic constructor for ApiClient */ public ApiClient() { @@ -85,8 +100,6 @@ public ApiClient() { initHttpClient(); // Setup authentications (key: authentication name, value: authentication). - authentications.put("apiKeyCookie", new ApiKeyAuth("cookie", "apiKey")); - authentications.put("apiKeyQuery", new ApiKeyAuth("query", "apiKey")); authentications.put("authCookie", new ApiKeyAuth("cookie", "auth")); authentications.put("authHeader", new HttpBasicAuth()); authentications.put("twoFactorAuthCookie", new ApiKeyAuth("cookie", "twoFactorAuth")); @@ -94,8 +107,10 @@ public ApiClient() { authentications = Collections.unmodifiableMap(authentications); } - /* + /** * Basic constructor with custom OkHttpClient + * + * @param client a {@link okhttp3.OkHttpClient} object */ public ApiClient(OkHttpClient client) { init(); @@ -103,8 +118,6 @@ public ApiClient(OkHttpClient client) { httpClient = client; // Setup authentications (key: authentication name, value: authentication). - authentications.put("apiKeyCookie", new ApiKeyAuth("cookie", "apiKey")); - authentications.put("apiKeyQuery", new ApiKeyAuth("query", "apiKey")); authentications.put("authCookie", new ApiKeyAuth("cookie", "auth")); authentications.put("authHeader", new HttpBasicAuth()); authentications.put("twoFactorAuthCookie", new ApiKeyAuth("cookie", "twoFactorAuth")); @@ -112,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()); @@ -127,7 +140,7 @@ private void initHttpClient(List interceptors) { httpClient = builder.build(); } - private void init() { + protected void init() { verifyingSsl = true; json = new JSON(); @@ -150,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; } @@ -171,8 +212,8 @@ public OkHttpClient getHttpClient() { * Set HTTP client, which must never be null. * * @param newHttpClient An instance of OkHttpClient - * @return Api Client - * @throws NullPointerException when newHttpClient is null + * @return ApiClient + * @throws java.lang.NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); @@ -244,6 +285,11 @@ public ApiClient setSslCaCert(InputStream sslCaCert) { return this; } + /** + *

Getter for the field keyManagers.

+ * + * @return an array of {@link javax.net.ssl.KeyManager} objects + */ public KeyManager[] getKeyManagers() { return keyManagers; } @@ -261,32 +307,90 @@ 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.

+ * + * @return a {@link java.text.DateFormat} object + */ public DateFormat getDateFormat() { return dateFormat; } + /** + *

Setter for the field dateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link io.github.vrchatapi.ApiClient} object + */ public ApiClient setDateFormat(DateFormat dateFormat) { - this.json.setDateFormat(dateFormat); + JSON.setDateFormat(dateFormat); return this; } + /** + *

Set SqlDateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link io.github.vrchatapi.ApiClient} object + */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { - this.json.setSqlDateFormat(dateFormat); + JSON.setSqlDateFormat(dateFormat); return this; } + /** + *

Set OffsetDateTimeFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link io.github.vrchatapi.ApiClient} object + */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - this.json.setOffsetDateTimeFormat(dateFormat); + JSON.setOffsetDateTimeFormat(dateFormat); return this; } + /** + *

Set LocalDateFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link io.github.vrchatapi.ApiClient} object + */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - this.json.setLocalDateFormat(dateFormat); + JSON.setLocalDateFormat(dateFormat); return this; } + /** + *

Set LenientOnJson.

+ * + * @param lenientOnJson a boolean + * @return a {@link io.github.vrchatapi.ApiClient} object + */ public ApiClient setLenientOnJson(boolean lenientOnJson) { - this.json.setLenientOnJson(lenientOnJson); + JSON.setLenientOnJson(lenientOnJson); return this; } @@ -379,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). * @@ -481,7 +610,7 @@ public int getConnectTimeout() { /** * Sets the connect timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * {@link java.lang.Integer#MAX_VALUE}. * * @param connectionTimeout connection timeout in milliseconds * @return Api client @@ -503,7 +632,7 @@ public int getReadTimeout() { /** * Sets the read timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * {@link java.lang.Integer#MAX_VALUE}. * * @param readTimeout read timeout in milliseconds * @return Api client @@ -525,7 +654,7 @@ public int getWriteTimeout() { /** * Sets the write timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link Integer#MAX_VALUE}. + * {@link java.lang.Integer#MAX_VALUE}. * * @param writeTimeout connection timeout in milliseconds * @return Api client @@ -547,7 +676,7 @@ public String parameterToString(Object param) { return ""; } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { //Serialize to json string and remove the " enclosing characters - String jsonStr = json.serialize(param); + String jsonStr = JSON.serialize(param); return jsonStr.substring(1, jsonStr.length() - 1); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); @@ -555,7 +684,7 @@ public String parameterToString(Object param) { if (b.length() > 0) { b.append(","); } - b.append(String.valueOf(o)); + b.append(o); } return b.toString(); } else { @@ -594,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 @@ -634,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. * @@ -676,7 +830,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio * @return The sanitized filename */ public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); + return filename.replaceFirst("^.*[/\\\\]", ""); } /** @@ -723,17 +877,23 @@ public String selectHeaderAccept(String[] accepts) { * * @param contentTypes The Content-Type array to select from * @return The Content-Type header to use. If the given array is empty, - * or matches "any", JSON will be used. + * returns null. If it matches "any", JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { + if (contentTypes.length == 0) { + return null; + } + + if (contentTypes[0].equals("*/*")) { return "application/json"; } + for (String contentType : contentTypes) { if (isJsonMime(contentType)) { return contentType; } } + return contentTypes[0]; } @@ -745,7 +905,7 @@ public String selectHeaderContentType(String[] contentTypes) { */ public String escapeString(String str) { try { - return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + return URLEncoder.encode(str, "utf8").replaceAll("%28", "(").replaceAll("%29", ")").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { return str; } @@ -759,7 +919,7 @@ public String escapeString(String str) { * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws ApiException If fail to deserialize response body, i.e. cannot read response body + * @throws io.github.vrchatapi.ApiException If fail to deserialize response body, i.e. cannot read response body * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") @@ -780,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; } @@ -799,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); } } @@ -820,7 +989,7 @@ public T deserialize(Response response, Type returnType) throws ApiException * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body - * @throws ApiException If fail to serialize the given object + * @throws io.github.vrchatapi.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -829,14 +998,18 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException } else if (obj instanceof File) { // File body parameter support. return RequestBody.create((File) obj, MediaType.parse(contentType)); + } else if ("text/plain".equals(contentType) && obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); } else if (isJsonMime(contentType)) { String content; if (obj != null) { - content = json.serialize(obj); + content = JSON.serialize(obj); } else { content = null; } return RequestBody.create(content, MediaType.parse(contentType)); + } else if (obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); } else { throw new ApiException("Content type \"" + contentType + "\" is not supported"); } @@ -846,7 +1019,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException * Download file from the given response. * * @param response An instance of the Response object - * @throws ApiException If fail to read file content from response and write to disk + * @throws io.github.vrchatapi.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -866,7 +1039,7 @@ public File downloadFileFromResponse(Response response) throws ApiException { * * @param response An instance of the Response object * @return Prepared file for the download - * @throws IOException If fail to prepare file for download + * @throws java.io.IOException If fail to prepare file for download */ public File prepareDownloadFile(Response response) throws IOException { String filename = null; @@ -910,7 +1083,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws ApiException If fail to execute the call + * @throws io.github.vrchatapi.ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -925,7 +1098,7 @@ public ApiResponse execute(Call call) throws ApiException { * @return ApiResponse object containing response status, headers and * data, which is a Java object deserialized from response body and would be null * when returnType is null. - * @throws ApiException If fail to execute the call + * @throws io.github.vrchatapi.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { try { @@ -989,7 +1162,7 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws ApiException If the response has an unsuccessful status code or + * @throws io.github.vrchatapi.ApiException If the response has an unsuccessful status code or * fail to deserialize the response body */ public T handleResponse(Response response, Type returnType) throws ApiException { @@ -1024,6 +1197,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept /** * Build HTTP call with the given options. * + * @param baseUrl The base URL * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters @@ -1035,10 +1209,10 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call - * @throws ApiException If fail to serialize the request body object + * @throws io.github.vrchatapi.ApiException If fail to serialize the request body object */ - public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); + public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } @@ -1046,6 +1220,7 @@ public Call buildCall(String path, String method, List queryParams, List

queryParams, List

queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); - - final String url = buildUrl(path, queryParams, collectionQueryParams); - final Request.Builder reqBuilder = new Request.Builder().url(url); - processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); - - String contentType = (String) headerParams.get("Content-Type"); - // ensuring a default content type - if (contentType == null) { - contentType = "application/json"; - } + public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); + // prepare HTTP request body RequestBody reqBody; + String contentType = headerParams.get("Content-Type"); + String contentTypePure = contentType; + if (contentTypePure != null && contentTypePure.contains(";")) { + contentTypePure = contentType.substring(0, contentType.indexOf(";")); + } if (!HttpMethod.permitsRequestBody(method)) { reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentType)) { + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentType)) { + } else if ("multipart/form-data".equals(contentTypePure)) { reqBody = buildRequestBodyMultipart(formParams); } else if (body == null) { if ("DELETE".equals(method)) { @@ -1086,12 +1256,21 @@ public Request buildRequest(String path, String method, List queryParams, reqBody = null; } else { // use an empty request body (for POST, PUT and PATCH) - reqBody = RequestBody.create("", MediaType.parse(contentType)); + reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); } } else { reqBody = serialize(body, contentType); } + List updatedQueryParams = new ArrayList<>(queryParams); + + // update parameters with authentication settings + updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + + final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); + // Associate callback with request (if not null) so interceptor can // access it when creating ProgressResponseBody reqBuilder.tag(callback); @@ -1111,14 +1290,31 @@ public Request buildRequest(String path, String method, List queryParams, /** * Build full URL by concatenating base path, the given sub path and query parameters. * + * @param baseUrl The base URL * @param path The sub path * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @return The full URL */ - public String buildUrl(String path, List queryParams, List collectionQueryParams) { + public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { final StringBuilder url = new StringBuilder(); - url.append(basePath).append(path); + if (baseUrl != null) { + url.append(baseUrl).append(path); + } else { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + java.util.Locale.ROOT, + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).append(path); + } if (queryParams != null && !queryParams.isEmpty()) { // support (constant) query string in `path`, e.g. "/posts?draft=1" @@ -1182,11 +1378,11 @@ public void processHeaderParams(Map headerParams, Request.Builde */ public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format(java.util.Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); } for (Entry param : defaultCookieMap.entrySet()) { if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format(java.util.Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); } } } @@ -1198,14 +1394,19 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws io.github.vrchatapi.ApiException If fails to update the parameters */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RuntimeException("Authentication undefined: " + authName); } - auth.applyToParams(queryParams, headerParams, cookieParams); + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); } } @@ -1235,12 +1436,18 @@ public RequestBody buildRequestBodyMultipart(Map formParams) { for (Entry param : formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (File) param.getValue(); - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + } else if (param.getValue() instanceof List) { + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } } else { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); - mpBuilder.addPart(partHeaders, RequestBody.create(parameterToString(param.getValue()), null)); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); } } return mpBuilder.build(); @@ -1261,11 +1468,49 @@ public String guessContentTypeFromFile(File file) { } } + /** + * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param file The file to add to the Header + */ + protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + } + + /** + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param obj The complex object to add to the Header + */ + protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + RequestBody requestBody; + if (obj instanceof String) { + requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); + } else { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + requestBody = RequestBody.create(content, MediaType.parse("application/json")); + } + + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); + mpBuilder.addPart(partHeaders, requestBody); + } + /** * Get network interceptor to add it to the httpClient to track download progress for * async requests. */ - private Interceptor getProgressInterceptor() { + protected Interceptor getProgressInterceptor() { return new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { @@ -1286,7 +1531,7 @@ public Response intercept(Interceptor.Chain chain) throws IOException { * Apply SSL related settings to httpClient according to the current values of * verifyingSsl and sslCaCert. */ - private void applySslSettings() { + protected void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; @@ -1328,13 +1573,23 @@ public boolean verify(String hostname, SSLSession session) { KeyStore caKeyStore = newEmptyKeyStore(password); int index = 0; for (Certificate certificate : certificates) { - String certificateAlias = "ca" + Integer.toString(index++); + String certificateAlias = "ca" + (index++); caKeyStore.setCertificateEntry(certificateAlias, certificate); } trustManagerFactory.init(caKeyStore); } trustManagers = trustManagerFactory.getTrustManagers(); - hostnameVerifier = OkHostnameVerifier.INSTANCE; + if (tlsServerName != null && !tlsServerName.isEmpty()) { + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + // Verify the certificate against tlsServerName instead of the actual hostname + return OkHostnameVerifier.INSTANCE.verify(tlsServerName, session); + } + }; + } else { + hostnameVerifier = OkHostnameVerifier.INSTANCE; + } } SSLContext sslContext = SSLContext.getInstance("TLS"); @@ -1348,7 +1603,7 @@ public boolean verify(String hostname, SSLSession session) { } } - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, password); @@ -1357,4 +1612,26 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti throw new AssertionError(e); } } + + /** + * Convert the HTTP request body to a string. + * + * @param requestBody The HTTP request object + * @return The string representation of the HTTP request body + * @throws io.github.vrchatapi.ApiException If fail to serialize the request body object into a string + */ + protected String requestBodyToString(RequestBody requestBody) throws ApiException { + if (requestBody != null) { + try { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return buffer.readUtf8(); + } catch (final IOException e) { + throw new ApiException(e); + } + } + + // empty http request body + return ""; + } } diff --git a/src/main/java/io/github/vrchatapi/ApiException.java b/src/main/java/io/github/vrchatapi/ApiException.java index e7b15fd5..31173457 100644 --- a/src/main/java/io/github/vrchatapi/ApiException.java +++ b/src/main/java/io/github/vrchatapi/ApiException.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -15,22 +15,51 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") + +/** + *

ApiException class.

+ */ +@SuppressWarnings("serial") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + private int code = 0; private Map> responseHeaders = null; private String responseBody = null; + /** + *

Constructor for ApiException.

+ */ public ApiException() {} + /** + *

Constructor for ApiException.

+ * + * @param throwable a {@link java.lang.Throwable} object + */ public ApiException(Throwable throwable) { super(throwable); } + /** + *

Constructor for ApiException.

+ * + * @param message the error message + */ public ApiException(String message) { super(message); } + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { super(message, throwable); this.code = code; @@ -38,23 +67,60 @@ public ApiException(String message, Throwable throwable, int code, MapConstructor for ApiException.

+ * + * @param message the error message + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ public ApiException(String message, int code, Map> responseHeaders, String responseBody) { this(message, (Throwable) null, code, responseHeaders, responseBody); } + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + */ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { this(message, throwable, code, responseHeaders, null); } + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message a {@link java.lang.String} object + */ public ApiException(int code, String message) { super(message); this.code = code; } + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message the error message + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ public ApiException(int code, String message, Map> responseHeaders, String responseBody) { this(code, message); this.responseHeaders = responseHeaders; @@ -87,4 +153,14 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format(java.util.Locale.ROOT, "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); + } } diff --git a/src/main/java/io/github/vrchatapi/ApiResponse.java b/src/main/java/io/github/vrchatapi/ApiResponse.java index 5e4237a3..c6392341 100644 --- a/src/main/java/io/github/vrchatapi/ApiResponse.java +++ b/src/main/java/io/github/vrchatapi/ApiResponse.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,8 +17,6 @@ /** * API response returned by API call. - * - * @param The type of data that is deserialized from response body */ public class ApiResponse { final private int statusCode; @@ -26,6 +24,8 @@ public class ApiResponse { final private T data; /** + *

Constructor for ApiResponse.

+ * * @param statusCode The status code of HTTP response * @param headers The headers of HTTP response */ @@ -34,6 +34,8 @@ public ApiResponse(int statusCode, Map> headers) { } /** + *

Constructor for ApiResponse.

+ * * @param statusCode The status code of HTTP response * @param headers The headers of HTTP response * @param data The object deserialized from response bod @@ -44,14 +46,29 @@ public ApiResponse(int statusCode, Map> headers, T data) { this.data = data; } + /** + *

Get the status code.

+ * + * @return the status code + */ public int getStatusCode() { return statusCode; } + /** + *

Get the headers.

+ * + * @return a {@link java.util.Map} of headers + */ public Map> getHeaders() { return headers; } + /** + *

Get the data.

+ * + * @return the data + */ public T getData() { return data; } diff --git a/src/main/java/io/github/vrchatapi/Configuration.java b/src/main/java/io/github/vrchatapi/Configuration.java index 4d5e66d7..9f58b74c 100644 --- a/src/main/java/io/github/vrchatapi/Configuration.java +++ b/src/main/java/io/github/vrchatapi/Configuration.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,27 +12,51 @@ package io.github.vrchatapi; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") public class Configuration { - private static ApiClient defaultApiClient = new ApiClient(); - - /** - * Get the default API client, which would be used when creating API - * instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } + public static final String VERSION = "1.20.8"; + + private static final AtomicReference defaultApiClient = new AtomicReference<>(); + private static volatile Supplier apiClientFactory = ApiClient::new; - /** - * Set the default API client, which would be used when creating API - * instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; + /** + * Get the default API client, which would be used when creating API instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + ApiClient client = defaultApiClient.get(); + if (client == null) { + client = defaultApiClient.updateAndGet(val -> { + if (val != null) { // changed by another thread + return val; + } + return apiClientFactory.get(); + }); } -} + return client; + } + + /** + * Set the default API client, which would be used when creating API instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient.set(apiClient); + } + + /** + * set the callback used to create new ApiClient objects + */ + public static void setApiClientFactory(Supplier factory) { + apiClientFactory = Objects.requireNonNull(factory); + } + + private Configuration() { + } +} \ No newline at end of file diff --git a/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java b/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java index b82b1901..ec597834 100644 --- a/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java +++ b/src/main/java/io/github/vrchatapi/GzipRequestInterceptor.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/main/java/io/github/vrchatapi/JSON.java b/src/main/java/io/github/vrchatapi/JSON.java index 40d100b2..ed9df065 100644 --- a/src/main/java/io/github/vrchatapi/JSON.java +++ b/src/main/java/io/github/vrchatapi/JSON.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -22,32 +22,40 @@ import com.google.gson.JsonElement; import io.gsonfire.GsonFireBuilder; import io.gsonfire.TypeSelector; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.format.DateTimeFormatter; -import io.github.vrchatapi.model.*; import okio.ByteString; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.io.StringReader; import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.Locale; import java.util.Map; import java.util.HashMap; +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ public class JSON { - private Gson gson; - private boolean isLenientOnJson = false; - private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); @SuppressWarnings("unchecked") public static GsonBuilder createGson() { @@ -80,14 +88,291 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri return clazz; } - public JSON() { - gson = createGson() - .registerTypeAdapter(Date.class, dateTypeAdapter) - .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) - .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) - .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) - .registerTypeAdapter(byte[].class, byteArrayAdapter) - .create(); + static { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAccessLogsUrls.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAnnouncement.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAudioConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigAvatarPerfLimiter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstants.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsGROUPS.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCE.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETS.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigConstantsLANGUAGE.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigDownloadURLList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigEvents.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigIosVersion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigMinSupportedClientBuildNumber.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIConfigOfflineAnalysis.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.APIHealth.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AccountDeletionLog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AddFavoriteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AddGroupGalleryImageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AdminAssetBundle.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AdminUnityPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Agreement.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AgreementRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AgreementStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Avatar.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarModeration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarModerationCreated.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarPerformance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarPublishedListingsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarStyle.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarStyles.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.AvatarUnityPackageUrlObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Badge.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Balance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.BanGroupMemberRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.BoopRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEvent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventDiscovery.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventRecurrence.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventRecurrenceEnd.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CalendarEventUserInterest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ChangeUserTagsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ChangeWorldTagsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateAvatarModerationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateAvatarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateCalendarEventRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateFileRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateFileVersionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupAnnouncementRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupGalleryRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupInviteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateGroupRoleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateInstanceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateJamSubmissionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateListingRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateProductRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreatePropRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CreateWorldRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CurrentUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CurrentUserPlatformHistoryInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.CurrentUserPresence.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.DeclineGroupInviteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Disable2FAResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.DiscordDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.DynamicContentRow.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EarningsMetrics.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EarningsMetricsTotals.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyBalances.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayout.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayoutEligibility.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayoutList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EconomyPayoutStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EditPrintRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.EquipInventoryItemRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Error.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Favorite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoriteGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoriteGroupLimits.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoriteLimits.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FavoritedWorld.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Feedback.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileAnalysis.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileAnalysisAvatarStats.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileUploadURL.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileVersion.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FileVersionUploadStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FinishFileDataUploadRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FollowCalendarEventRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.FriendStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GetGroupPosts200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GetUserGroupInstances200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Group.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupAnnouncement.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupAuditLogEntry.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGallery.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGalleryFileOrder.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGalleryFileOrderRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupGalleryImage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupInstance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupMember.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupMemberLimitedUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupMyMember.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupPermission.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupPost.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupRole.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupRoleTemplateValues.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupRoleTemplateValuesRoles.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupTransferable.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.GroupTransferableRequirements.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPush.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushDataArticle.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushDataArticleContent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InfoPushDataClickable.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Instance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InstanceContentSettings.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InstancePlatforms.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InstanceShortNameResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Inventory.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryConsumptionResults.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryDefaultAttributesValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryDefaultAttributesValueValidator.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryDrop.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryNotificationDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventorySpawn.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryTemplate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InventoryUserAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.InviteUserWithPhotoRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Jam.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.JamStateChangeDates.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.JamSubmission.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.JoinGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.License.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LicenseGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUnityPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserFriend.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserGroups.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserInstance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedUserSearch.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.LimitedWorld.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ModelFile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ModerateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ModerationReport.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.MutualFriend.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Mutuals.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Notification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailInvite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailInviteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailRequestInvite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailRequestInviteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationDetailVoteToKick.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2DetailsBoop.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.NotificationV2Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.OkStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.OkStatus2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PaginatedCalendarEventList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PaginatedGroupAuditLogEntryList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PaginatedModerationReportList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PastDisplayName.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Pending2FAResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PerformanceLimiterInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Permission.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PermissionData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PlatformBuildInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PlayerModeration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Print.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PrintFiles.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PrivateProfile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PrivateProfileActivity.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Product.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductListing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductListingVariant.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchase.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchaseHistory.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchaseProduct.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchasePurchaseContext.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProductPurchaseRecord.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ProfileRepresentedGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Prop.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PropPublishStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PropUnityPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PublicProfile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PurchaseContextData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.PurchaseProductListingRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RegisterUserAccountRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ReportCategory.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ReportReason.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RepresentedGroup.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RequestInviteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RequestInviteWithPhotoRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RespondGroupJoinRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RespondInviteWithPhotoRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RespondNotificationV2Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardBadge.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemption.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemptionData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemptionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.RewardRedemptionResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SearchGroupMembers200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SellerEligibility.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SentNotification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ServiceQueueStats.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ServiceStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.ShareInventoryItemDirectRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Store.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.StoreContext.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.StoreShelf.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SubmitModerationReportRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SubmitModerationReportRequestDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Subscription.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Success.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.SuccessFlag.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TiliaKyc.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TiliaStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TiliaTOS.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TokenBundle.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Transaction.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransactionAgreement.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransactionSteamInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransactionSteamWalletInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TransferGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TutorialStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorAuthCode.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorEmailCode.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorRecoveryCodes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.TwoFactorRecoveryCodesOtpInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UnityPackage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateAssetReviewNotesRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateAvatarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateCalendarEventRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateFavoriteGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupGalleryRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupMemberRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupRepresentationRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateGroupRoleRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateInventoryItemRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateInviteMessageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateListingRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateProductRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdatePropRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateTiliaTOSRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateUserBadgeRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateUserNoteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateUserRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UpdateWorldRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UploadGalleryImageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UploadImageRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UploadPrintRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.User.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserCreditsEligible.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserExists.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserNote.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserNoteTargetUser.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserSubscription.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.UserSubscriptionEligible.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Verify2FAEmailCodeResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.Verify2FAResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.VerifyAuthTokenResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.World.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.WorldMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new io.github.vrchatapi.model.WorldPublishStatus.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); } /** @@ -95,7 +380,7 @@ public JSON() { * * @return Gson */ - public Gson getGson() { + public static Gson getGson() { return gson; } @@ -103,16 +388,13 @@ public Gson getGson() { * Set Gson. * * @param gson Gson - * @return JSON */ - public JSON setGson(Gson gson) { - this.gson = gson; - return this; + public static void setGson(Gson gson) { + JSON.gson = gson; } - public JSON setLenientOnJson(boolean lenientOnJson) { + public static void setLenientOnJson(boolean lenientOnJson) { isLenientOnJson = lenientOnJson; - return this; } /** @@ -121,7 +403,7 @@ public JSON setLenientOnJson(boolean lenientOnJson) { * @param obj Object * @return String representation of the JSON */ - public String serialize(Object obj) { + public static String serialize(Object obj) { return gson.toJson(obj); } @@ -134,7 +416,7 @@ public String serialize(Object obj) { * @return The deserialized Java object */ @SuppressWarnings("unchecked") - public T deserialize(String body, Type returnType) { + public static T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { JsonReader jsonReader = new JsonReader(new StringReader(body)); @@ -155,10 +437,32 @@ public T deserialize(String body, Type returnType) { } } + /** + * Deserialize the given JSON InputStream to a Java object. + * + * @param Type + * @param inputStream The JSON InputStream + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(InputStream inputStream, Type returnType) throws IOException { + try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { + if (isLenientOnJson) { + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + JsonReader jsonReader = new JsonReader(reader); + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(reader, returnType); + } + } + } + /** * Gson TypeAdapter for Byte Array type */ - public class ByteArrayAdapter extends TypeAdapter { + public static class ByteArrayAdapter extends TypeAdapter { @Override public void write(JsonWriter out, byte[] value) throws IOException { @@ -230,7 +534,7 @@ public OffsetDateTime read(JsonReader in) throws IOException { /** * Gson TypeAdapter for JSR310 LocalDate type */ - public class LocalDateTypeAdapter extends TypeAdapter { + public static class LocalDateTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -268,14 +572,12 @@ public LocalDate read(JsonReader in) throws IOException { } } - public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { offsetDateTimeTypeAdapter.setFormat(dateFormat); - return this; } - public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { localDateTypeAdapter.setFormat(dateFormat); - return this; } /** @@ -389,14 +691,11 @@ public Date read(JsonReader in) throws IOException { } } - public JSON setDateFormat(DateFormat dateFormat) { + public static void setDateFormat(DateFormat dateFormat) { dateTypeAdapter.setFormat(dateFormat); - return this; } - public JSON setSqlDateFormat(DateFormat dateFormat) { + public static void setSqlDateFormat(DateFormat dateFormat) { sqlDateTypeAdapter.setFormat(dateFormat); - return this; } - } diff --git a/src/main/java/io/github/vrchatapi/Pair.java b/src/main/java/io/github/vrchatapi/Pair.java index 4cee8298..5ac4d0be 100644 --- a/src/main/java/io/github/vrchatapi/Pair.java +++ b/src/main/java/io/github/vrchatapi/Pair.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,49 +12,25 @@ package io.github.vrchatapi; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") public class Pair { - private String name = ""; - private String value = ""; + private final String name; + private final String value; - public Pair (String name, String value) { - setName(name); - setValue(value); - } + public Pair(String name, String value) { + this.name = isValidString(name) ? name : ""; + this.value = isValidString(value) ? value : ""; + } - private void setName(String name) { - if (!isValidString(name)) { - return; - } + public String getName() { + return this.name; + } - this.name = name; - } + public String getValue() { + return this.value; + } - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - if (arg.trim().isEmpty()) { - return false; - } - - return true; - } + private static boolean isValidString(String arg) { + return arg != null; + } } diff --git a/src/main/java/io/github/vrchatapi/ProgressRequestBody.java b/src/main/java/io/github/vrchatapi/ProgressRequestBody.java index 1a1eeb7c..5634b999 100644 --- a/src/main/java/io/github/vrchatapi/ProgressRequestBody.java +++ b/src/main/java/io/github/vrchatapi/ProgressRequestBody.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/main/java/io/github/vrchatapi/ProgressResponseBody.java b/src/main/java/io/github/vrchatapi/ProgressResponseBody.java index 6c25ef5f..038b799e 100644 --- a/src/main/java/io/github/vrchatapi/ProgressResponseBody.java +++ b/src/main/java/io/github/vrchatapi/ProgressResponseBody.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/main/java/io/github/vrchatapi/ServerConfiguration.java b/src/main/java/io/github/vrchatapi/ServerConfiguration.java index 6b6e36f4..ab2a0f99 100644 --- a/src/main/java/io/github/vrchatapi/ServerConfiguration.java +++ b/src/main/java/io/github/vrchatapi/ServerConfiguration.java @@ -1,3 +1,15 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.github.vrchatapi; import java.util.Map; @@ -5,6 +17,7 @@ /** * Representing a Server configuration. */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") public class ServerConfiguration { public String URL; public String description; @@ -39,10 +52,10 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } - url = url.replaceAll("\\{" + name + "\\}", value); + url = url.replace("{" + name + "}", value); } return url; } diff --git a/src/main/java/io/github/vrchatapi/ServerVariable.java b/src/main/java/io/github/vrchatapi/ServerVariable.java index 35c71a91..856a0b39 100644 --- a/src/main/java/io/github/vrchatapi/ServerVariable.java +++ b/src/main/java/io/github/vrchatapi/ServerVariable.java @@ -1,3 +1,15 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + package io.github.vrchatapi; import java.util.HashSet; @@ -5,6 +17,7 @@ /** * Representing a Server Variable for server URL template substitution. */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/io/github/vrchatapi/StringUtil.java b/src/main/java/io/github/vrchatapi/StringUtil.java index 2861a84c..4621c676 100644 --- a/src/main/java/io/github/vrchatapi/StringUtil.java +++ b/src/main/java/io/github/vrchatapi/StringUtil.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.24.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java b/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java index 8316bb9a..c0c17580 100644 --- a/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java +++ b/src/main/java/io/github/vrchatapi/api/AuthenticationApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,11 +26,26 @@ import java.io.IOException; +import io.github.vrchatapi.model.AvatarModeration; +import io.github.vrchatapi.model.AvatarModerationCreated; +import io.github.vrchatapi.model.AvatarModerationType; +import io.github.vrchatapi.model.CreateAvatarModerationRequest; import io.github.vrchatapi.model.CurrentUser; +import io.github.vrchatapi.model.Disable2FAResult; import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.ModerationReport; +import io.github.vrchatapi.model.OkStatus2; +import io.github.vrchatapi.model.PaginatedModerationReportList; +import io.github.vrchatapi.model.Pending2FAResult; +import io.github.vrchatapi.model.RegisterUserAccountRequest; +import io.github.vrchatapi.model.SubmitModerationReportRequest; import io.github.vrchatapi.model.Success; +import io.github.vrchatapi.model.SuccessFlag; import io.github.vrchatapi.model.TwoFactorAuthCode; +import io.github.vrchatapi.model.TwoFactorEmailCode; +import io.github.vrchatapi.model.TwoFactorRecoveryCodes; import io.github.vrchatapi.model.UserExists; +import io.github.vrchatapi.model.Verify2FAEmailCodeResult; import io.github.vrchatapi.model.Verify2FAResult; import io.github.vrchatapi.model.VerifyAuthTokenResult; @@ -42,6 +57,8 @@ public class AuthenticationApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public AuthenticationApi() { this(Configuration.getDefaultApiClient()); @@ -59,23 +76,174 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for cancelPending2FA + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call cancelPending2FACall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/twofactorauth/totp/pending"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call cancelPending2FAValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return cancelPending2FACall(_callback); + + } + + /** + * Cancel pending enabling of time-based 2FA codes + * Cancels the sequence for enabling time-based 2FA. + * @return Disable2FAResult + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public Disable2FAResult cancelPending2FA() throws ApiException { + ApiResponse localVarResp = cancelPending2FAWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Cancel pending enabling of time-based 2FA codes + * Cancels the sequence for enabling time-based 2FA. + * @return ApiResponse<Disable2FAResult> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public ApiResponse cancelPending2FAWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = cancelPending2FAValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Cancel pending enabling of time-based 2FA codes (asynchronously) + * Cancels the sequence for enabling time-based 2FA. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call cancelPending2FAAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = cancelPending2FAValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for checkUserExists * @param email Filter by email. (optional) * @param displayName Filter by displayName. (optional) - * @param userId Filter by UserID. (optional) + * @param username Filter by Username. (optional) * @param excludeUserId Exclude by UserID. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a response if a user exists or not. -
400 Error response when missing at least 1 of the required parameters. -
*/ - public okhttp3.Call checkUserExistsCall(String email, String displayName, String userId, String excludeUserId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call checkUserExistsCall(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables @@ -95,8 +263,8 @@ public okhttp3.Call checkUserExistsCall(String email, String displayName, String localVarQueryParams.addAll(localVarApiClient.parameterToPair("displayName", displayName)); } - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + if (username != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); } if (excludeUserId != null) { @@ -112,21 +280,19 @@ public okhttp3.Call checkUserExistsCall(String email, String displayName, String } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call checkUserExistsValidateBeforeCall(String email, String displayName, String userId, String excludeUserId, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = checkUserExistsCall(email, displayName, userId, excludeUserId, _callback); - return localVarCall; + private okhttp3.Call checkUserExistsValidateBeforeCall(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId, final ApiCallback _callback) throws ApiException { + return checkUserExistsCall(email, displayName, username, excludeUserId, _callback); } @@ -135,19 +301,20 @@ private okhttp3.Call checkUserExistsValidateBeforeCall(String email, String disp * Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search. * @param email Filter by email. (optional) * @param displayName Filter by displayName. (optional) - * @param userId Filter by UserID. (optional) + * @param username Filter by Username. (optional) * @param excludeUserId Exclude by UserID. (optional) * @return UserExists * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a response if a user exists or not. -
400 Error response when missing at least 1 of the required parameters. -
*/ - public UserExists checkUserExists(String email, String displayName, String userId, String excludeUserId) throws ApiException { - ApiResponse localVarResp = checkUserExistsWithHttpInfo(email, displayName, userId, excludeUserId); + public UserExists checkUserExists(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId) throws ApiException { + ApiResponse localVarResp = checkUserExistsWithHttpInfo(email, displayName, username, excludeUserId); return localVarResp.getData(); } @@ -156,19 +323,20 @@ public UserExists checkUserExists(String email, String displayName, String userI * Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search. * @param email Filter by email. (optional) * @param displayName Filter by displayName. (optional) - * @param userId Filter by UserID. (optional) + * @param username Filter by Username. (optional) * @param excludeUserId Exclude by UserID. (optional) * @return ApiResponse<UserExists> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a response if a user exists or not. -
400 Error response when missing at least 1 of the required parameters. -
*/ - public ApiResponse checkUserExistsWithHttpInfo(String email, String displayName, String userId, String excludeUserId) throws ApiException { - okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, userId, excludeUserId, null); + public ApiResponse checkUserExistsWithHttpInfo(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId) throws ApiException { + okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, username, excludeUserId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -178,44 +346,58 @@ public ApiResponse checkUserExistsWithHttpInfo(String email, String * Checks if a user by a given `username`, `displayName` or `email` exist. This is used during registration to check if a username has already been taken, during change of displayName to check if a displayName is available, and during change of email to check if the email is already used. In the later two cases the `excludeUserId` is used to exclude oneself, otherwise the result would always be true. It is **REQUIRED** to include **AT LEAST** `username`, `displayName` **or** `email` query parameter. Although they can be combined - in addition with `excludeUserId` (generally to exclude yourself) - to further fine-tune the search. * @param email Filter by email. (optional) * @param displayName Filter by displayName. (optional) - * @param userId Filter by UserID. (optional) + * @param username Filter by Username. (optional) * @param excludeUserId Exclude by UserID. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 Returns a response if a user exists or not. -
400 Error response when missing at least 1 of the required parameters. -
*/ - public okhttp3.Call checkUserExistsAsync(String email, String displayName, String userId, String excludeUserId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call checkUserExistsAsync(@javax.annotation.Nullable String email, @javax.annotation.Nullable String displayName, @javax.annotation.Nullable String username, @javax.annotation.Nullable String excludeUserId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, userId, excludeUserId, _callback); + okhttp3.Call localVarCall = checkUserExistsValidateBeforeCall(email, displayName, username, excludeUserId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteUser - * @param userId (required) + * Build call for confirmEmail + * @param id Target user for which to verify email. (required) + * @param verifyEmail Token to verify email. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
302 OK -
*/ - public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call confirmEmailCall(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/{userId}/delete" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + String localVarPath = "/auth/confirmEmail"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -223,8 +405,15 @@ public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) t Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (id != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); + } + + if (verifyEmail != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("verify_email", verifyEmail)); + } + final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -232,104 +421,121 @@ public okhttp3.Call deleteUserCall(String userId, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling deleteUser(Async)"); + private okhttp3.Call confirmEmailValidateBeforeCall(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling confirmEmail(Async)"); } - - okhttp3.Call localVarCall = deleteUserCall(userId, _callback); - return localVarCall; + // verify the required parameter 'verifyEmail' is set + if (verifyEmail == null) { + throw new ApiException("Missing the required parameter 'verifyEmail' when calling confirmEmail(Async)"); + } + + return confirmEmailCall(id, verifyEmail, _callback); } /** - * Delete User - * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. - * @param userId (required) - * @return CurrentUser + * Confirm Email + * Confirms the email address for a user + * @param id Target user for which to verify email. (required) + * @param verifyEmail Token to verify email. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
302 OK -
*/ - public CurrentUser deleteUser(String userId) throws ApiException { - ApiResponse localVarResp = deleteUserWithHttpInfo(userId); - return localVarResp.getData(); + public void confirmEmail(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail) throws ApiException { + confirmEmailWithHttpInfo(id, verifyEmail); } /** - * Delete User - * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. - * @param userId (required) - * @return ApiResponse<CurrentUser> + * Confirm Email + * Confirms the email address for a user + * @param id Target user for which to verify email. (required) + * @param verifyEmail Token to verify email. (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
302 OK -
*/ - public ApiResponse deleteUserWithHttpInfo(String userId) throws ApiException { - okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse confirmEmailWithHttpInfo(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail) throws ApiException { + okhttp3.Call localVarCall = confirmEmailValidateBeforeCall(id, verifyEmail, null); + return localVarApiClient.execute(localVarCall); } /** - * Delete User (asynchronously) - * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. - * @param userId (required) + * Confirm Email (asynchronously) + * Confirms the email address for a user + * @param id Target user for which to verify email. (required) + * @param verifyEmail Token to verify email. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
302 OK -
*/ - public okhttp3.Call deleteUserAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call confirmEmailAsync(@javax.annotation.Nonnull String id, @javax.annotation.Nonnull String verifyEmail, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteUserValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = confirmEmailValidateBeforeCall(id, verifyEmail, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for getCurrentUser + * Build call for createGlobalAvatarModeration + * @param createAvatarModerationRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
* \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getCurrentUserCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + public okhttp3.Call createGlobalAvatarModerationCall(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createAvatarModerationRequest; // create path and map variables - String localVarPath = "/auth/user"; + String localVarPath = "/auth/user/avatarmoderations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -346,96 +552,122 @@ public okhttp3.Call getCurrentUserCall(final ApiCallback _callback) throws ApiEx } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "authCookie", "authHeader", "twoFactorAuthCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCurrentUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - + private okhttp3.Call createGlobalAvatarModerationValidateBeforeCall(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createAvatarModerationRequest' is set + if (createAvatarModerationRequest == null) { + throw new ApiException("Missing the required parameter 'createAvatarModerationRequest' when calling createGlobalAvatarModeration(Async)"); + } - okhttp3.Call localVarCall = getCurrentUserCall(_callback); - return localVarCall; + return createGlobalAvatarModerationCall(createAvatarModerationRequest, _callback); } /** - * Login and/or Get Current User Info - * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. - * @return CurrentUser + * Create Global Avatar Moderation + * Globally moderates an avatar. + * @param createAvatarModerationRequest (required) + * @return AvatarModerationCreated * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
* \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public CurrentUser getCurrentUser() throws ApiException { - ApiResponse localVarResp = getCurrentUserWithHttpInfo(); + public AvatarModerationCreated createGlobalAvatarModeration(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest) throws ApiException { + ApiResponse localVarResp = createGlobalAvatarModerationWithHttpInfo(createAvatarModerationRequest); return localVarResp.getData(); } /** - * Login and/or Get Current User Info - * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. - * @return ApiResponse<CurrentUser> + * Create Global Avatar Moderation + * Globally moderates an avatar. + * @param createAvatarModerationRequest (required) + * @return ApiResponse<AvatarModerationCreated> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
* \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getCurrentUserWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse createGlobalAvatarModerationWithHttpInfo(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest) throws ApiException { + okhttp3.Call localVarCall = createGlobalAvatarModerationValidateBeforeCall(createAvatarModerationRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Login and/or Get Current User Info (asynchronously) - * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie if you are often restarting the program. The provided API libraries automatically save cookies during runtime, but does not persist during restart. While it can be fine to use username/password during development, expect in production to very fast run into the rate-limit and be temporarily blocked from making new sessions until older ones expire. The exact number of simultaneous sessions is unknown/undisclosed. + * Create Global Avatar Moderation (asynchronously) + * Globally moderates an avatar. + * @param createAvatarModerationRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
* \0Set-Cookie - This endpoint **always** sets the `apiKey` irrespective if it is already set.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single AvatarModerationCreated object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call createGlobalAvatarModerationAsync(@javax.annotation.Nonnull CreateAvatarModerationRequest createAvatarModerationRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createGlobalAvatarModerationValidateBeforeCall(createAvatarModerationRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for logout + * Build call for deleteGlobalAvatarModeration + * @param targetAvatarId Must be a valid avatar ID. (required) + * @param avatarModerationType The avatar moderation type associated with the avatar. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Clears the `auth` cookie.
* \0Set-Cookie - Clears the `age` cookie.
* \0\0Set-Cookie - Clears the `tos` cookie.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteGlobalAvatarModerationCall(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/logout"; + String localVarPath = "/auth/user/avatarmoderations"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -443,6 +675,14 @@ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (targetAvatarId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("targetAvatarId", targetAvatarId)); + } + + if (avatarModerationType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("avatarModerationType", avatarModerationType)); + } + final String[] localVarAccepts = { "application/json" }; @@ -452,97 +692,130 @@ public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException { - + private okhttp3.Call deleteGlobalAvatarModerationValidateBeforeCall(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'targetAvatarId' is set + if (targetAvatarId == null) { + throw new ApiException("Missing the required parameter 'targetAvatarId' when calling deleteGlobalAvatarModeration(Async)"); + } - okhttp3.Call localVarCall = logoutCall(_callback); - return localVarCall; + // verify the required parameter 'avatarModerationType' is set + if (avatarModerationType == null) { + throw new ApiException("Missing the required parameter 'avatarModerationType' when calling deleteGlobalAvatarModeration(Async)"); + } + + return deleteGlobalAvatarModerationCall(targetAvatarId, avatarModerationType, _callback); } /** - * Logout - * Invalidates the login session. - * @return Success + * Delete Global Avatar Moderation + * Globally unmoderates an avatar. + * @param targetAvatarId Must be a valid avatar ID. (required) + * @param avatarModerationType The avatar moderation type associated with the avatar. (required) + * @return OkStatus2 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Clears the `auth` cookie.
* \0Set-Cookie - Clears the `age` cookie.
* \0\0Set-Cookie - Clears the `tos` cookie.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public Success logout() throws ApiException { - ApiResponse localVarResp = logoutWithHttpInfo(); + public OkStatus2 deleteGlobalAvatarModeration(@javax.annotation.Nonnull String targetAvatarId, @javax.annotation.Nonnull AvatarModerationType avatarModerationType) throws ApiException { + ApiResponse localVarResp = deleteGlobalAvatarModerationWithHttpInfo(targetAvatarId, avatarModerationType); return localVarResp.getData(); } /** - * Logout - * Invalidates the login session. - * @return ApiResponse<Success> + * Delete Global Avatar Moderation + * Globally unmoderates an avatar. + * @param targetAvatarId Must be a valid avatar ID. (required) + * @param avatarModerationType The avatar moderation type associated with the avatar. (required) + * @return ApiResponse<OkStatus2> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Clears the `auth` cookie.
* \0Set-Cookie - Clears the `age` cookie.
* \0\0Set-Cookie - Clears the `tos` cookie.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse logoutWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = logoutValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Logout (asynchronously) - * Invalidates the login session. + * Delete Global Avatar Moderation (asynchronously) + * Globally unmoderates an avatar. + * @param targetAvatarId Must be a valid avatar ID. (required) + * @param avatarModerationType The avatar moderation type associated with the avatar. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Clears the `auth` cookie.
* \0Set-Cookie - Clears the `age` cookie.
* \0\0Set-Cookie - Clears the `tos` cookie.
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single OkStatus2 object -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call logoutAsync(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 = logoutValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteGlobalAvatarModerationValidateBeforeCall(targetAvatarId, avatarModerationType, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for verify2FA - * @param twoFactorAuthCode (optional) + * Build call for deleteModerationReport + * @param moderationReportId The moderation report id. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - - + + +
Response Details
Status Code Description Response Headers
200 OK * 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 apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public okhttp3.Call verify2FACall(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = twoFactorAuthCode; + public okhttp3.Call deleteModerationReportCall(@javax.annotation.Nonnull String moderationReportId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/auth/twofactorauth/totp/verify"; + String localVarPath = "/moderationReports/{moderationReportId}" + .replace("{" + "moderationReportId" + "}", localVarApiClient.escapeString(moderationReportId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -559,99 +832,124 @@ public okhttp3.Call verify2FACall(TwoFactorAuthCode twoFactorAuthCode, final Api } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call verify2FAValidateBeforeCall(TwoFactorAuthCode twoFactorAuthCode, 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)"); + } - okhttp3.Call localVarCall = verify2FACall(twoFactorAuthCode, _callback); - return localVarCall; + return deleteModerationReportCall(moderationReportId, _callback); } /** - * Verify 2FA code - * Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. - * @param twoFactorAuthCode (optional) - * @return Verify2FAResult + * Delete Moderation Report + * Delete a moderation report + * @param moderationReportId The moderation report id. (required) + * @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 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 apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public Verify2FAResult verify2FA(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { - ApiResponse localVarResp = verify2FAWithHttpInfo(twoFactorAuthCode); + public SuccessFlag deleteModerationReport(@javax.annotation.Nonnull String moderationReportId) throws ApiException { + ApiResponse localVarResp = deleteModerationReportWithHttpInfo(moderationReportId); return localVarResp.getData(); } /** - * Verify 2FA code - * Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. - * @param twoFactorAuthCode (optional) - * @return ApiResponse<Verify2FAResult> + * Delete Moderation Report + * Delete a moderation report + * @param moderationReportId The moderation report id. (required) + * @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 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 apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public ApiResponse verify2FAWithHttpInfo(TwoFactorAuthCode twoFactorAuthCode) throws ApiException { - okhttp3.Call localVarCall = verify2FAValidateBeforeCall(twoFactorAuthCode, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Verify 2FA code (asynchronously) - * Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. - * @param twoFactorAuthCode (optional) + * Delete Moderation Report (asynchronously) + * Delete a moderation report + * @param moderationReportId The moderation report id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - - + + +
Response Details
Status Code Description Response Headers
200 OK * 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 apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing Administrator credentials. -
*/ - public okhttp3.Call verify2FAAsync(TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteModerationReportAsync(@javax.annotation.Nonnull String moderationReportId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = verify2FAValidateBeforeCall(twoFactorAuthCode, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteModerationReportValidateBeforeCall(moderationReportId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for verifyAuthToken + * Build call for deleteUser + * @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 wether a provided auth token is valid or not. -
401 Error response due to missing apiKey or auth cookie. -
200 OK -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call verifyAuthTokenCall(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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/auth"; + String localVarPath = "/users/{userId}/delete" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -668,70 +966,1745 @@ public okhttp3.Call verifyAuthTokenCall(final ApiCallback _callback) throws ApiE } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call verifyAuthTokenValidateBeforeCall(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)"); + } - okhttp3.Call localVarCall = verifyAuthTokenCall(_callback); - return localVarCall; + return deleteUserCall(userId, _callback); } /** - * Verify Auth Token - * Verify whether the currently provided Auth Token is valid. - * @return VerifyAuthTokenResult + * Delete User + * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. + * @param userId Must be a valid user ID. (required) + * @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 wether a provided auth token is valid or not. -
401 Error response due to missing apiKey or auth cookie. -
200 OK -
401 Error response due to missing auth cookie. -
*/ - public VerifyAuthTokenResult verifyAuthToken() throws ApiException { - ApiResponse localVarResp = verifyAuthTokenWithHttpInfo(); + public CurrentUser deleteUser(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = deleteUserWithHttpInfo(userId); return localVarResp.getData(); } /** - * Verify Auth Token - * Verify whether the currently provided Auth Token is valid. - * @return ApiResponse<VerifyAuthTokenResult> + * Delete User + * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. + * @param userId Must be a valid user ID. (required) + * @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 wether a provided auth token is valid or not. -
401 Error response due to missing apiKey or auth cookie. -
200 OK -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse verifyAuthTokenWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = verifyAuthTokenValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Verify Auth Token (asynchronously) - * Verify whether the currently provided Auth Token is valid. + * Delete User (asynchronously) + * Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT. + * @param userId 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 OK -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for disable2FA + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call disable2FACall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/twofactorauth"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call disable2FAValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return disable2FACall(_callback); + + } + + /** + * Disable 2FA + * Disables 2FA for the currently logged in account + * @return Disable2FAResult + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public Disable2FAResult disable2FA() throws ApiException { + ApiResponse localVarResp = disable2FAWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Disable 2FA + * Disables 2FA for the currently logged in account + * @return ApiResponse<Disable2FAResult> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public ApiResponse disable2FAWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = disable2FAValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Disable 2FA (asynchronously) + * Disables 2FA for the currently logged in account + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call disable2FAAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = disable2FAValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for enable2FA + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call enable2FACall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/twofactorauth/totp/pending"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call enable2FAValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return enable2FACall(_callback); + + } + + /** + * Enable time-based 2FA codes + * Begins the sequence for enabling time-based 2FA. + * @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. -
+ */ + public Pending2FAResult enable2FA() throws ApiException { + ApiResponse localVarResp = enable2FAWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Enable time-based 2FA codes + * Begins the sequence for enabling time-based 2FA. + * @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. -
+ */ + public ApiResponse enable2FAWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = enable2FAValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Enable time-based 2FA codes (asynchronously) + * Begins the sequence for enabling time-based 2FA. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call enable2FAAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = enable2FAValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCurrentUser + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getCurrentUserCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user"; + + 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[] { "authHeader", "twoFactorAuthCookie", "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCurrentUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getCurrentUserCall(_callback); + + } + + /** + * Login and/or Get Current User Info + * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. 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 + * @throws ApiException If fail to 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 CurrentUser 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> + * @throws ApiException If fail to 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 { + okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Login and/or Get Current User Info (asynchronously) + * This endpoint does the following two operations: 1) Checks if you are already logged in by looking for a valid `auth` cookie. If you are have a valid auth cookie then no additional auth-related actions are taken. If you are **not** logged in then it will log you in with the `Authorization` header and set the `auth` cookie. The `auth` cookie will only be sent once. 2) If logged in, this function will also return the CurrentUser object containing detailed information about the currently logged in user. 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. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGlobalAvatarModerations + * @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 list of globally blocked avatars with timestamps -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getGlobalAvatarModerationsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/avatarmoderations"; + + 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 getGlobalAvatarModerationsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getGlobalAvatarModerationsCall(_callback); + + } + + /** + * Get Global Avatar Moderations + * Returns list of globally moderated avatars. + * @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. -
+ */ + public List getGlobalAvatarModerations() throws ApiException { + ApiResponse> localVarResp = getGlobalAvatarModerationsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Global Avatar Moderations + * Returns list of globally moderated avatars. + * @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. -
+ */ + public ApiResponse> getGlobalAvatarModerationsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getGlobalAvatarModerationsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Global Avatar Moderations (asynchronously) + * Returns list of globally moderated avatars. + * @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 list of globally blocked avatars with timestamps -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getGlobalAvatarModerationsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGlobalAvatarModerationsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getModerationReports + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param reportingUserId Filter for moderation reports. (optional) + * @param status Filter for moderation reports. One of: `closed`... (optional) + * @param type Filter for moderation reports. One of: `avatar`, `group`, `user`, `world`... (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 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(@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[] { }; + + // 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 = "/moderationReports"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (reportingUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("reportingUserId", reportingUserId)); + } + + if (status != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); + } + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + 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 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); + + } + + /** + * Get Moderation Reports + * Get submitted moderation reports + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param reportingUserId Filter for moderation reports. (optional) + * @param status Filter for moderation reports. One of: `closed`... (optional) + * @param type Filter for moderation reports. One of: `avatar`, `group`, `user`, `world`... (optional) + * @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(@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(); + } + + /** + * Get Moderation Reports + * Get submitted moderation reports + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param reportingUserId Filter for moderation reports. (optional) + * @param status Filter for moderation reports. One of: `closed`... (optional) + * @param type Filter for moderation reports. One of: `avatar`, `group`, `user`, `world`... (optional) + * @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(@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); + } + + /** + * Get Moderation Reports (asynchronously) + * Get submitted moderation reports + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param reportingUserId Filter for moderation reports. (optional) + * @param status Filter for moderation reports. One of: `closed`... (optional) + * @param type Filter for moderation reports. One of: `avatar`, `group`, `user`, `world`... (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getRecoveryCodes + * @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 the two factor recovery codes -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getRecoveryCodesCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/twofactorauth/otp"; + + 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 getRecoveryCodesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getRecoveryCodesCall(_callback); + + } + + /** + * Get 2FA Recovery codes + * Gets the OTP (One Time Password) recovery codes for accounts with 2FA-protection enabled. + * @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. -
+ */ + public TwoFactorRecoveryCodes getRecoveryCodes() throws ApiException { + ApiResponse localVarResp = getRecoveryCodesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get 2FA Recovery codes + * Gets the OTP (One Time Password) recovery codes for accounts with 2FA-protection enabled. + * @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. -
+ */ + public ApiResponse getRecoveryCodesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getRecoveryCodesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get 2FA Recovery codes (asynchronously) + * Gets the OTP (One Time Password) recovery codes for accounts with 2FA-protection enabled. + * @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 the two factor recovery codes -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getRecoveryCodesAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getRecoveryCodesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for logout + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * 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. -
+ */ + public okhttp3.Call logoutCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/logout"; + + 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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call logoutValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return logoutCall(_callback); + + } + + /** + * Logout + * Invalidates the login session. + * @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. -
+ */ + public Success logout() throws ApiException { + ApiResponse localVarResp = logoutWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Logout + * Invalidates the login session. + * @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. -
+ */ + public ApiResponse logoutWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = logoutValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Logout (asynchronously) + * Invalidates the login session. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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. -
+ */ + public okhttp3.Call logoutAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = logoutValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for registerUserAccount + * @param registerUserAccountRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call registerUserAccountCall(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest, 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 = registerUserAccountRequest; + + // create path and map variables + String localVarPath = "/auth/register"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + 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)"); + } + + return registerUserAccountCall(registerUserAccountRequest, _callback); + + } + + /** + * 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 + * @throws ApiException If fail to 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. -
+ * @deprecated + */ + @Deprecated + public CurrentUser registerUserAccount(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest) throws ApiException { + ApiResponse localVarResp = registerUserAccountWithHttpInfo(registerUserAccountRequest); + return localVarResp.getData(); + } + + /** + * 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> + * @throws ApiException If fail to 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. -
+ * @deprecated + */ + @Deprecated + public ApiResponse registerUserAccountWithHttpInfo(@javax.annotation.Nonnull RegisterUserAccountRequest registerUserAccountRequest) throws ApiException { + okhttp3.Call localVarCall = registerUserAccountValidateBeforeCall(registerUserAccountRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Register User Account (asynchronously) + * ~~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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - Successful authentication returns an `auth` cookie.
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for resendEmailConfirmation + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call resendEmailConfirmationCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/resendEmail"; + + 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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resendEmailConfirmationValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return resendEmailConfirmationCall(_callback); + + } + + /** + * Resend Email Confirmation + * Requests a resend of pending email address confirmation email + * @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. -
+ */ + public Success resendEmailConfirmation() throws ApiException { + ApiResponse localVarResp = resendEmailConfirmationWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Resend Email Confirmation + * Requests a resend of pending email address confirmation email + * @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. -
+ */ + public ApiResponse resendEmailConfirmationWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = resendEmailConfirmationValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Resend Email Confirmation (asynchronously) + * Requests a resend of pending email address confirmation email + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call resendEmailConfirmationAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = resendEmailConfirmationValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for submitModerationReport + * @param submitModerationReportRequest (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 single ModerationReport object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call submitModerationReportCall(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest, 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 = submitModerationReportRequest; + + // create path and map variables + String localVarPath = "/moderationReports"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return submitModerationReportCall(submitModerationReportRequest, _callback); + + } + + /** + * Submit Moderation Report + * Submit a moderation report + * @param submitModerationReportRequest (required) + * @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(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest) throws ApiException { + ApiResponse localVarResp = submitModerationReportWithHttpInfo(submitModerationReportRequest); + return localVarResp.getData(); + } + + /** + * Submit Moderation Report + * Submit a moderation report + * @param submitModerationReportRequest (required) + * @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(@javax.annotation.Nonnull SubmitModerationReportRequest submitModerationReportRequest) throws ApiException { + okhttp3.Call localVarCall = submitModerationReportValidateBeforeCall(submitModerationReportRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Submit Moderation Report (asynchronously) + * Submit a moderation report + * @param submitModerationReportRequest (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 single ModerationReport object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for verify2FA + * @param twoFactorAuthCode (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, 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 = twoFactorAuthCode; + + // create path and map variables + String localVarPath = "/auth/twofactorauth/totp/verify"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return verify2FACall(twoFactorAuthCode, _callback); + + } + + /** + * Verify 2FA code + * Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. + * @param twoFactorAuthCode (required) + * @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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + ApiResponse localVarResp = verify2FAWithHttpInfo(twoFactorAuthCode); + return localVarResp.getData(); + } + + /** + * Verify 2FA code + * Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. + * @param twoFactorAuthCode (required) + * @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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + okhttp3.Call localVarCall = verify2FAValidateBeforeCall(twoFactorAuthCode, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Verify 2FA code (asynchronously) + * Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled. + * @param twoFactorAuthCode (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = verify2FAValidateBeforeCall(twoFactorAuthCode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for verify2FAEmailCode + * @param twoFactorEmailCode (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode, 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 = twoFactorEmailCode; + + // create path and map variables + String localVarPath = "/auth/twofactorauth/emailotp/verify"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return verify2FAEmailCodeCall(twoFactorEmailCode, _callback); + + } + + /** + * Verify 2FA email code + * Finishes the login sequence with an 2FA email code. + * @param twoFactorEmailCode (required) + * @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(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode) throws ApiException { + ApiResponse localVarResp = verify2FAEmailCodeWithHttpInfo(twoFactorEmailCode); + return localVarResp.getData(); + } + + /** + * Verify 2FA email code + * Finishes the login sequence with an 2FA email code. + * @param twoFactorEmailCode (required) + * @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(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode) throws ApiException { + okhttp3.Call localVarCall = verify2FAEmailCodeValidateBeforeCall(twoFactorEmailCode, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Verify 2FA email code (asynchronously) + * Finishes the login sequence with an 2FA email code. + * @param twoFactorEmailCode (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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(@javax.annotation.Nonnull TwoFactorEmailCode twoFactorEmailCode, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = verify2FAEmailCodeValidateBeforeCall(twoFactorEmailCode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for verifyAuthToken + * @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 wether a provided auth token is valid or not. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call verifyAuthTokenCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth"; + + 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 verifyAuthTokenValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return verifyAuthTokenCall(_callback); + + } + + /** + * Verify Auth Token + * Verify whether the currently provided Auth Token is valid. + * @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. -
+ */ + public VerifyAuthTokenResult verifyAuthToken() throws ApiException { + ApiResponse localVarResp = verifyAuthTokenWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Verify Auth Token + * Verify whether the currently provided Auth Token is valid. + * @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. -
+ */ + public ApiResponse verifyAuthTokenWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = verifyAuthTokenValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Verify Auth Token (asynchronously) + * Verify whether the currently provided Auth Token is valid. * @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 wether a provided auth token is valid or not. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ public okhttp3.Call verifyAuthTokenAsync(final ApiCallback _callback) throws ApiException { @@ -741,20 +2714,298 @@ public okhttp3.Call verifyAuthTokenAsync(final ApiCallback + Response Details + Status Code Description Response Headers + 302 OK - + + */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/verifyLoginPlace"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (token != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("token", token)); + } + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return verifyLoginPlaceCall(token, userId, _callback); + + } + + /** + * Verify Login Place + * Verifies a login attempt for a user + * @param token Token to verify login attempt. (required) + * @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(@javax.annotation.Nonnull String token, @javax.annotation.Nullable String userId) throws ApiException { + verifyLoginPlaceWithHttpInfo(token, userId); + } + + /** + * Verify Login Place + * Verifies a login attempt for a user + * @param token Token to verify login attempt. (required) + * @param userId Filter by UserID. (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
302 OK -
+ */ + 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); + } + + /** + * Verify Login Place (asynchronously) + * Verifies a login attempt for a user + * @param token Token to verify login attempt. (required) + * @param userId Filter by UserID. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Response Details
Status Code Description Response Headers
302 OK -
+ */ + 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); + return localVarCall; + } + /** + * Build call for verifyPending2FA + * @param twoFactorAuthCode (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, 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 = twoFactorAuthCode; + + // create path and map variables + String localVarPath = "/auth/twofactorauth/totp/pending/verify"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return verifyPending2FACall(twoFactorAuthCode, _callback); + + } + + /** + * Verify Pending 2FA code + * Finishes sequence for enabling time-based 2FA. + * @param twoFactorAuthCode (required) + * @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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + ApiResponse localVarResp = verifyPending2FAWithHttpInfo(twoFactorAuthCode); + return localVarResp.getData(); + } + + /** + * Verify Pending 2FA code + * Finishes sequence for enabling time-based 2FA. + * @param twoFactorAuthCode (required) + * @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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode) throws ApiException { + okhttp3.Call localVarCall = verifyPending2FAValidateBeforeCall(twoFactorAuthCode, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Verify Pending 2FA code (asynchronously) + * Finishes sequence for enabling time-based 2FA. + * @param twoFactorAuthCode (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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(@javax.annotation.Nonnull TwoFactorAuthCode twoFactorAuthCode, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = verifyPending2FAValidateBeforeCall(twoFactorAuthCode, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for verifyRecoveryCode - * @param twoFactorAuthCode (optional) + * @param twoFactorAuthCode (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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 apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = twoFactorAuthCode; // create path and map variables @@ -778,35 +3029,40 @@ public okhttp3.Call verifyRecoveryCodeCall(TwoFactorAuthCode twoFactorAuthCode, "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); + } - okhttp3.Call localVarCall = verifyRecoveryCodeCall(twoFactorAuthCode, _callback); - return localVarCall; + return verifyRecoveryCodeCall(twoFactorAuthCode, _callback); } /** * Verify 2FA code with Recovery code * Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled. - * @param twoFactorAuthCode (optional) + * @param twoFactorAuthCode (required) * @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 apiKey or auth cookie. -
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(); } @@ -814,17 +3070,18 @@ public Verify2FAResult verifyRecoveryCode(TwoFactorAuthCode twoFactorAuthCode) t /** * Verify 2FA code with Recovery code * Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled. - * @param twoFactorAuthCode (optional) + * @param twoFactorAuthCode (required) * @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 apiKey or auth cookie. -
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); @@ -833,18 +3090,19 @@ public ApiResponse verifyRecoveryCodeWithHttpInfo(TwoFactorAuth /** * Verify 2FA code with Recovery code (asynchronously) * Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled. - * @param twoFactorAuthCode (optional) + * @param twoFactorAuthCode (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK * Set-Cookie - 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 apiKey or auth cookie. -
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 e31b5e63..d807bb20 100644 --- a/src/main/java/io/github/vrchatapi/api/AvatarsApi.java +++ b/src/main/java/io/github/vrchatapi/api/AvatarsApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -27,9 +27,15 @@ import io.github.vrchatapi.model.Avatar; +import io.github.vrchatapi.model.AvatarStyle; import io.github.vrchatapi.model.CreateAvatarRequest; import io.github.vrchatapi.model.CurrentUser; import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.OrderOption; +import io.github.vrchatapi.model.ReleaseStatus; +import io.github.vrchatapi.model.ServiceQueueStats; +import io.github.vrchatapi.model.ServiceStatus; +import io.github.vrchatapi.model.SortOption; import io.github.vrchatapi.model.UpdateAvatarRequest; import java.lang.reflect.Type; @@ -40,6 +46,8 @@ public class AvatarsApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public AvatarsApi() { this(Configuration.getDefaultApiClient()); @@ -57,6 +65,22 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + /** * Build call for createAvatar * @param createAvatarRequest (optional) @@ -64,13 +88,28 @@ public void setApiClient(ApiClient apiClient) { * @return 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = createAvatarRequest; // create path and map variables @@ -94,18 +133,17 @@ public okhttp3.Call createAvatarCall(CreateAvatarRequest createAvatarRequest, fi "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createAvatarValidateBeforeCall(CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = createAvatarCall(createAvatarRequest, _callback); - return localVarCall; + private okhttp3.Call createAvatarValidateBeforeCall(@javax.annotation.Nullable CreateAvatarRequest createAvatarRequest, final ApiCallback _callback) throws ApiException { + return createAvatarCall(createAvatarRequest, _callback); } @@ -116,13 +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(); } @@ -134,13 +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); @@ -154,13 +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(); @@ -169,24 +213,38 @@ public okhttp3.Call createAvatarAsync(CreateAvatarRequest createAvatarRequest, f } /** * Build call for deleteAvatar - * @param avatarId (required) + * @param avatarId Must be a valid avatar 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 single Avatar object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/avatars/{avatarId}" - .replaceAll("\\{" + "avatarId" + "\\}", localVarApiClient.escapeString(avatarId.toString())); + .replace("{" + "avatarId" + "}", localVarApiClient.escapeString(avatarId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -203,44 +261,43 @@ public okhttp3.Call deleteAvatarCall(String avatarId, final ApiCallback _callbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = deleteAvatarCall(avatarId, _callback); - return localVarCall; + return deleteAvatarCall(avatarId, _callback); } /** * Delete Avatar * Delete an avatar. Notice an avatar is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The AvatarID is permanently reserved. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -248,18 +305,19 @@ public Avatar deleteAvatar(String avatarId) throws ApiException { /** * Delete Avatar * Delete an avatar. Notice an avatar is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The AvatarID is permanently reserved. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
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); @@ -268,45 +326,326 @@ public ApiResponse deleteAvatarWithHttpInfo(String avatarId) throws ApiE /** * Delete Avatar (asynchronously) * Delete an avatar. Notice an avatar is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The AvatarID is permanently reserved. - * @param avatarId (required) + * @param avatarId Must be a valid avatar 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 single Avatar object. -
401 Error response due to missing apiKey or auth cookie. -
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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for deleteImpostor + * @param avatarId Must be a valid avatar 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 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(@javax.annotation.Nonnull String avatarId, 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 = "/avatars/{avatarId}/impostor" + .replace("{" + "avatarId" + "}", localVarApiClient.escapeString(avatarId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deleteImpostorCall(avatarId, _callback); + + } + + /** + * Delete generated Impostor + * Delete generated Impostor for that avatar. + * @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(@javax.annotation.Nonnull String avatarId) throws ApiException { + deleteImpostorWithHttpInfo(avatarId); + } + + /** + * Delete generated Impostor + * Delete generated Impostor for that avatar. + * @param avatarId Must be a valid avatar ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 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(@javax.annotation.Nonnull String avatarId) throws ApiException { + okhttp3.Call localVarCall = deleteImpostorValidateBeforeCall(avatarId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete generated Impostor (asynchronously) + * Delete generated Impostor for that avatar. + * @param avatarId Must be a valid avatar 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 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(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteImpostorValidateBeforeCall(avatarId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for enqueueImpostor + * @param avatarId Must be a valid avatar 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 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(@javax.annotation.Nonnull String avatarId, 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 = "/avatars/{avatarId}/impostor/enqueue" + .replace("{" + "avatarId" + "}", localVarApiClient.escapeString(avatarId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return enqueueImpostorCall(avatarId, _callback); + + } + + /** + * Enqueue Impostor generation + * Enqueue Impostor generation for that avatar. + * @param avatarId Must be a valid avatar ID. (required) + * @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(@javax.annotation.Nonnull String avatarId) throws ApiException { + ApiResponse localVarResp = enqueueImpostorWithHttpInfo(avatarId); + return localVarResp.getData(); + } + + /** + * Enqueue Impostor generation + * Enqueue Impostor generation for that avatar. + * @param avatarId Must be a valid avatar ID. (required) + * @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(@javax.annotation.Nonnull String avatarId) throws ApiException { + okhttp3.Call localVarCall = enqueueImpostorValidateBeforeCall(avatarId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Enqueue Impostor generation (asynchronously) + * Enqueue Impostor generation for that avatar. + * @param avatarId Must be a valid avatar 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 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(@javax.annotation.Nonnull String avatarId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = enqueueImpostorValidateBeforeCall(avatarId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getAvatar - * @param avatarId (required) + * @param avatarId Must be a valid avatar 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 single Avatar object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/avatars/{avatarId}" - .replaceAll("\\{" + "avatarId" + "\\}", localVarApiClient.escapeString(avatarId.toString())); + .replace("{" + "avatarId" + "}", localVarApiClient.escapeString(avatarId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -323,44 +662,43 @@ public okhttp3.Call getAvatarCall(String avatarId, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _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)"); } - - okhttp3.Call localVarCall = getAvatarCall(avatarId, _callback); - return localVarCall; + return getAvatarCall(avatarId, _callback); } /** * Get Avatar * Get information about a specific Avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -368,18 +706,19 @@ public Avatar getAvatar(String avatarId) throws ApiException { /** * Get Avatar * Get information about a specific Avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
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); @@ -388,31 +727,149 @@ public ApiResponse getAvatarWithHttpInfo(String avatarId) throws ApiExce /** * Get Avatar (asynchronously) * Get information about a specific Avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar 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 single Avatar object. -
401 Error response due to missing apiKey or auth cookie. -
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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getAvatarStyles + * @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 AvatarStyle objects. -
+ */ + public okhttp3.Call getAvatarStylesCall(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 = "/avatarStyles"; + + 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[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAvatarStylesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getAvatarStylesCall(_callback); + + } + + /** + * Get Avatar Styles + * List avatar styles. + * @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. -
+ */ + public List getAvatarStyles() throws ApiException { + ApiResponse> localVarResp = getAvatarStylesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Avatar Styles + * List avatar styles. + * @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. -
+ */ + public ApiResponse> getAvatarStylesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getAvatarStylesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Avatar Styles (asynchronously) + * List avatar styles. + * @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 AvatarStyle objects. -
+ */ + public okhttp3.Call getAvatarStylesAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getAvatarStylesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getFavoritedAvatars * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -426,14 +883,28 @@ 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 Avatar objects. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedAvatarsCall(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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[] { }; + + // 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 @@ -506,21 +977,19 @@ public okhttp3.Call getFavoritedAvatarsCall(String featured, String sort, Intege } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoritedAvatarsValidateBeforeCall(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getFavoritedAvatarsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); - return localVarCall; + 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); } @@ -528,9 +997,9 @@ private okhttp3.Call getFavoritedAvatarsValidateBeforeCall(String featured, Stri * List Favorited Avatars * Search and list favorited avatars by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -543,14 +1012,15 @@ private okhttp3.Call getFavoritedAvatarsValidateBeforeCall(String featured, Stri * @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 apiKey or auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public List getFavoritedAvatars(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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(); } @@ -559,9 +1029,9 @@ public List getFavoritedAvatars(String featured, String sort, Integer n, * List Favorited Avatars * Search and list favorited avatars by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -574,14 +1044,15 @@ public List getFavoritedAvatars(String featured, String sort, Integer n, * @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 apiKey or auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public ApiResponse> getFavoritedAvatarsWithHttpInfo(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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); @@ -591,9 +1062,9 @@ public ApiResponse> getFavoritedAvatarsWithHttpInfo(String featured * List Favorited Avatars (asynchronously) * Search and list favorited avatars by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -607,28 +1078,422 @@ public ApiResponse> getFavoritedAvatarsWithHttpInfo(String 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 Avatar objects. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to see favourited avatars of another user without sufficient admin permissions. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited avatars of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedAvatarsAsync(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getImpostorQueueStats + * @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 Service Queue Stats. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getImpostorQueueStatsCall(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 = "/avatars/impostor/queue/stats"; + + 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 getImpostorQueueStatsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getImpostorQueueStatsCall(_callback); + + } + + /** + * Get Impostor Queue Stats + * Gets service stats for queued impostor. + * @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. -
+ */ + public ServiceQueueStats getImpostorQueueStats() throws ApiException { + ApiResponse localVarResp = getImpostorQueueStatsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Impostor Queue Stats + * Gets service stats for queued impostor. + * @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. -
+ */ + public ApiResponse getImpostorQueueStatsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getImpostorQueueStatsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Impostor Queue Stats (asynchronously) + * Gets service stats for queued impostor. + * @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 Service Queue Stats. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getImpostorQueueStatsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getImpostorQueueStatsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLicensedAvatars + * @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 _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 Avatar objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/avatars/licensed"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 getLicensedAvatarsValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { + return getLicensedAvatarsCall(n, offset, _callback); + + } + + /** + * List Licensed Avatars + * List licensed avatars. + * @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) + * @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(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { + ApiResponse> localVarResp = getLicensedAvatarsWithHttpInfo(n, offset); + return localVarResp.getData(); + } + + /** + * List Licensed Avatars + * List licensed avatars. + * @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) + * @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(@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); + } + + /** + * List Licensed Avatars (asynchronously) + * List licensed avatars. + * @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 _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 Avatar objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOwnAvatar + * @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 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(@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 = "/users/{userId}/avatar" + .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 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)"); + } + + return getOwnAvatarCall(userId, _callback); + + } + + /** + * Get Own Avatar + * Get the current avatar for the user. This will return an error for any other user than the one logged in. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getOwnAvatarWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Own Avatar + * Get the current avatar for the user. This will return an error for any other user than the one logged in. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getOwnAvatarValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Own Avatar (asynchronously) + * Get the current avatar for the user. This will return an error for any other user than the one logged in. + * @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 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(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOwnAvatarValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for searchAvatars * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own avatars. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) * @param notag Tags to exclude (comma-separated). (optional) @@ -636,17 +1501,32 @@ public okhttp3.Call getFavoritedAvatarsAsync(String featured, String sort, Integ * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (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 Avatar objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchAvatarsCall(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, 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[] { }; + + // 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 @@ -710,6 +1590,10 @@ public okhttp3.Call searchAvatarsCall(String featured, String sort, String user, localVarQueryParams.addAll(localVarApiClient.parameterToPair("platform", platform)); } + if (isInternalVariant != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isInternalVariant", isInternalVariant)); + } + final String[] localVarAccepts = { "application/json" }; @@ -719,21 +1603,19 @@ public okhttp3.Call searchAvatarsCall(String featured, String sort, String user, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchAvatarsValidateBeforeCall(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = searchAvatarsCall(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, _callback); - return localVarCall; + 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); } @@ -741,11 +1623,11 @@ private okhttp3.Call searchAvatarsValidateBeforeCall(String featured, String sor * Search Avatars * Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own avatars. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) * @param notag Tags to exclude (comma-separated). (optional) @@ -753,17 +1635,19 @@ private okhttp3.Call searchAvatarsValidateBeforeCall(String featured, String sor * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public List searchAvatars(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform) throws ApiException { - ApiResponse> localVarResp = searchAvatarsWithHttpInfo(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); + 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(); } @@ -771,11 +1655,11 @@ public List searchAvatars(String featured, String sort, String user, Str * Search Avatars * Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own avatars. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) * @param notag Tags to exclude (comma-separated). (optional) @@ -783,17 +1667,19 @@ public List searchAvatars(String featured, String sort, String user, Str * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> searchAvatarsWithHttpInfo(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform) throws ApiException { - okhttp3.Call localVarCall = searchAvatarsValidateBeforeCall(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, null); + 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); } @@ -802,11 +1688,11 @@ public ApiResponse> searchAvatarsWithHttpInfo(String featured, Stri * Search Avatars (asynchronously) * Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own avatars. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) * @param notag Tags to exclude (comma-separated). (optional) @@ -814,43 +1700,59 @@ public ApiResponse> searchAvatarsWithHttpInfo(String featured, Stri * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (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 Avatar objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchAvatarsAsync(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, 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, _callback); + okhttp3.Call localVarCall = searchAvatarsValidateBeforeCall(featured, sort, user, userId, n, order, offset, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, isInternalVariant, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for selectAvatar - * @param avatarId (required) + * @param avatarId Must be a valid avatar 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 single CurrentUser object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/avatars/{avatarId}/select" - .replaceAll("\\{" + "avatarId" + "\\}", localVarApiClient.escapeString(avatarId.toString())); + .replace("{" + "avatarId" + "}", localVarApiClient.escapeString(avatarId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -867,44 +1769,43 @@ public okhttp3.Call selectAvatarCall(String avatarId, final ApiCallback _callbac } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = selectAvatarCall(avatarId, _callback); - return localVarCall; + return selectAvatarCall(avatarId, _callback); } /** * Select Avatar * Switches into that avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -912,18 +1813,19 @@ public CurrentUser selectAvatar(String avatarId) throws ApiException { /** * Select Avatar * Switches into that avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
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); @@ -932,19 +1834,20 @@ public ApiResponse selectAvatarWithHttpInfo(String avatarId) throws /** * Select Avatar (asynchronously) * Switches into that avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar 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 single CurrentUser object. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -953,25 +1856,41 @@ 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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
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. -
+ * @deprecated */ - public okhttp3.Call selectFallbackAvatarCall(String avatarId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call selectFallbackAvatarCall(@javax.annotation.Nonnull String avatarId, 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 = "/avatars/{avatarId}/selectFallback" - .replaceAll("\\{" + "avatarId" + "\\}", localVarApiClient.escapeString(avatarId.toString())); + .replace("{" + "avatarId" + "}", localVarApiClient.escapeString(avatarId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -988,45 +1907,47 @@ public okhttp3.Call selectFallbackAvatarCall(String avatarId, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call selectFallbackAvatarValidateBeforeCall(String avatarId, final ApiCallback _callback) throws ApiException { - + private okhttp3.Call selectFallbackAvatarValidateBeforeCall(@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 selectFallbackAvatar(Async)"); } - - okhttp3.Call localVarCall = selectFallbackAvatarCall(avatarId, _callback); - return localVarCall; + return selectFallbackAvatarCall(avatarId, _callback); } /** * Select Fallback Avatar * Switches into that avatar as your fallback avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
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. -
+ * @deprecated */ - public CurrentUser selectFallbackAvatar(String avatarId) throws ApiException { + @Deprecated + public CurrentUser selectFallbackAvatar(@javax.annotation.Nonnull String avatarId) throws ApiException { ApiResponse localVarResp = selectFallbackAvatarWithHttpInfo(avatarId); return localVarResp.getData(); } @@ -1034,19 +1955,22 @@ public CurrentUser selectFallbackAvatar(String avatarId) throws ApiException { /** * Select Fallback Avatar * Switches into that avatar as your fallback avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
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. -
+ * @deprecated */ - public ApiResponse selectFallbackAvatarWithHttpInfo(String avatarId) throws ApiException { + @Deprecated + 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); @@ -1055,20 +1979,23 @@ public ApiResponse selectFallbackAvatarWithHttpInfo(String avatarId /** * Select Fallback Avatar (asynchronously) * Switches into that avatar as your fallback avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar 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 single CurrentUser object. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
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. -
+ * @deprecated */ - public okhttp3.Call selectFallbackAvatarAsync(String avatarId, final ApiCallback _callback) throws ApiException { + @Deprecated + 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(); @@ -1077,25 +2004,39 @@ public okhttp3.Call selectFallbackAvatarAsync(String avatarId, final ApiCallback } /** * Build call for updateAvatar - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @param updateAvatarRequest (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 single Avatar object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = updateAvatarRequest; // create path and map variables String localVarPath = "/avatars/{avatarId}" - .replaceAll("\\{" + "avatarId" + "\\}", localVarApiClient.escapeString(avatarId.toString())); + .replace("{" + "avatarId" + "}", localVarApiClient.escapeString(avatarId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1115,42 +2056,42 @@ public okhttp3.Call updateAvatarCall(String avatarId, UpdateAvatarRequest update "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = updateAvatarCall(avatarId, updateAvatarRequest, _callback); - return localVarCall; + return updateAvatarCall(avatarId, updateAvatarRequest, _callback); } /** * Update Avatar * Update information about a specific avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @param updateAvatarRequest (optional) * @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 apiKey or auth cookie. -
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(); } @@ -1158,19 +2099,20 @@ public Avatar updateAvatar(String avatarId, UpdateAvatarRequest updateAvatarRequ /** * Update Avatar * Update information about a specific avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @param updateAvatarRequest (optional) * @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 apiKey or auth cookie. -
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); @@ -1179,20 +2121,21 @@ public ApiResponse updateAvatarWithHttpInfo(String avatarId, UpdateAvata /** * Update Avatar (asynchronously) * Update information about a specific avatar. - * @param avatarId (required) + * @param avatarId Must be a valid avatar ID. (required) * @param updateAvatarRequest (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 single Avatar object. -
401 Error response due to missing apiKey or auth cookie. -
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 new file mode 100644 index 00000000..990a51f4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/api/CalendarApi.java @@ -0,0 +1,2068 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.api; + +import io.github.vrchatapi.ApiCallback; +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.ApiResponse; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ProgressRequestBody; +import io.github.vrchatapi.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.github.vrchatapi.model.CalendarEvent; +import io.github.vrchatapi.model.CalendarEventDiscovery; +import io.github.vrchatapi.model.CalendarEventDiscoveryInclusion; +import io.github.vrchatapi.model.CalendarEventDiscoveryScope; +import io.github.vrchatapi.model.CreateCalendarEventRequest; +import io.github.vrchatapi.model.Error; +import java.io.File; +import io.github.vrchatapi.model.FollowCalendarEventRequest; +import java.time.OffsetDateTime; +import io.github.vrchatapi.model.PaginatedCalendarEventList; +import io.github.vrchatapi.model.Success; +import io.github.vrchatapi.model.UpdateCalendarEventRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CalendarApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public CalendarApi() { + this(Configuration.getDefaultApiClient()); + } + + public CalendarApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createGroupCalendarEvent + * @param groupId Must be a valid group ID. (required) + * @param createCalendarEventRequest (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 single CalendarEvent object. -
400 Error response due to an invalid or illegal calendar request. -
401 Error response due to missing auth cookie. -
403 Error response due to an invalid or illegal calendar request. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCalendarEventRequest; + + // create path and map variables + String localVarPath = "/calendar/{groupId}/event" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'createCalendarEventRequest' is set + if (createCalendarEventRequest == null) { + throw new ApiException("Missing the required parameter 'createCalendarEventRequest' when calling createGroupCalendarEvent(Async)"); + } + + return createGroupCalendarEventCall(groupId, createCalendarEventRequest, _callback); + + } + + /** + * Create a calendar event + * Creates an event for a group on the calendar + * @param groupId Must be a valid group ID. (required) + * @param createCalendarEventRequest (required) + * @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. -
400 Error response due to an invalid or illegal calendar request. -
401 Error response due to missing auth cookie. -
403 Error response due to an invalid or illegal calendar request. -
+ */ + public CalendarEvent createGroupCalendarEvent(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateCalendarEventRequest createCalendarEventRequest) throws ApiException { + ApiResponse localVarResp = createGroupCalendarEventWithHttpInfo(groupId, createCalendarEventRequest); + return localVarResp.getData(); + } + + /** + * Create a calendar event + * Creates an event for a group on the calendar + * @param groupId Must be a valid group ID. (required) + * @param createCalendarEventRequest (required) + * @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. -
400 Error response due to an invalid or illegal calendar request. -
401 Error response due to missing auth cookie. -
403 Error response due to an invalid or illegal calendar request. -
+ */ + 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); + } + + /** + * Create a calendar event (asynchronously) + * Creates an event for a group on the calendar + * @param groupId Must be a valid group ID. (required) + * @param createCalendarEventRequest (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 single CalendarEvent object. -
400 Error response due to an invalid or illegal calendar request. -
401 Error response due to missing auth cookie. -
403 Error response due to an invalid or illegal calendar request. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGroupCalendarEvent + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar 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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, 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 = "/calendar/{groupId}/{calendarId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "calendarId" + "}", localVarApiClient.escapeString(calendarId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'calendarId' is set + if (calendarId == null) { + throw new ApiException("Missing the required parameter 'calendarId' when calling deleteGroupCalendarEvent(Async)"); + } + + return deleteGroupCalendarEventCall(groupId, calendarId, _callback); + + } + + /** + * Delete a calendar event + * Delete a group calendar event + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { + ApiResponse localVarResp = deleteGroupCalendarEventWithHttpInfo(groupId, calendarId); + return localVarResp.getData(); + } + + /** + * Delete a calendar event + * Delete a group calendar event + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @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(@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); + } + + /** + * Delete a calendar event (asynchronously) + * Delete a group calendar event + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for discoverCalendarEvents + * @param scope Scope for calendar event discovery. (optional, default to upcoming) + * @param categories Filter for calendar event discovery. (optional) + * @param tags Filter for calendar event discovery. (optional) + * @param featuredResults Filter for calendar event discovery. (optional, default to include) + * @param nonFeaturedResults Filter for calendar event discovery. (optional, default to include) + * @param personalizedResults Filter for calendar event discovery. (optional, default to include) + * @param minimumInterestCount Filter for calendar event discovery. (optional) + * @param minimumRemainingMinutes Filter for calendar event discovery. (optional) + * @param upcomingOffsetMinutes Filter for calendar event discovery. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param nextCursor Cursor returned from previous calendar discovery queries (see nextCursor property of the schema CalendarEventDiscovery). (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 CalendarEventDiscovery objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/calendar/discover"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (scope != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("scope", scope)); + } + + if (categories != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("categories", categories)); + } + + if (tags != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tags", tags)); + } + + if (featuredResults != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("featuredResults", featuredResults)); + } + + if (nonFeaturedResults != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("nonFeaturedResults", nonFeaturedResults)); + } + + if (personalizedResults != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("personalizedResults", personalizedResults)); + } + + if (minimumInterestCount != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("minimumInterestCount", minimumInterestCount)); + } + + if (minimumRemainingMinutes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("minimumRemainingMinutes", minimumRemainingMinutes)); + } + + if (upcomingOffsetMinutes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("upcomingOffsetMinutes", upcomingOffsetMinutes)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (nextCursor != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("nextCursor", nextCursor)); + } + + 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 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); + + } + + /** + * Discover calendar events + * Get a list of calendar events Initially, call without a `nextCursor` parameter For every successive call, use the `nextCursor` property returned in the previous call & the `number` of entries desired for this call The `nextCursor` internally keeps track of the `offset` of the results, the initial request parameters, and accounts for discrepancies that might arise from time elapsed between calls + * @param scope Scope for calendar event discovery. (optional, default to upcoming) + * @param categories Filter for calendar event discovery. (optional) + * @param tags Filter for calendar event discovery. (optional) + * @param featuredResults Filter for calendar event discovery. (optional, default to include) + * @param nonFeaturedResults Filter for calendar event discovery. (optional, default to include) + * @param personalizedResults Filter for calendar event discovery. (optional, default to include) + * @param minimumInterestCount Filter for calendar event discovery. (optional) + * @param minimumRemainingMinutes Filter for calendar event discovery. (optional) + * @param upcomingOffsetMinutes Filter for calendar event discovery. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param nextCursor Cursor returned from previous calendar discovery queries (see nextCursor property of the schema CalendarEventDiscovery). (optional) + * @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(@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(); + } + + /** + * Discover calendar events + * Get a list of calendar events Initially, call without a `nextCursor` parameter For every successive call, use the `nextCursor` property returned in the previous call & the `number` of entries desired for this call The `nextCursor` internally keeps track of the `offset` of the results, the initial request parameters, and accounts for discrepancies that might arise from time elapsed between calls + * @param scope Scope for calendar event discovery. (optional, default to upcoming) + * @param categories Filter for calendar event discovery. (optional) + * @param tags Filter for calendar event discovery. (optional) + * @param featuredResults Filter for calendar event discovery. (optional, default to include) + * @param nonFeaturedResults Filter for calendar event discovery. (optional, default to include) + * @param personalizedResults Filter for calendar event discovery. (optional, default to include) + * @param minimumInterestCount Filter for calendar event discovery. (optional) + * @param minimumRemainingMinutes Filter for calendar event discovery. (optional) + * @param upcomingOffsetMinutes Filter for calendar event discovery. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param nextCursor Cursor returned from previous calendar discovery queries (see nextCursor property of the schema CalendarEventDiscovery). (optional) + * @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(@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); + } + + /** + * Discover calendar events (asynchronously) + * Get a list of calendar events Initially, call without a `nextCursor` parameter For every successive call, use the `nextCursor` property returned in the previous call & the `number` of entries desired for this call The `nextCursor` internally keeps track of the `offset` of the results, the initial request parameters, and accounts for discrepancies that might arise from time elapsed between calls + * @param scope Scope for calendar event discovery. (optional, default to upcoming) + * @param categories Filter for calendar event discovery. (optional) + * @param tags Filter for calendar event discovery. (optional) + * @param featuredResults Filter for calendar event discovery. (optional, default to include) + * @param nonFeaturedResults Filter for calendar event discovery. (optional, default to include) + * @param personalizedResults Filter for calendar event discovery. (optional, default to include) + * @param minimumInterestCount Filter for calendar event discovery. (optional) + * @param minimumRemainingMinutes Filter for calendar event discovery. (optional) + * @param upcomingOffsetMinutes Filter for calendar event discovery. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @param nextCursor Cursor returned from previous calendar discovery queries (see nextCursor property of the schema CalendarEventDiscovery). (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 CalendarEventDiscovery objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for followGroupCalendarEvent + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param followCalendarEventRequest (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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = followCalendarEventRequest; + + // create path and map variables + String localVarPath = "/calendar/{groupId}/{calendarId}/follow" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "calendarId" + "}", localVarApiClient.escapeString(calendarId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'calendarId' is set + if (calendarId == null) { + throw new ApiException("Missing the required parameter 'calendarId' when calling followGroupCalendarEvent(Async)"); + } + + // verify the required parameter 'followCalendarEventRequest' is set + if (followCalendarEventRequest == null) { + throw new ApiException("Missing the required parameter 'followCalendarEventRequest' when calling followGroupCalendarEvent(Async)"); + } + + return followGroupCalendarEventCall(groupId, calendarId, followCalendarEventRequest, _callback); + + } + + /** + * Follow a calendar event + * Follow or unfollow an event on a group's calendar + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param followCalendarEventRequest (required) + * @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(@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(); + } + + /** + * Follow a calendar event + * Follow or unfollow an event on a group's calendar + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param followCalendarEventRequest (required) + * @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(@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); + } + + /** + * Follow a calendar event (asynchronously) + * Follow or unfollow an event on a group's calendar + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param followCalendarEventRequest (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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCalendarEvents + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/calendar"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (date != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("date", date)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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); + + } + + /** + * List calendar events + * Get a list of a user's calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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) + * @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(@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(); + } + + /** + * List calendar events + * Get a list of a user's calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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) + * @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(@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); + } + + /** + * List calendar events (asynchronously) + * Get a list of a user's calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFeaturedCalendarEvents + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/calendar/featured"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (date != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("date", date)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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); + + } + + /** + * List featured calendar events + * Get a list of a featured calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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) + * @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(@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(); + } + + /** + * List featured calendar events + * Get a list of a featured calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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) + * @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(@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); + } + + /** + * List featured calendar events (asynchronously) + * Get a list of a featured calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFollowedCalendarEvents + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/calendar/following"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (date != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("date", date)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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); + + } + + /** + * List followed calendar events + * Get a list of a followed calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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) + * @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(@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(); + } + + /** + * List followed calendar events + * Get a list of a followed calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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) + * @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(@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); + } + + /** + * List followed calendar events (asynchronously) + * Get a list of a followed calendar events for the month in ?date + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupCalendarEvent + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar 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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/calendar/{groupId}/{calendarId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "calendarId" + "}", localVarApiClient.escapeString(calendarId.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 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)"); + } + + // verify the required parameter 'calendarId' is set + if (calendarId == null) { + throw new ApiException("Missing the required parameter 'calendarId' when calling getGroupCalendarEvent(Async)"); + } + + return getGroupCalendarEventCall(groupId, calendarId, _callback); + + } + + /** + * Get a calendar event + * Get a group calendar event + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { + ApiResponse localVarResp = getGroupCalendarEventWithHttpInfo(groupId, calendarId); + return localVarResp.getData(); + } + + /** + * Get a calendar event + * Get a group calendar event + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @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(@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); + } + + /** + * Get a calendar event (asynchronously) + * Get a group calendar event + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar 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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupCalendarEventICS + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar 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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId, 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 = "/calendar/{groupId}/{calendarId}.ics" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "calendarId" + "}", localVarApiClient.escapeString(calendarId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/calendar", + "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[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'calendarId' is set + if (calendarId == null) { + throw new ApiException("Missing the required parameter 'calendarId' when calling getGroupCalendarEventICS(Async)"); + } + + return getGroupCalendarEventICSCall(groupId, calendarId, _callback); + + } + + /** + * Download calendar event as ICS + * Returns the specified calendar in iCalendar (ICS) format. + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String calendarId) throws ApiException { + ApiResponse localVarResp = getGroupCalendarEventICSWithHttpInfo(groupId, calendarId); + return localVarResp.getData(); + } + + /** + * Download calendar event as ICS + * Returns the specified calendar in iCalendar (ICS) format. + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (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 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(@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); + } + + /** + * Download calendar event as ICS (asynchronously) + * Returns the specified calendar in iCalendar (ICS) format. + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupCalendarEvents + * @param groupId Must be a valid group ID. (required) + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/calendar/{groupId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (date != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("date", date)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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)"); + } + + return getGroupCalendarEventsCall(groupId, date, n, offset, _callback); + + } + + /** + * List a group's calendar events + * Get a list of a group's calendar events + * @param groupId Must be a valid group ID. (required) + * @param date The month to search in. (optional) + * @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) + * @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(@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(); + } + + /** + * List a group's calendar events + * Get a list of a group's calendar events + * @param groupId Must be a valid group ID. (required) + * @param date The month to search in. (optional) + * @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) + * @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(@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); + } + + /** + * List a group's calendar events (asynchronously) + * Get a list of a group's calendar events + * @param groupId Must be a valid group ID. (required) + * @param date The month to search in. (optional) + * @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 _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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupNextCalendarEvent + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, 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 = "/calendar/{groupId}/next" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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 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)"); + } + + return getGroupNextCalendarEventCall(groupId, _callback); + + } + + /** + * Get next calendar event + * Get the closest future calendar event scheduled for a group + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse localVarResp = getGroupNextCalendarEventWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Get next calendar event + * Get the closest future calendar event scheduled for a group + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = getGroupNextCalendarEventValidateBeforeCall(groupId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get next calendar event (asynchronously) + * Get the closest future calendar event scheduled for a group + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGroupNextCalendarEventValidateBeforeCall(groupId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCalendarEvents + * @param searchTerm Search term for calendar events. (required) + * @param utcOffset The offset from UTC in hours of the client or authenticated user. (optional) + * @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 isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/calendar/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (searchTerm != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchTerm", searchTerm)); + } + + if (utcOffset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("utcOffset", utcOffset)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (isInternalVariant != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isInternalVariant", isInternalVariant)); + } + + 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 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)"); + } + + return searchCalendarEventsCall(searchTerm, utcOffset, n, offset, isInternalVariant, _callback); + + } + + /** + * Search for calendar events + * Get a list of calendar events by search terms + * @param searchTerm Search term for calendar events. (required) + * @param utcOffset The offset from UTC in hours of the client or authenticated user. (optional) + * @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 isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (optional) + * @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(@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(); + } + + /** + * Search for calendar events + * Get a list of calendar events by search terms + * @param searchTerm Search term for calendar events. (required) + * @param utcOffset The offset from UTC in hours of the client or authenticated user. (optional) + * @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 isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (optional) + * @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(@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); + } + + /** + * Search for calendar events (asynchronously) + * Get a list of calendar events by search terms + * @param searchTerm Search term for calendar events. (required) + * @param utcOffset The offset from UTC in hours of the client or authenticated user. (optional) + * @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 isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (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 CalendarEvent objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGroupCalendarEvent + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param updateCalendarEventRequest (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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCalendarEventRequest; + + // create path and map variables + String localVarPath = "/calendar/{groupId}/{calendarId}/event" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "calendarId" + "}", localVarApiClient.escapeString(calendarId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'calendarId' is set + if (calendarId == null) { + throw new ApiException("Missing the required parameter 'calendarId' when calling updateGroupCalendarEvent(Async)"); + } + + // verify the required parameter 'updateCalendarEventRequest' is set + if (updateCalendarEventRequest == null) { + throw new ApiException("Missing the required parameter 'updateCalendarEventRequest' when calling updateGroupCalendarEvent(Async)"); + } + + return updateGroupCalendarEventCall(groupId, calendarId, updateCalendarEventRequest, _callback); + + } + + /** + * Update a calendar event + * Updates an event for a group on the calendar + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param updateCalendarEventRequest (required) + * @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(@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(); + } + + /** + * Update a calendar event + * Updates an event for a group on the calendar + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param updateCalendarEventRequest (required) + * @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(@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); + } + + /** + * Update a calendar event (asynchronously) + * Updates an event for a group on the calendar + * @param groupId Must be a valid group ID. (required) + * @param calendarId Must be a valid calendar ID. (required) + * @param updateCalendarEventRequest (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 single CalendarEvent object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/io/github/vrchatapi/api/EconomyApi.java b/src/main/java/io/github/vrchatapi/api/EconomyApi.java index 35e6c3c6..0bd1c489 100644 --- a/src/main/java/io/github/vrchatapi/api/EconomyApi.java +++ b/src/main/java/io/github/vrchatapi/api/EconomyApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,11 +26,42 @@ import java.io.IOException; +import io.github.vrchatapi.model.Balance; +import io.github.vrchatapi.model.CreateListingRequest; +import io.github.vrchatapi.model.CreateProductRequest; +import io.github.vrchatapi.model.EarningsMetrics; +import io.github.vrchatapi.model.EconomyAccount; +import io.github.vrchatapi.model.EconomyBalances; +import io.github.vrchatapi.model.EconomyPayoutList; +import io.github.vrchatapi.model.EconomyPayoutStatus; import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.License; import io.github.vrchatapi.model.LicenseGroup; +import java.time.OffsetDateTime; +import io.github.vrchatapi.model.OrderOptionShort; +import io.github.vrchatapi.model.Product; +import io.github.vrchatapi.model.ProductListing; +import io.github.vrchatapi.model.ProductPurchase; +import io.github.vrchatapi.model.ProductPurchaseHistory; +import io.github.vrchatapi.model.PurchaseProductListingRequest; +import io.github.vrchatapi.model.SellerEligibility; +import io.github.vrchatapi.model.SortOptionProductPurchase; +import io.github.vrchatapi.model.Store; +import io.github.vrchatapi.model.StoreShelf; +import io.github.vrchatapi.model.StoreView; import io.github.vrchatapi.model.Subscription; +import io.github.vrchatapi.model.SuccessFlag; +import io.github.vrchatapi.model.TiliaKyc; +import io.github.vrchatapi.model.TiliaStatus; +import io.github.vrchatapi.model.TiliaTOS; +import io.github.vrchatapi.model.TokenBundle; import io.github.vrchatapi.model.Transaction; +import io.github.vrchatapi.model.UpdateListingRequest; +import io.github.vrchatapi.model.UpdateProductRequest; +import io.github.vrchatapi.model.UpdateTiliaTOSRequest; +import io.github.vrchatapi.model.UserCreditsEligible; import io.github.vrchatapi.model.UserSubscription; +import io.github.vrchatapi.model.UserSubscriptionEligible; import java.lang.reflect.Type; import java.util.ArrayList; @@ -40,6 +71,8 @@ public class EconomyApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public EconomyApi() { this(Configuration.getDefaultApiClient()); @@ -57,23 +90,54 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + /** - * Build call for getCurrentSubscriptions + * Build call for createProduct + * @param createProductRequest (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 list of UserSubscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getCurrentSubscriptionsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + public okhttp3.Call createProductCall(@javax.annotation.Nonnull CreateProductRequest createProductRequest, 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 = createProductRequest; // create path and map variables - String localVarPath = "/auth/user/subscription"; + String localVarPath = "/products"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -90,98 +154,121 @@ public okhttp3.Call getCurrentSubscriptionsCall(final ApiCallback _callback) thr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCurrentSubscriptionsValidateBeforeCall(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)"); + } - okhttp3.Call localVarCall = getCurrentSubscriptionsCall(_callback); - return localVarCall; + return createProductCall(createProductRequest, _callback); } /** - * Get Current Subscriptions - * Get a list of all current user subscriptions. - * @return List<UserSubscription> + * Create Product + * Creates a product and returns the new Product object. + * @param createProductRequest (required) + * @return Product * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 Returns a list of UserSubscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public List getCurrentSubscriptions() throws ApiException { - ApiResponse> localVarResp = getCurrentSubscriptionsWithHttpInfo(); + public Product createProduct(@javax.annotation.Nonnull CreateProductRequest createProductRequest) throws ApiException { + ApiResponse localVarResp = createProductWithHttpInfo(createProductRequest); return localVarResp.getData(); } /** - * Get Current Subscriptions - * Get a list of all current user subscriptions. - * @return ApiResponse<List<UserSubscription>> + * Create Product + * Creates a product and returns the new Product object. + * @param createProductRequest (required) + * @return ApiResponse<Product> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - + +
Response Details
Status Code Description Response Headers
200 Returns a list of UserSubscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getCurrentSubscriptionsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getCurrentSubscriptionsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); + 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); } /** - * Get Current Subscriptions (asynchronously) - * Get a list of all current user subscriptions. + * Create Product (asynchronously) + * Creates a product and returns the new Product object. + * @param createProductRequest (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 list of UserSubscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getCurrentSubscriptionsAsync(final ApiCallback> _callback) throws ApiException { + public okhttp3.Call createProductAsync(@javax.annotation.Nonnull CreateProductRequest createProductRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCurrentSubscriptionsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = createProductValidateBeforeCall(createProductRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getLicenseGroup - * @param licenseGroupId (required) + * Build call for createProductListingDirect + * @param createListingRequest (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 single LicenseGroup object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getLicenseGroupCall(String licenseGroupId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + public okhttp3.Call createProductListingDirectCall(@javax.annotation.Nonnull CreateListingRequest createListingRequest, 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 = createListingRequest; // create path and map variables - String localVarPath = "/licenseGroups/{licenseGroupId}" - .replaceAll("\\{" + "licenseGroupId" + "\\}", localVarApiClient.escapeString(licenseGroupId.toString())); + String localVarPath = "/listing"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -198,108 +285,122 @@ public okhttp3.Call getLicenseGroupCall(String licenseGroupId, final ApiCallback } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getLicenseGroupValidateBeforeCall(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)"); + 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)"); } - - okhttp3.Call localVarCall = getLicenseGroupCall(licenseGroupId, _callback); - return localVarCall; + return createProductListingDirectCall(createListingRequest, _callback); } /** - * Get License Group - * Get a single License Group by given ID. - * @param licenseGroupId (required) - * @return LicenseGroup + * Create Product Listing + * Creates a listing and returns the new ProductListing object. The request body is based on observed fields and may be incomplete. + * @param createListingRequest (required) + * @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 LicenseGroup object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public LicenseGroup getLicenseGroup(String licenseGroupId) throws ApiException { - ApiResponse localVarResp = getLicenseGroupWithHttpInfo(licenseGroupId); + public ProductListing createProductListingDirect(@javax.annotation.Nonnull CreateListingRequest createListingRequest) throws ApiException { + ApiResponse localVarResp = createProductListingDirectWithHttpInfo(createListingRequest); return localVarResp.getData(); } /** - * Get License Group - * Get a single License Group by given ID. - * @param licenseGroupId (required) - * @return ApiResponse<LicenseGroup> + * Create Product Listing + * Creates a listing and returns the new ProductListing object. The request body is based on observed fields and may be incomplete. + * @param createListingRequest (required) + * @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 LicenseGroup object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getLicenseGroupWithHttpInfo(String licenseGroupId) throws ApiException { - okhttp3.Call localVarCall = getLicenseGroupValidateBeforeCall(licenseGroupId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Get License Group (asynchronously) - * Get a single License Group by given ID. - * @param licenseGroupId (required) + * Create Product Listing (asynchronously) + * Creates a listing and returns the new ProductListing object. The request body is based on observed fields and may be incomplete. + * @param createListingRequest (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 single LicenseGroup object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single ProductListing object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getLicenseGroupAsync(String licenseGroupId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createProductListingDirectAsync(@javax.annotation.Nonnull CreateListingRequest createListingRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getLicenseGroupValidateBeforeCall(licenseGroupId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createProductListingDirectValidateBeforeCall(createListingRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getSteamTransaction - * @param transactionId (required) + * Build call for deleteProduct + * @param productId Must be a valid product 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 single Transaction object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
- * @deprecated */ - @Deprecated - public okhttp3.Call getSteamTransactionCall(String transactionId, 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[] { }; + + // 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 = "/Steam/transactions/{transactionId}" - .replaceAll("\\{" + "transactionId" + "\\}", localVarApiClient.escapeString(transactionId.toString())); + String localVarPath = "/products/{productId}" + .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -316,111 +417,122 @@ public okhttp3.Call getSteamTransactionCall(String transactionId, final ApiCallb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getSteamTransactionValidateBeforeCall(String transactionId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'transactionId' is set - if (transactionId == null) { - throw new ApiException("Missing the required parameter 'transactionId' when calling getSteamTransaction(Async)"); + 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)"); } - - okhttp3.Call localVarCall = getSteamTransactionCall(transactionId, _callback); - return localVarCall; + return deleteProductCall(productId, _callback); } /** - * Get Steam Transaction - * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. - * @param transactionId (required) - * @return Transaction + * Delete Product + * Deletes a product. + * @param productId Must be a valid product ID. (required) + * @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 a single Transaction object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
- * @deprecated */ - @Deprecated - public Transaction getSteamTransaction(String transactionId) throws ApiException { - ApiResponse localVarResp = getSteamTransactionWithHttpInfo(transactionId); + public SuccessFlag deleteProduct(@javax.annotation.Nonnull String productId) throws ApiException { + ApiResponse localVarResp = deleteProductWithHttpInfo(productId); return localVarResp.getData(); } /** - * Get Steam Transaction - * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. - * @param transactionId (required) - * @return ApiResponse<Transaction> + * Delete Product + * Deletes a product. + * @param productId Must be a valid product ID. (required) + * @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 a single Transaction object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
- * @deprecated */ - @Deprecated - public ApiResponse getSteamTransactionWithHttpInfo(String transactionId) throws ApiException { - okhttp3.Call localVarCall = getSteamTransactionValidateBeforeCall(transactionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Get Steam Transaction (asynchronously) - * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. - * @param transactionId (required) + * Delete Product (asynchronously) + * Deletes a product. + * @param productId Must be a valid product 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 single Transaction object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
- * @deprecated */ - @Deprecated - public okhttp3.Call getSteamTransactionAsync(String transactionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteProductAsync(@javax.annotation.Nonnull String productId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getSteamTransactionValidateBeforeCall(transactionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteProductValidateBeforeCall(productId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getSteamTransactions + * Build call for deleteProductListingDirect + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (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 Transaction objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getSteamTransactionsCall(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[] { }; + + // 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 = "/Steam/transactions"; + String localVarPath = "/listing/{productId}" + .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -428,6 +540,10 @@ public okhttp3.Call getSteamTransactionsCall(final ApiCallback _callback) throws Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (hydrate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hydrate", hydrate)); + } + final String[] localVarAccepts = { "application/json" }; @@ -437,96 +553,122 @@ public okhttp3.Call getSteamTransactionsCall(final ApiCallback _callback) throws } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSteamTransactionsValidateBeforeCall(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)"); + } - okhttp3.Call localVarCall = getSteamTransactionsCall(_callback); - return localVarCall; + return deleteProductListingDirectCall(productId, hydrate, _callback); } /** - * List Steam Transactions - * Get all own Steam transactions. - * @return List<Transaction> + * Delete Product Listing + * Deletes a listing. + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (optional) + * @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 a list of Transaction objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public List getSteamTransactions() throws ApiException { - ApiResponse> localVarResp = getSteamTransactionsWithHttpInfo(); + public SuccessFlag deleteProductListingDirect(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate) throws ApiException { + ApiResponse localVarResp = deleteProductListingDirectWithHttpInfo(productId, hydrate); return localVarResp.getData(); } /** - * List Steam Transactions - * Get all own Steam transactions. - * @return ApiResponse<List<Transaction>> + * Delete Product Listing + * Deletes a listing. + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (optional) + * @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 a list of Transaction objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getSteamTransactionsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getSteamTransactionsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); + 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); } /** - * List Steam Transactions (asynchronously) - * Get all own Steam transactions. + * Delete Product Listing (asynchronously) + * Deletes a listing. + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (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 Transaction objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an SuccessFlag object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getSteamTransactionsAsync(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 = getSteamTransactionsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = deleteProductListingDirectValidateBeforeCall(productId, hydrate, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getSubscriptions + * Build call for getActiveLicenses * @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 Subscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of License objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getSubscriptionsCall(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getActiveLicensesCall(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 = "/subscriptions"; + String localVarPath = "/economy/licenses/active"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -543,76 +685,5054 @@ public okhttp3.Call getSubscriptionsCall(final ApiCallback _callback) throws Api } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getSubscriptionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - + private okhttp3.Call getActiveLicensesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getActiveLicensesCall(_callback); + + } + + /** + * Get Active Licenses + * Gets active licenses + * @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. -
+ */ + public List getActiveLicenses() throws ApiException { + ApiResponse> localVarResp = getActiveLicensesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Active Licenses + * Gets active licenses + * @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. -
+ */ + public ApiResponse> getActiveLicensesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getActiveLicensesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Active Licenses (asynchronously) + * Gets active licenses + * @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 License objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getActiveLicensesAsync(final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getSubscriptionsCall(_callback); + okhttp3.Call localVarCall = getActiveLicensesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; + } + /** + * Build call for getBalance + * @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 single Balance object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getBalanceCall(@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 = "/user/{userId}/balance" + .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 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)"); + } + + return getBalanceCall(userId, _callback); } /** - * List Subscriptions - * List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". - * @return List<Subscription> + * Get Balance + * Gets the balance of a user + * @param userId Must be a valid user ID. (required) + * @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 list of Subscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public List getSubscriptions() throws ApiException { - ApiResponse> localVarResp = getSubscriptionsWithHttpInfo(); + public Balance getBalance(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getBalanceWithHttpInfo(userId); return localVarResp.getData(); } /** - * List Subscriptions - * List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". - * @return ApiResponse<List<Subscription>> + * Get Balance + * Gets the balance of a user + * @param userId Must be a valid user ID. (required) + * @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 list of Subscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getSubscriptionsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); + 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); } /** - * List Subscriptions (asynchronously) - * List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". + * Get Balance (asynchronously) + * Gets the balance of a 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 a list of Subscription objects. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Balance object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getSubscriptionsAsync(final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getBalanceAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getBalanceValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getBalanceEarnings + * @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 single Balance object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getBalanceEarningsCall(@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 = "/user/{userId}/balance/earnings" + .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 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)"); + } + + return getBalanceEarningsCall(userId, _callback); + + } + + /** + * Get Balance Earnings + * Gets the balance of a user from earnings + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getBalanceEarningsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Balance Earnings + * Gets the balance of a user from earnings + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getBalanceEarningsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Balance Earnings (asynchronously) + * Gets the balance of a user from earnings + * @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 single Balance object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getBulkGiftPurchases + * @param mostRecent (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 ??? objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getBulkGiftPurchasesCall(@javax.annotation.Nullable Boolean mostRecent, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/bulk/gift/purchases"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (mostRecent != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("mostRecent", mostRecent)); + } + + 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 getBulkGiftPurchasesValidateBeforeCall(@javax.annotation.Nullable Boolean mostRecent, final ApiCallback _callback) throws ApiException { + return getBulkGiftPurchasesCall(mostRecent, _callback); + + } + + /** + * Get Bulk Gift Purchases + * Get bulk gift purchases made by the user. + * @param mostRecent (optional) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a list of ??? objects. -
401 Error response due to missing auth cookie. -
+ */ + public List getBulkGiftPurchases(@javax.annotation.Nullable Boolean mostRecent) throws ApiException { + ApiResponse> localVarResp = getBulkGiftPurchasesWithHttpInfo(mostRecent); + return localVarResp.getData(); + } + + /** + * Get Bulk Gift Purchases + * Get bulk gift purchases made by the user. + * @param mostRecent (optional) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a list of ??? objects. -
401 Error response due to missing auth cookie. -
+ */ + 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); + } + + /** + * Get Bulk Gift Purchases (asynchronously) + * Get bulk gift purchases made by the user. + * @param mostRecent (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 ??? objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCurrentSubscriptions + * @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 UserSubscription objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getCurrentSubscriptionsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/subscription"; + + 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 getCurrentSubscriptionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getCurrentSubscriptionsCall(_callback); + + } + + /** + * Get Current Subscriptions + * Get a list of all current user subscriptions. + * @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. -
+ */ + public List getCurrentSubscriptions() throws ApiException { + ApiResponse> localVarResp = getCurrentSubscriptionsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Current Subscriptions + * Get a list of all current user subscriptions. + * @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. -
+ */ + public ApiResponse> getCurrentSubscriptionsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getCurrentSubscriptionsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Current Subscriptions (asynchronously) + * Get a list of all current user subscriptions. + * @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 UserSubscription objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getCurrentSubscriptionsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getCurrentSubscriptionsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getEarningsMetrics + * @param sellerId Seller to retrieve economy metrics for. (required) + * @param metricDateStart Lower bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param metricDateEnd Upper bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param groupByDuration Time bucket size for economy metrics. Observed values include `days` and `years`. (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 single EarningsMetrics object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/economy/metrics/earnings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (metricDateStart != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("metricDateStart", metricDateStart)); + } + + if (metricDateEnd != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("metricDateEnd", metricDateEnd)); + } + + if (sellerId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerId", sellerId)); + } + + if (groupByDuration != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupByDuration", groupByDuration)); + } + + 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 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)"); + } + + return getEarningsMetricsCall(sellerId, metricDateStart, metricDateEnd, groupByDuration, _callback); + + } + + /** + * Get Earnings Metrics + * Gets earnings totals and breakdown metrics for the currently authenticated user. + * @param sellerId Seller to retrieve economy metrics for. (required) + * @param metricDateStart Lower bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param metricDateEnd Upper bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param groupByDuration Time bucket size for economy metrics. Observed values include `days` and `years`. (optional) + * @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(@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(); + } + + /** + * Get Earnings Metrics + * Gets earnings totals and breakdown metrics for the currently authenticated user. + * @param sellerId Seller to retrieve economy metrics for. (required) + * @param metricDateStart Lower bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param metricDateEnd Upper bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param groupByDuration Time bucket size for economy metrics. Observed values include `days` and `years`. (optional) + * @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(@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); + } + + /** + * Get Earnings Metrics (asynchronously) + * Gets earnings totals and breakdown metrics for the currently authenticated user. + * @param sellerId Seller to retrieve economy metrics for. (required) + * @param metricDateStart Lower bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param metricDateEnd Upper bound for economy metrics queries. Observed formats include both date-only and full ISO timestamps. (optional) + * @param groupByDuration Time bucket size for economy metrics. Observed values include `days` and `years`. (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 single EarningsMetrics object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getEconomyAccount + * @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 single EconomyAccount object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getEconomyAccountCall(@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 = "/user/{userId}/economy/account" + .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 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)"); + } + + return getEconomyAccountCall(userId, _callback); + + } + + /** + * Get Economy Account + * Gets the economy account of a user + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getEconomyAccountWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Economy Account + * Gets the economy account of a user + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getEconomyAccountValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Economy Account (asynchronously) + * Gets the economy account of a 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 a single EconomyAccount object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getEconomyBalances + * @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 an EconomyBalances object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getEconomyBalancesCall(@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 = "/user/{userId}/economy/balances" + .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 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)"); + } + + return getEconomyBalancesCall(userId, _callback); + + } + + /** + * Get Economy Balances + * Gets the combined balances for a user. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getEconomyBalancesWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Economy Balances + * Gets the combined balances for a user. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getEconomyBalancesValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Economy Balances (asynchronously) + * Gets the combined balances for a 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 an EconomyBalances object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getEconomyPayoutStatus + * @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 an EconomyPayoutStatus object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getEconomyPayoutStatusCall(@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 = "/user/{userId}/economy/payouts/status" + .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 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)"); + } + + return getEconomyPayoutStatusCall(userId, _callback); + + } + + /** + * Get Economy Payout Status + * Gets the current payout status and eligibility information for a user. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getEconomyPayoutStatusWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Economy Payout Status + * Gets the current payout status and eligibility information for a user. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getEconomyPayoutStatusValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Economy Payout Status (asynchronously) + * Gets the current payout status and eligibility information for a 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 an EconomyPayoutStatus object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getEconomyPayouts + * @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 an EconomyPayoutList object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getEconomyPayoutsCall(@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 = "/user/{userId}/economy/payouts/list" + .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 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)"); + } + + return getEconomyPayoutsCall(userId, _callback); + + } + + /** + * Get Economy Payouts + * Gets the payout history for a user. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getEconomyPayoutsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Economy Payouts + * Gets the payout history for a user. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getEconomyPayoutsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Economy Payouts (asynchronously) + * Gets the payout history for a 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 an EconomyPayoutList object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLicenseGroup + * @param licenseGroupId Must be a valid license group 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 single LicenseGroup object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getLicenseGroupCall(@javax.annotation.Nonnull String licenseGroupId, 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 = "/licenseGroups/{licenseGroupId}" + .replace("{" + "licenseGroupId" + "}", localVarApiClient.escapeString(licenseGroupId.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 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)"); + } + + return getLicenseGroupCall(licenseGroupId, _callback); + + } + + /** + * Get License Group + * Get a single License Group by given ID. + * @param licenseGroupId Must be a valid license group ID. (required) + * @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(@javax.annotation.Nonnull String licenseGroupId) throws ApiException { + ApiResponse localVarResp = getLicenseGroupWithHttpInfo(licenseGroupId); + return localVarResp.getData(); + } + + /** + * Get License Group + * Get a single License Group by given ID. + * @param licenseGroupId Must be a valid license group ID. (required) + * @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(@javax.annotation.Nonnull String licenseGroupId) throws ApiException { + okhttp3.Call localVarCall = getLicenseGroupValidateBeforeCall(licenseGroupId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get License Group (asynchronously) + * Get a single License Group by given ID. + * @param licenseGroupId Must be a valid license group 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 single LicenseGroup object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProductListing + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/listing/{productId}" + .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (hydrate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hydrate", hydrate)); + } + + 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 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)"); + } + + return getProductListingCall(productId, hydrate, _callback); + + } + + /** + * Get Product Listing + * Gets a product listing + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (optional) + * @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(@javax.annotation.Nonnull String productId, @javax.annotation.Nullable Boolean hydrate) throws ApiException { + ApiResponse localVarResp = getProductListingWithHttpInfo(productId, hydrate); + return localVarResp.getData(); + } + + /** + * Get Product Listing + * Gets a product listing + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (optional) + * @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(@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); + } + + /** + * Get Product Listing (asynchronously) + * Gets a product listing + * @param productId Must be a valid product ID. (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProductListingAlternate + * @param productId Must be a valid product 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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getProductListingAlternateCall(@javax.annotation.Nonnull String productId, 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 = "/products/{productId}" + .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + 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)"); + } + + return getProductListingAlternateCall(productId, _callback); + + } + + /** + * Get Product Listing (alternate) + * Gets a product listing + * @param productId Must be a valid product ID. (required) + * @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. -
+ * @deprecated + */ + @Deprecated + public ProductListing getProductListingAlternate(@javax.annotation.Nonnull String productId) throws ApiException { + ApiResponse localVarResp = getProductListingAlternateWithHttpInfo(productId); + return localVarResp.getData(); + } + + /** + * Get Product Listing (alternate) + * Gets a product listing + * @param productId Must be a valid product ID. (required) + * @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. -
+ * @deprecated + */ + @Deprecated + 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); + } + + /** + * Get Product Listing (alternate) (asynchronously) + * Gets a product listing + * @param productId Must be a valid product 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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProductListings + * @param userId Must be a valid user ID. (required) + * @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 hydrate Populates some fields and changes types of others for certain objects. (optional) + * @param listingType Filter user listings by category. Observed values include `otp` and `subscription`. (optional) + * @param groupId Must be a valid group ID. (optional) + * @param active Filter for users' listings and inventory bundles. (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 ProductListing objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/{userId}/listings" + .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(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (hydrate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hydrate", hydrate)); + } + + if (listingType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("listingType", listingType)); + } + + if (groupId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId)); + } + + if (active != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("active", active)); + } + + 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 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)"); + } + + return getProductListingsCall(userId, n, offset, hydrate, listingType, groupId, active, _callback); + + } + + /** + * Get User Product Listings + * Gets the product listings of a given user + * @param userId Must be a valid user ID. (required) + * @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 hydrate Populates some fields and changes types of others for certain objects. (optional) + * @param listingType Filter user listings by category. Observed values include `otp` and `subscription`. (optional) + * @param groupId Must be a valid group ID. (optional) + * @param active Filter for users' listings and inventory bundles. (optional) + * @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(@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(); + } + + /** + * Get User Product Listings + * Gets the product listings of a given user + * @param userId Must be a valid user ID. (required) + * @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 hydrate Populates some fields and changes types of others for certain objects. (optional) + * @param listingType Filter user listings by category. Observed values include `otp` and `subscription`. (optional) + * @param groupId Must be a valid group ID. (optional) + * @param active Filter for users' listings and inventory bundles. (optional) + * @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(@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); + } + + /** + * Get User Product Listings (asynchronously) + * Gets the product listings of a given user + * @param userId Must be a valid user ID. (required) + * @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 hydrate Populates some fields and changes types of others for certain objects. (optional) + * @param listingType Filter user listings by category. Observed values include `otp` and `subscription`. (optional) + * @param groupId Must be a valid group ID. (optional) + * @param active Filter for users' listings and inventory bundles. (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 ProductListing objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProductPurchase + * @param productPurchaseId Must be a valid purchase 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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getProductPurchaseCall(@javax.annotation.Nonnull String productPurchaseId, 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 = "/economy/purchases/{productPurchaseId}" + .replace("{" + "productPurchaseId" + "}", localVarApiClient.escapeString(productPurchaseId.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 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)"); + } + + return getProductPurchaseCall(productPurchaseId, _callback); + + } + + /** + * Get Product Purchase + * Gets a single product purchase + * @param productPurchaseId Must be a valid purchase ID. (required) + * @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(@javax.annotation.Nonnull String productPurchaseId) throws ApiException { + ApiResponse localVarResp = getProductPurchaseWithHttpInfo(productPurchaseId); + return localVarResp.getData(); + } + + /** + * Get Product Purchase + * Gets a single product purchase + * @param productPurchaseId Must be a valid purchase ID. (required) + * @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(@javax.annotation.Nonnull String productPurchaseId) throws ApiException { + okhttp3.Call localVarCall = getProductPurchaseValidateBeforeCall(productPurchaseId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Product Purchase (asynchronously) + * Gets a single product purchase + * @param productPurchaseId Must be a valid purchase 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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProductPurchaseHistory + * @param userId Must be a valid user ID. (required) + * @param n The number of objects to return. (optional, default to 60) + * @param dateMin The start date of the search range. (optional) + * @param dateMax The end date of the search range. (optional) + * @param fromUserId Must be a valid user ID. (optional) + * @param toUserId Must be a valid user ID. (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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 single ProductPurchaseHistory object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/{userId}/economy/transactions" + .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(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (dateMin != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dateMin", dateMin)); + } + + if (dateMax != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dateMax", dateMax)); + } + + if (fromUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromUserId", fromUserId)); + } + + if (toUserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("toUserId", toUserId)); + } + + if (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + 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 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)"); + } + + return getProductPurchaseHistoryCall(userId, n, dateMin, dateMax, fromUserId, toUserId, sort, order, _callback); + + } + + /** + * Get Product Purchase History + * Gets a history of product purchases + * @param userId Must be a valid user ID. (required) + * @param n The number of objects to return. (optional, default to 60) + * @param dateMin The start date of the search range. (optional) + * @param dateMax The end date of the search range. (optional) + * @param fromUserId Must be a valid user ID. (optional) + * @param toUserId Must be a valid user ID. (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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(@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(); + } + + /** + * Get Product Purchase History + * Gets a history of product purchases + * @param userId Must be a valid user ID. (required) + * @param n The number of objects to return. (optional, default to 60) + * @param dateMin The start date of the search range. (optional) + * @param dateMax The end date of the search range. (optional) + * @param fromUserId Must be a valid user ID. (optional) + * @param toUserId Must be a valid user ID. (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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(@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); + } + + /** + * Get Product Purchase History (asynchronously) + * Gets a history of product purchases + * @param userId Must be a valid user ID. (required) + * @param n The number of objects to return. (optional, default to 60) + * @param dateMin The start date of the search range. (optional) + * @param dateMax The end date of the search range. (optional) + * @param fromUserId Must be a valid user ID. (optional) + * @param toUserId Must be a valid user ID. (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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 single ProductPurchaseHistory object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProductPurchaseStacks + * @param productPurchaseId Must be a valid purchase 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 list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getProductPurchaseStacksCall(@javax.annotation.Nonnull String productPurchaseId, 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 = "/economy/purchases/{productPurchaseId}/stacks" + .replace("{" + "productPurchaseId" + "}", localVarApiClient.escapeString(productPurchaseId.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 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)"); + } + + return getProductPurchaseStacksCall(productPurchaseId, _callback); + + } + + /** + * Get Product Purchase Stacks + * Gets stacks for a product purchase + * @param productPurchaseId Must be a valid purchase ID. (required) + * @return List<Object> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
+ */ + public List getProductPurchaseStacks(@javax.annotation.Nonnull String productPurchaseId) throws ApiException { + ApiResponse> localVarResp = getProductPurchaseStacksWithHttpInfo(productPurchaseId); + return localVarResp.getData(); + } + + /** + * Get Product Purchase Stacks + * Gets stacks for a product purchase + * @param productPurchaseId Must be a valid purchase ID. (required) + * @return ApiResponse<List<Object>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
+ */ + 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); + } + + /** + * Get Product Purchase Stacks (asynchronously) + * Gets stacks for a product purchase + * @param productPurchaseId Must be a valid purchase 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 list of stacks for a product purchase. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProductPurchases + * @param buyerId Must be a valid user ID. (required) + * @param sellerId Filter results by seller. (optional) + * @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 mostRecent (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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 ProductPurchase objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/economy/purchases"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (buyerId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("buyerId", buyerId)); + } + + if (sellerId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerId", sellerId)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (mostRecent != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("mostRecent", mostRecent)); + } + + if (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + 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 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)"); + } + + return getProductPurchasesCall(buyerId, sellerId, n, offset, mostRecent, sort, order, _callback); + + } + + /** + * Get Product Purchases + * Gets product purchases + * @param buyerId Must be a valid user ID. (required) + * @param sellerId Filter results by seller. (optional) + * @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 mostRecent (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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(@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(); + } + + /** + * Get Product Purchases + * Gets product purchases + * @param buyerId Must be a valid user ID. (required) + * @param sellerId Filter results by seller. (optional) + * @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 mostRecent (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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(@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); + } + + /** + * Get Product Purchases (asynchronously) + * Gets product purchases + * @param buyerId Must be a valid user ID. (required) + * @param sellerId Filter results by seller. (optional) + * @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 mostRecent (optional) + * @param sort The sort order of the results. (optional, default to purchaseDate) + * @param order Result ordering (optional, default to desc) + * @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 ProductPurchase objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getRecentSubscription + * @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 UserSubscription object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getRecentSubscriptionCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/subscription/recent"; + + 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 getRecentSubscriptionValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getRecentSubscriptionCall(_callback); + + } + + /** + * Get Recent Subscription + * Get the most recent user subscription. + * @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. -
+ */ + public UserSubscription getRecentSubscription() throws ApiException { + ApiResponse localVarResp = getRecentSubscriptionWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Recent Subscription + * Get the most recent user subscription. + * @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. -
+ */ + public ApiResponse getRecentSubscriptionWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getRecentSubscriptionValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Recent Subscription (asynchronously) + * Get the most recent user subscription. + * @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 UserSubscription object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getRecentSubscriptionAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getRecentSubscriptionValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSellerEligibility + * @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 single SellerEligibility object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getSellerEligibilityCall(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 = "/economy/seller/eligibility"; + + 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 getSellerEligibilityValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getSellerEligibilityCall(_callback); + + } + + /** + * Get Seller Eligibility + * Get the eligibility of the currently authenticated user to become a seller + * @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. -
+ */ + public SellerEligibility getSellerEligibility() throws ApiException { + ApiResponse localVarResp = getSellerEligibilityWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Seller Eligibility + * Get the eligibility of the currently authenticated user to become a seller + * @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. -
+ */ + public ApiResponse getSellerEligibilityWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSellerEligibilityValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Seller Eligibility (asynchronously) + * Get the eligibility of the currently authenticated user to become a seller + * @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 single SellerEligibility object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getSellerEligibilityAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getSellerEligibilityValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSteamTransaction + * @param transactionId Must be a valid transaction 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 single Transaction object. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getSteamTransactionCall(@javax.annotation.Nonnull String transactionId, 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 = "/Steam/transactions/{transactionId}" + .replace("{" + "transactionId" + "}", localVarApiClient.escapeString(transactionId.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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call getSteamTransactionValidateBeforeCall(@javax.annotation.Nonnull String transactionId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'transactionId' is set + if (transactionId == null) { + throw new ApiException("Missing the required parameter 'transactionId' when calling getSteamTransaction(Async)"); + } + + return getSteamTransactionCall(transactionId, _callback); + + } + + /** + * Get Steam Transaction + * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. + * @param transactionId Must be a valid transaction ID. (required) + * @return 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. -
+ * @deprecated + */ + @Deprecated + public Transaction getSteamTransaction(@javax.annotation.Nonnull String transactionId) throws ApiException { + ApiResponse localVarResp = getSteamTransactionWithHttpInfo(transactionId); + return localVarResp.getData(); + } + + /** + * Get Steam Transaction + * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. + * @param transactionId Must be a valid transaction ID. (required) + * @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. -
+ * @deprecated + */ + @Deprecated + 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); + } + + /** + * Get Steam Transaction (asynchronously) + * Get a single Steam transactions by ID. This returns the exact same information as `getSteamTransactions`, so no point in using this endpoint. + * @param transactionId Must be a valid transaction 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 single Transaction object. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSteamTransactions + * @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 Transaction objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getSteamTransactionsCall(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 = "/Steam/transactions"; + + 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 getSteamTransactionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getSteamTransactionsCall(_callback); + + } + + /** + * List Steam Transactions + * Get all own Steam transactions. + * @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. -
+ */ + public List getSteamTransactions() throws ApiException { + ApiResponse> localVarResp = getSteamTransactionsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * List Steam Transactions + * Get all own Steam transactions. + * @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. -
+ */ + public ApiResponse> getSteamTransactionsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSteamTransactionsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Steam Transactions (asynchronously) + * Get all own Steam transactions. + * @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 Transaction objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getSteamTransactionsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getSteamTransactionsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getStore + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param hydrateProducts Products fields will be populated. (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 single Store object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/economy/store"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (storeId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("storeId", storeId)); + } + + if (hydrateListings != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hydrateListings", hydrateListings)); + } + + if (hydrateProducts != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hydrateProducts", hydrateProducts)); + } + + 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 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)"); + } + + return getStoreCall(storeId, hydrateListings, hydrateProducts, _callback); + + } + + /** + * Get Store + * Gets a store + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param hydrateProducts Products fields will be populated. (optional) + * @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(@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(); + } + + /** + * Get Store + * Gets a store + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param hydrateProducts Products fields will be populated. (optional) + * @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(@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); + } + + /** + * Get Store (asynchronously) + * Gets a store + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param hydrateProducts Products fields will be populated. (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 single Store object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getStoreShelves + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param fetch (optional, default to public) + * @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 StoreShelf objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/economy/store/shelves"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (storeId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("storeId", storeId)); + } + + if (hydrateListings != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hydrateListings", hydrateListings)); + } + + if (fetch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fetch", fetch)); + } + + 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 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)"); + } + + return getStoreShelvesCall(storeId, hydrateListings, fetch, _callback); + + } + + /** + * Get Store Shelves + * Gets the shelves for a store + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param fetch (optional, default to public) + * @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(@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(); + } + + /** + * Get Store Shelves + * Gets the shelves for a store + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param fetch (optional, default to public) + * @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(@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); + } + + /** + * Get Store Shelves (asynchronously) + * Gets the shelves for a store + * @param storeId (required) + * @param hydrateListings Listings fields will be populated. (optional) + * @param fetch (optional, default to public) + * @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 StoreShelf objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getSubscriptions + * @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 Subscription objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getSubscriptionsCall(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 = "/subscriptions"; + + 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 getSubscriptionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getSubscriptionsCall(_callback); + + } + + /** + * List Subscriptions + * List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". + * @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. -
+ */ + public List getSubscriptions() throws ApiException { + ApiResponse> localVarResp = getSubscriptionsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * List Subscriptions + * List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". + * @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. -
+ */ + public ApiResponse> getSubscriptionsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Subscriptions (asynchronously) + * List all existing Subscriptions. For example, \"vrchatplus-monthly\" and \"vrchatplus-yearly\". + * @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 Subscription objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getSubscriptionsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getSubscriptionsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getTiliaStatus + * @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 single TiliaStatus object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getTiliaStatusCall(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 = "/tilia/status"; + + 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 getTiliaStatusValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getTiliaStatusCall(_callback); + + } + + /** + * Get Tilia Status + * Gets the status of Tilia integration + * @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. -
+ */ + public TiliaStatus getTiliaStatus() throws ApiException { + ApiResponse localVarResp = getTiliaStatusWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Tilia Status + * Gets the status of Tilia integration + * @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. -
+ */ + public ApiResponse getTiliaStatusWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getTiliaStatusValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Tilia Status (asynchronously) + * Gets the status of Tilia integration + * @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 single TiliaStatus object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getTiliaStatusAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getTiliaStatusValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getTiliaTos + * @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 single TiliaTOS object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getTiliaTosCall(@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 = "/user/{userId}/tilia/tos" + .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 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)"); + } + + return getTiliaTosCall(userId, _callback); + + } + + /** + * Get Tilia TOS Agreement Status + * Gets the status of the agreement of a user to the Tilia TOS + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getTiliaTosWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Tilia TOS Agreement Status + * Gets the status of the agreement of a user to the Tilia TOS + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getTiliaTosValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Tilia TOS Agreement Status (asynchronously) + * Gets the status of the agreement of a user to the Tilia TOS + * @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 single TiliaTOS object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getTokenBundles + * @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 TokenBundle objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getTokenBundlesCall(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 = "/tokenBundles"; + + 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 getTokenBundlesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getTokenBundlesCall(_callback); + + } + + /** + * List Token Bundles + * Gets the list of token bundles + * @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. -
+ */ + public List getTokenBundles() throws ApiException { + ApiResponse> localVarResp = getTokenBundlesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * List Token Bundles + * Gets the list of token bundles + * @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. -
+ */ + public ApiResponse> getTokenBundlesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getTokenBundlesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Token Bundles (asynchronously) + * Gets the list of token bundles + * @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 TokenBundle objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getTokenBundlesAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getTokenBundlesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserCreditsEligible + * @param userId Must be a valid user ID. (required) + * @param subscriptionId (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 single UserCreditsEligible object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/users/{userId}/credits/eligible" + .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(); + + if (subscriptionId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("subscriptionId", subscriptionId)); + } + + 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 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)"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { + throw new ApiException("Missing the required parameter 'subscriptionId' when calling getUserCreditsEligible(Async)"); + } + + return getUserCreditsEligibleCall(userId, subscriptionId, _callback); + + } + + /** + * 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String subscriptionId) throws ApiException { + ApiResponse localVarResp = getUserCreditsEligibleWithHttpInfo(userId, subscriptionId); + return localVarResp.getData(); + } + + /** + * 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(@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 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) + * @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 single UserCreditsEligible object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserSubscriptionEligible + * @param userId Must be a valid user ID. (required) + * @param steamId The Steam ID of the user. (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 single UserSubscriptionEligible object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/users/{userId}/subscription/eligible" + .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(); + + if (steamId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("steamId", steamId)); + } + + 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 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)"); + } + + return getUserSubscriptionEligibleCall(userId, steamId, _callback); + + } + + /** + * 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String steamId) throws ApiException { + ApiResponse localVarResp = getUserSubscriptionEligibleWithHttpInfo(userId, steamId); + return localVarResp.getData(); + } + + /** + * 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(@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 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) + * @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 single UserSubscriptionEligible object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserTiliaKyc + * @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 TiliaKyc object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getUserTiliaKycCall(@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 = "/user/{userId}/tilia/kyc" + .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 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)"); + } + + return getUserTiliaKycCall(userId, _callback); + + } + + /** + * Get User Tilia KYC + * Gets KYC status details for a user's Tilia account. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getUserTiliaKycWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User Tilia KYC + * Gets KYC status details for a user's Tilia account. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserTiliaKycValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Tilia KYC (asynchronously) + * Gets KYC status details for a user's Tilia account. + * @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 TiliaKyc object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listStores + * @param sellerId Filter results by seller. (optional) + * @param managementPov Return stores from the seller management point of view. (optional) + * @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 _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 Store objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/economy/stores"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (sellerId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerId", sellerId)); + } + + if (managementPov != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("managementPov", managementPov)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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); + + } + + /** + * List Stores + * Lists stores, optionally filtered to a seller and adjusted for management views. + * @param sellerId Filter results by seller. (optional) + * @param managementPov Return stores from the seller management point of view. (optional) + * @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) + * @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(@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(); + } + + /** + * List Stores + * Lists stores, optionally filtered to a seller and adjusted for management views. + * @param sellerId Filter results by seller. (optional) + * @param managementPov Return stores from the seller management point of view. (optional) + * @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) + * @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(@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); + } + + /** + * List Stores (asynchronously) + * Lists stores, optionally filtered to a seller and adjusted for management views. + * @param sellerId Filter results by seller. (optional) + * @param managementPov Return stores from the seller management point of view. (optional) + * @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 _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 Store objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listUserProducts + * @param userId Must be a valid user ID. (required) + * @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 _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 Product objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/{userId}/products" + .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(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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)"); + } + + return listUserProductsCall(userId, n, offset, _callback); + + } + + /** + * List User Products + * Gets the products of a given user. + * @param userId Must be a valid user ID. (required) + * @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) + * @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(@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(); + } + + /** + * List User Products + * Gets the products of a given user. + * @param userId Must be a valid user ID. (required) + * @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) + * @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(@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); + } + + /** + * List User Products (asynchronously) + * Gets the products of a given user. + * @param userId Must be a valid user ID. (required) + * @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 _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 Product objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for purchaseProductListing + * @param purchaseProductListingRequest (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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call purchaseProductListingCall(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest, 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 = purchaseProductListingRequest; + + // create path and map variables + String localVarPath = "/economy/purchase/listing"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call purchaseProductListingValidateBeforeCall(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest, final ApiCallback _callback) throws ApiException { + return purchaseProductListingCall(purchaseProductListingRequest, _callback); + + } + + /** + * Purchase Product Listing + * Purchases a product listing + * @param purchaseProductListingRequest (optional) + * @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(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest) throws ApiException { + ApiResponse localVarResp = purchaseProductListingWithHttpInfo(purchaseProductListingRequest); + return localVarResp.getData(); + } + + /** + * Purchase Product Listing + * Purchases a product listing + * @param purchaseProductListingRequest (optional) + * @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(@javax.annotation.Nullable PurchaseProductListingRequest purchaseProductListingRequest) throws ApiException { + okhttp3.Call localVarCall = purchaseProductListingValidateBeforeCall(purchaseProductListingRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Purchase Product Listing (asynchronously) + * Purchases a product listing + * @param purchaseProductListingRequest (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 single ProductPurchase object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateProduct + * @param productId Must be a valid product ID. (required) + * @param updateProductRequest (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 single Product object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateProductRequest; + + // create path and map variables + String localVarPath = "/products/{productId}" + .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'updateProductRequest' is set + if (updateProductRequest == null) { + throw new ApiException("Missing the required parameter 'updateProductRequest' when calling updateProduct(Async)"); + } + + return updateProductCall(productId, updateProductRequest, _callback); + + } + + /** + * Update Product + * Updates a product and returns the updated Product object. + * @param productId Must be a valid product ID. (required) + * @param updateProductRequest (required) + * @return Product + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
+ */ + public Product updateProduct(@javax.annotation.Nonnull String productId, @javax.annotation.Nonnull UpdateProductRequest updateProductRequest) throws ApiException { + ApiResponse localVarResp = updateProductWithHttpInfo(productId, updateProductRequest); + return localVarResp.getData(); + } + + /** + * Update Product + * Updates a product and returns the updated Product object. + * @param productId Must be a valid product ID. (required) + * @param updateProductRequest (required) + * @return ApiResponse<Product> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a single Product object. -
401 Error response due to missing auth cookie. -
+ */ + 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); + } + + /** + * Update Product (asynchronously) + * Updates a product and returns the updated Product object. + * @param productId Must be a valid product ID. (required) + * @param updateProductRequest (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 single Product object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateProductListingDirect + * @param productId Must be a valid product ID. (required) + * @param updateListingRequest (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateListingRequest; + + // create path and map variables + String localVarPath = "/listing/{productId}" + .replace("{" + "productId" + "}", localVarApiClient.escapeString(productId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (hydrate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hydrate", hydrate)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'updateListingRequest' is set + if (updateListingRequest == null) { + throw new ApiException("Missing the required parameter 'updateListingRequest' when calling updateProductListingDirect(Async)"); + } + + return updateProductListingDirectCall(productId, updateListingRequest, hydrate, _callback); + + } + + /** + * Update Product Listing + * Updates the active state of a listing. Setting `active` to `true` publishes the listing, while `false` unpublishes it. + * @param productId Must be a valid product ID. (required) + * @param updateListingRequest (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (optional) + * @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(@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(); + } + + /** + * Update Product Listing + * Updates the active state of a listing. Setting `active` to `true` publishes the listing, while `false` unpublishes it. + * @param productId Must be a valid product ID. (required) + * @param updateListingRequest (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (optional) + * @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(@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); + } + + /** + * Update Product Listing (asynchronously) + * Updates the active state of a listing. Setting `active` to `true` publishes the listing, while `false` unpublishes it. + * @param productId Must be a valid product ID. (required) + * @param updateListingRequest (required) + * @param hydrate Populates some fields and changes types of others for certain objects. (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 single ProductListing object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateTiliaTos + * @param userId Must be a valid user ID. (required) + * @param updateTiliaTOSRequest (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 UserSubscription object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateTiliaTOSRequest; + + // create path and map variables + String localVarPath = "/user/{userId}/tilia/tos" + .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 = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return updateTiliaTosCall(userId, updateTiliaTOSRequest, _callback); + + } + + /** + * Update Tilia TOS Agreement Status + * Updates the status of the agreement of a user to the Tilia TOS + * @param userId Must be a valid user ID. (required) + * @param updateTiliaTOSRequest (optional) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable UpdateTiliaTOSRequest updateTiliaTOSRequest) throws ApiException { + ApiResponse localVarResp = updateTiliaTosWithHttpInfo(userId, updateTiliaTOSRequest); + return localVarResp.getData(); + } + + /** + * Update Tilia TOS Agreement Status + * Updates the status of the agreement of a user to the Tilia TOS + * @param userId Must be a valid user ID. (required) + * @param updateTiliaTOSRequest (optional) + * @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(@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); + } + + /** + * Update Tilia TOS Agreement Status (asynchronously) + * Updates the status of the agreement of a user to the Tilia TOS + * @param userId Must be a valid user ID. (required) + * @param updateTiliaTOSRequest (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 UserSubscription object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/io/github/vrchatapi/api/FavoritesApi.java b/src/main/java/io/github/vrchatapi/api/FavoritesApi.java index 263daff3..d57d9a11 100644 --- a/src/main/java/io/github/vrchatapi/api/FavoritesApi.java +++ b/src/main/java/io/github/vrchatapi/api/FavoritesApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -30,6 +30,8 @@ import io.github.vrchatapi.model.Error; import io.github.vrchatapi.model.Favorite; import io.github.vrchatapi.model.FavoriteGroup; +import io.github.vrchatapi.model.FavoriteLimits; +import io.github.vrchatapi.model.FavoriteType; import io.github.vrchatapi.model.Success; import io.github.vrchatapi.model.UpdateFavoriteGroupRequest; @@ -41,6 +43,8 @@ public class FavoritesApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public FavoritesApi() { this(Configuration.getDefaultApiClient()); @@ -58,6 +62,22 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + /** * Build call for addFavorite * @param addFavoriteRequest (optional) @@ -65,14 +85,28 @@ public void setApiClient(ApiClient apiClient) { * @return 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = addFavoriteRequest; // create path and map variables @@ -96,18 +130,17 @@ public okhttp3.Call addFavoriteCall(AddFavoriteRequest addFavoriteRequest, final "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call addFavoriteValidateBeforeCall(AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = addFavoriteCall(addFavoriteRequest, _callback); - return localVarCall; + private okhttp3.Call addFavoriteValidateBeforeCall(@javax.annotation.Nullable AddFavoriteRequest addFavoriteRequest, final ApiCallback _callback) throws ApiException { + return addFavoriteCall(addFavoriteRequest, _callback); } @@ -118,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(); } @@ -137,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); @@ -158,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(); @@ -175,25 +211,39 @@ public okhttp3.Call addFavoriteAsync(AddFavoriteRequest addFavoriteRequest, fina /** * Build call for clearFavoriteGroup * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @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 Success response after clearing a favorite group. -
*/ - public okhttp3.Call clearFavoriteGroupCall(String 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[] { }; + + // 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 = "/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}" - .replaceAll("\\{" + "favoriteGroupType" + "\\}", localVarApiClient.escapeString(favoriteGroupType.toString())) - .replaceAll("\\{" + "favoriteGroupName" + "\\}", localVarApiClient.escapeString(favoriteGroupName.toString())) - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "favoriteGroupType" + "}", localVarApiClient.escapeString(favoriteGroupType.toString())) + .replace("{" + "favoriteGroupName" + "}", localVarApiClient.escapeString(favoriteGroupName.toString())) + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -210,36 +260,34 @@ public okhttp3.Call clearFavoriteGroupCall(String favoriteGroupType, String favo } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call clearFavoriteGroupValidateBeforeCall(String 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)"); } - + // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) { throw new ApiException("Missing the required parameter 'favoriteGroupName' when calling clearFavoriteGroup(Async)"); } - + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling clearFavoriteGroup(Async)"); } - - okhttp3.Call localVarCall = clearFavoriteGroupCall(favoriteGroupType, favoriteGroupName, userId, _callback); - return localVarCall; + return clearFavoriteGroupCall(favoriteGroupType, favoriteGroupName, userId, _callback); } @@ -247,17 +295,18 @@ private okhttp3.Call clearFavoriteGroupValidateBeforeCall(String favoriteGroupTy * Clear Favorite Group * Clear ALL contents of a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @param userId Must be a valid user ID. (required) * @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(String 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(); } @@ -266,17 +315,18 @@ public Success clearFavoriteGroup(String favoriteGroupType, String favoriteGroup * Clear Favorite Group * Clear ALL contents of a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @param userId Must be a valid user ID. (required) * @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(String 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); @@ -286,166 +336,61 @@ public ApiResponse clearFavoriteGroupWithHttpInfo(String favoriteGroupT * Clear Favorite Group (asynchronously) * Clear ALL contents of a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @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 Success response after clearing a favorite group. -
*/ - public okhttp3.Call clearFavoriteGroupAsync(String 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getFavorite - * @param favoriteId (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 - - - - - -
Status Code Description Response Headers
200 Returns a single Favorite object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
- */ - public okhttp3.Call getFavoriteCall(String favoriteId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/favorites/{favoriteId}" - .replaceAll("\\{" + "favoriteId" + "\\}", localVarApiClient.escapeString(favoriteId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoriteValidateBeforeCall(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 getFavorite(Async)"); - } - - - okhttp3.Call localVarCall = getFavoriteCall(favoriteId, _callback); - return localVarCall; - - } - - /** - * Show Favorite - * Return information about a specific Favorite. - * @param favoriteId (required) - * @return Favorite - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Returns a single Favorite object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
- */ - public Favorite getFavorite(String favoriteId) throws ApiException { - ApiResponse localVarResp = getFavoriteWithHttpInfo(favoriteId); - return localVarResp.getData(); - } - - /** - * Show Favorite - * Return information about a specific Favorite. - * @param favoriteId (required) - * @return ApiResponse<Favorite> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Returns a single Favorite object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
- */ - public ApiResponse getFavoriteWithHttpInfo(String favoriteId) throws ApiException { - okhttp3.Call localVarCall = getFavoriteValidateBeforeCall(favoriteId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Show Favorite (asynchronously) - * Return information about a specific Favorite. - * @param favoriteId (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 - - - - - -
Status Code Description Response Headers
200 Returns a single Favorite object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent favorite. -
- */ - public okhttp3.Call getFavoriteAsync(String favoriteId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getFavoriteValidateBeforeCall(favoriteId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getFavoriteGroup * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @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 single FavoriteGroup object. -
*/ - public okhttp3.Call getFavoriteGroupCall(String 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[] { }; + + // 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 = "/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}" - .replaceAll("\\{" + "favoriteGroupType" + "\\}", localVarApiClient.escapeString(favoriteGroupType.toString())) - .replaceAll("\\{" + "favoriteGroupName" + "\\}", localVarApiClient.escapeString(favoriteGroupName.toString())) - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "favoriteGroupType" + "}", localVarApiClient.escapeString(favoriteGroupType.toString())) + .replace("{" + "favoriteGroupName" + "}", localVarApiClient.escapeString(favoriteGroupName.toString())) + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -462,36 +407,34 @@ public okhttp3.Call getFavoriteGroupCall(String favoriteGroupType, String favori } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoriteGroupValidateBeforeCall(String 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)"); } - + // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) { throw new ApiException("Missing the required parameter 'favoriteGroupName' when calling getFavoriteGroup(Async)"); } - + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling getFavoriteGroup(Async)"); } - - okhttp3.Call localVarCall = getFavoriteGroupCall(favoriteGroupType, favoriteGroupName, userId, _callback); - return localVarCall; + return getFavoriteGroupCall(favoriteGroupType, favoriteGroupName, userId, _callback); } @@ -499,17 +442,18 @@ private okhttp3.Call getFavoriteGroupValidateBeforeCall(String favoriteGroupType * Show Favorite Group * Fetch information about a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @param userId Must be a valid user ID. (required) * @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(String 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(); } @@ -518,17 +462,18 @@ public FavoriteGroup getFavoriteGroup(String favoriteGroupType, String favoriteG * Show Favorite Group * Fetch information about a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @param userId Must be a valid user ID. (required) * @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(String 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); @@ -538,18 +483,19 @@ public ApiResponse getFavoriteGroupWithHttpInfo(String favoriteGr * Show Favorite Group (asynchronously) * Fetch information about a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @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 single FavoriteGroup object. -
*/ - public okhttp3.Call getFavoriteGroupAsync(String 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(); @@ -560,18 +506,33 @@ public okhttp3.Call getFavoriteGroupAsync(String favoriteGroupType, String favor * Build call for getFavoriteGroups * @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 ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param userId Target user to see information on, admin-only. (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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFavoriteGroupsCall(Integer n, Integer offset, 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[] { }; + + // 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 @@ -591,6 +552,10 @@ public okhttp3.Call getFavoriteGroupsCall(Integer n, Integer offset, String owne localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); } + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + if (ownerId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("ownerId", ownerId)); } @@ -604,21 +569,19 @@ public okhttp3.Call getFavoriteGroupsCall(Integer n, Integer offset, String owne } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoriteGroupsValidateBeforeCall(Integer n, Integer offset, String ownerId, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getFavoriteGroupsCall(n, offset, ownerId, _callback); - return localVarCall; + 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); } @@ -627,18 +590,20 @@ private okhttp3.Call getFavoriteGroupsValidateBeforeCall(Integer n, Integer offs * Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`. * @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 ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param userId Target user to see information on, admin-only. (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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public List getFavoriteGroups(Integer n, Integer offset, String ownerId) throws ApiException { - ApiResponse> localVarResp = getFavoriteGroupsWithHttpInfo(n, offset, ownerId); + 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(); } @@ -647,18 +612,20 @@ public List getFavoriteGroups(Integer n, Integer offset, String o * Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`. * @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 ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param userId Target user to see information on, admin-only. (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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getFavoriteGroupsWithHttpInfo(Integer n, Integer offset, String ownerId) throws ApiException { - okhttp3.Call localVarCall = getFavoriteGroupsValidateBeforeCall(n, offset, ownerId, null); + 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); } @@ -668,24 +635,147 @@ public ApiResponse> getFavoriteGroupsWithHttpInfo(Integer n, * Return a list of favorite groups owned by a user. Returns the same information as `getFavoriteGroups`. * @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 ownerId The owner of whoms favorite groups to return. Must be a UserID. (optional) + * @param userId Target user to see information on, admin-only. (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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFavoriteGroupsAsync(Integer n, Integer offset, 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, ownerId, _callback); + okhttp3.Call localVarCall = getFavoriteGroupsValidateBeforeCall(n, offset, userId, ownerId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getFavoriteLimits + * @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 single FavoriteLimits object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getFavoriteLimitsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/favoritelimits"; + + 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 getFavoriteLimitsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getFavoriteLimitsCall(_callback); + + } + + /** + * Get Favorite Limits + * Return information about a specific Favorite. + * @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. -
+ */ + public FavoriteLimits getFavoriteLimits() throws ApiException { + ApiResponse localVarResp = getFavoriteLimitsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Favorite Limits + * Return information about a specific Favorite. + * @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. -
+ */ + public ApiResponse getFavoriteLimitsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getFavoriteLimitsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Favorite Limits (asynchronously) + * Return information about a specific Favorite. + * @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 single FavoriteLimits object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getFavoriteLimitsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getFavoriteLimitsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getFavorites * @param n The number of objects to return. (optional, default to 60) @@ -696,13 +786,27 @@ public okhttp3.Call getFavoriteGroupsAsync(Integer n, Integer offset, String own * @return 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 Favorite objects. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 @@ -739,21 +843,19 @@ public okhttp3.Call getFavoritesCall(Integer n, Integer offset, String type, Str } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoritesValidateBeforeCall(Integer n, Integer offset, String type, String tag, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getFavoritesCall(n, offset, type, tag, _callback); - return localVarCall; + 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); } @@ -767,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 apiKey or auth cookie. -
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(); } @@ -788,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 apiKey or auth cookie. -
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); @@ -811,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 apiKey or auth cookie. -
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(); @@ -826,24 +931,38 @@ public okhttp3.Call getFavoritesAsync(Integer n, Integer offset, String type, St } /** * Build call for removeFavorite - * @param favoriteId (required) + * @param favoriteId Must be a valid favorite 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 Success response after removing a favorite. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/favorites/{favoriteId}" - .replaceAll("\\{" + "favoriteId" + "\\}", localVarApiClient.escapeString(favoriteId.toString())); + .replace("{" + "favoriteId" + "}", localVarApiClient.escapeString(favoriteId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -860,44 +979,43 @@ public okhttp3.Call removeFavoriteCall(String favoriteId, final ApiCallback _cal } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = removeFavoriteCall(favoriteId, _callback); - return localVarCall; + return removeFavoriteCall(favoriteId, _callback); } /** * Remove Favorite * Remove a favorite from your favorites list. - * @param favoriteId (required) + * @param favoriteId Must be a valid favorite ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -905,18 +1023,19 @@ public Success removeFavorite(String favoriteId) throws ApiException { /** * Remove Favorite * Remove a favorite from your favorites list. - * @param favoriteId (required) + * @param favoriteId Must be a valid favorite ID. (required) * @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 apiKey or auth cookie. -
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); @@ -925,19 +1044,20 @@ public ApiResponse removeFavoriteWithHttpInfo(String favoriteId) throws /** * Remove Favorite (asynchronously) * Remove a favorite from your favorites list. - * @param favoriteId (required) + * @param favoriteId Must be a valid favorite 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 Success response after removing a favorite. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -947,26 +1067,40 @@ public okhttp3.Call removeFavoriteAsync(String favoriteId, final ApiCallback + +
Response Details
Status Code Description Response Headers
200 OK -
*/ - public okhttp3.Call updateFavoriteGroupCall(String 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = updateFavoriteGroupRequest; // create path and map variables String localVarPath = "/favorite/group/{favoriteGroupType}/{favoriteGroupName}/{userId}" - .replaceAll("\\{" + "favoriteGroupType" + "\\}", localVarApiClient.escapeString(favoriteGroupType.toString())) - .replaceAll("\\{" + "favoriteGroupName" + "\\}", localVarApiClient.escapeString(favoriteGroupName.toString())) - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "favoriteGroupType" + "}", localVarApiClient.escapeString(favoriteGroupType.toString())) + .replace("{" + "favoriteGroupName" + "}", localVarApiClient.escapeString(favoriteGroupName.toString())) + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -975,7 +1109,6 @@ public okhttp3.Call updateFavoriteGroupCall(String favoriteGroupType, String fav Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -986,33 +1119,32 @@ public okhttp3.Call updateFavoriteGroupCall(String favoriteGroupType, String fav "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateFavoriteGroupValidateBeforeCall(String 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)"); } - + // verify the required parameter 'favoriteGroupName' is set if (favoriteGroupName == null) { throw new ApiException("Missing the required parameter 'favoriteGroupName' when calling updateFavoriteGroup(Async)"); } - + // verify the required parameter 'userId' is set if (userId == null) { throw new ApiException("Missing the required parameter 'userId' when calling updateFavoriteGroup(Async)"); } - - okhttp3.Call localVarCall = updateFavoriteGroupCall(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest, _callback); - return localVarCall; + return updateFavoriteGroupCall(favoriteGroupType, favoriteGroupName, userId, updateFavoriteGroupRequest, _callback); } @@ -1020,17 +1152,18 @@ private okhttp3.Call updateFavoriteGroupValidateBeforeCall(String favoriteGroupT * Update Favorite Group * Update information about a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @param userId Must be a valid user ID. (required) * @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(String 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); } @@ -1038,18 +1171,19 @@ public void updateFavoriteGroup(String favoriteGroupType, String favoriteGroupNa * Update Favorite Group * Update information about a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @param userId Must be a valid user ID. (required) * @param updateFavoriteGroupRequest (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
*/ - public ApiResponse updateFavoriteGroupWithHttpInfo(String 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); } @@ -1058,19 +1192,20 @@ public ApiResponse updateFavoriteGroupWithHttpInfo(String favoriteGroupTyp * Update Favorite Group (asynchronously) * Update information about a specific favorite group. * @param favoriteGroupType The type of group to fetch, must be a valid FavoriteType. (required) - * @param favoriteGroupName (required) - * @param userId (required) + * @param favoriteGroupName The name of the group to fetch, must be a name of a FavoriteGroup. (required) + * @param userId Must be a valid user ID. (required) * @param updateFavoriteGroupRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
*/ - public okhttp3.Call updateFavoriteGroupAsync(String 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 eddc35c0..0010b447 100644 --- a/src/main/java/io/github/vrchatapi/api/FilesApi.java +++ b/src/main/java/io/github/vrchatapi/api/FilesApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,13 +26,27 @@ import java.io.IOException; +import io.github.vrchatapi.model.AdminAssetBundle; +import io.github.vrchatapi.model.Agreement; +import io.github.vrchatapi.model.AgreementCode; +import io.github.vrchatapi.model.AgreementRequest; +import io.github.vrchatapi.model.AgreementStatus; import io.github.vrchatapi.model.CreateFileRequest; import io.github.vrchatapi.model.CreateFileVersionRequest; import io.github.vrchatapi.model.Error; +import java.io.File; +import io.github.vrchatapi.model.FileAnalysis; import io.github.vrchatapi.model.FileUploadURL; import io.github.vrchatapi.model.FileVersionUploadStatus; import io.github.vrchatapi.model.FinishFileDataUploadRequest; -import io.github.vrchatapi.model.Success; +import io.github.vrchatapi.model.GroupGalleryFileOrder; +import io.github.vrchatapi.model.GroupGalleryFileOrderRequest; +import io.github.vrchatapi.model.ImageAnimationStyle; +import io.github.vrchatapi.model.ImageLoopStyle; +import io.github.vrchatapi.model.ImageMask; +import io.github.vrchatapi.model.ImagePurpose; +import io.github.vrchatapi.model.ModelFile; +import io.github.vrchatapi.model.UpdateAssetReviewNotesRequest; import java.lang.reflect.Type; import java.util.ArrayList; @@ -42,6 +56,8 @@ public class FilesApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public FilesApi() { this(Configuration.getDefaultApiClient()); @@ -59,6 +75,22 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + /** * Build call for createFile * @param createFileRequest (optional) @@ -66,12 +98,26 @@ public void setApiClient(ApiClient apiClient) { * @return 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = createFileRequest; // create path and map variables @@ -95,18 +141,17 @@ public okhttp3.Call createFileCall(CreateFileRequest createFileRequest, final Ap "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createFileValidateBeforeCall(CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = createFileCall(createFileRequest, _callback); - return localVarCall; + private okhttp3.Call createFileValidateBeforeCall(@javax.annotation.Nullable CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException { + return createFileCall(createFileRequest, _callback); } @@ -114,16 +159,17 @@ private okhttp3.Call createFileValidateBeforeCall(CreateFileRequest createFileRe * Create File * Creates a new File object * @param createFileRequest (optional) - * @return java.io.File + * @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 java.io.File createFile(CreateFileRequest createFileRequest) throws ApiException { - ApiResponse localVarResp = createFileWithHttpInfo(createFileRequest); + public ModelFile createFile(@javax.annotation.Nullable CreateFileRequest createFileRequest) throws ApiException { + ApiResponse localVarResp = createFileWithHttpInfo(createFileRequest); return localVarResp.getData(); } @@ -131,17 +177,18 @@ public java.io.File createFile(CreateFileRequest createFileRequest) throws ApiEx * Create File * Creates a new File object * @param createFileRequest (optional) - * @return ApiResponse<java.io.File> + * @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(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -153,37 +200,52 @@ public ApiResponse createFileWithHttpInfo(CreateFileRequest 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 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(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createFileVersion - * @param fileId (required) + * @param fileId Must be a valid file ID. (required) * @param createFileVersionRequest (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 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = createFileVersionRequest; // create path and map variables String localVarPath = "/file/{fileId}" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())); + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -203,103 +265,119 @@ public okhttp3.Call createFileVersionCall(String fileId, CreateFileVersionReques "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); } - - okhttp3.Call localVarCall = createFileVersionCall(fileId, createFileVersionRequest, _callback); - return localVarCall; + return createFileVersionCall(fileId, createFileVersionRequest, _callback); } /** * Create File Version * Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. - * @param fileId (required) + * @param fileId Must be a valid file ID. (required) * @param createFileVersionRequest (optional) - * @return java.io.File + * @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 java.io.File createFileVersion(String fileId, CreateFileVersionRequest createFileVersionRequest) throws ApiException { - ApiResponse localVarResp = createFileVersionWithHttpInfo(fileId, createFileVersionRequest); + public ModelFile createFileVersion(@javax.annotation.Nonnull String fileId, @javax.annotation.Nullable CreateFileVersionRequest createFileVersionRequest) throws ApiException { + ApiResponse localVarResp = createFileVersionWithHttpInfo(fileId, createFileVersionRequest); return localVarResp.getData(); } /** * Create File Version * Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. - * @param fileId (required) + * @param fileId Must be a valid file ID. (required) * @param createFileVersionRequest (optional) - * @return ApiResponse<java.io.File> + * @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(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create File Version (asynchronously) * Creates a new FileVersion. Once a Version has been created, proceed to the `/file/{fileId}/{versionId}/file/start` endpoint to start a file upload. - * @param fileId (required) + * @param fileId Must be a valid file ID. (required) * @param createFileVersionRequest (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 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(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteFile - * @param fileId (required) + * @param fileId Must be a valid file 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 Successful response after deleting a File. -
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[] { }; + + // 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 = "/file/{fileId}" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())); + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -316,109 +394,124 @@ public okhttp3.Call deleteFileCall(String fileId, final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = deleteFileCall(fileId, _callback); - return localVarCall; + return deleteFileCall(fileId, _callback); } /** * Delete File * Deletes a File object. - * @param fileId (required) - * @return Success + * @param fileId Must be a valid file ID. (required) + * @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 Successful response after deleting a File. -
200 Returns a single File object. -
404 Error response when trying to delete a non-existent file. -
*/ - public Success deleteFile(String fileId) throws ApiException { - ApiResponse localVarResp = deleteFileWithHttpInfo(fileId); + public ModelFile deleteFile(@javax.annotation.Nonnull String fileId) throws ApiException { + ApiResponse localVarResp = deleteFileWithHttpInfo(fileId); return localVarResp.getData(); } /** * Delete File * Deletes a File object. - * @param fileId (required) - * @return ApiResponse<Success> + * @param fileId Must be a valid file ID. (required) + * @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 Successful response after deleting a File. -
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(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete File (asynchronously) * Deletes a File object. - * @param fileId (required) + * @param fileId Must be a valid file 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 Successful response after deleting a File. -
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(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteFileVersion - * @param fileId (required) - * @param versionId (required) + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (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 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 hte last one. -
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[] { }; + + // 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 = "/file/{fileId}/{versionId}" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())) - .replaceAll("\\{" + "versionId" + "\\}", localVarApiClient.escapeString(versionId.toString())); + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -435,118 +528,134 @@ public okhttp3.Call deleteFileVersionCall(String fileId, Integer versionId, fina } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - + // verify the required parameter 'versionId' is set if (versionId == null) { throw new ApiException("Missing the required parameter 'versionId' when calling deleteFileVersion(Async)"); } - - okhttp3.Call localVarCall = deleteFileVersionCall(fileId, versionId, _callback); - return localVarCall; + return deleteFileVersionCall(fileId, versionId, _callback); } /** * Delete File Version * Delete a specific version of a file. You can only delete the latest version. - * @param fileId (required) - * @param versionId (required) - * @return java.io.File + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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 hte last one. -
500 Error response when trying to delete any version of a file that is not the last one. -
*/ - public java.io.File deleteFileVersion(String fileId, Integer versionId) throws ApiException { - ApiResponse localVarResp = deleteFileVersionWithHttpInfo(fileId, versionId); + public ModelFile deleteFileVersion(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { + ApiResponse localVarResp = deleteFileVersionWithHttpInfo(fileId, versionId); return localVarResp.getData(); } /** * Delete File Version * Delete a specific version of a file. You can only delete the latest version. - * @param fileId (required) - * @param versionId (required) - * @return ApiResponse<java.io.File> + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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 hte last one. -
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(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete File Version (asynchronously) * Delete a specific version of a file. You can only delete the latest version. - * @param fileId (required) - * @param versionId (required) + * @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 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 hte last one. -
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(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for downloadFileVersion - * @param fileId (required) - * @param versionId (required) + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (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 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[] { }; + + // 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 = "/file/{fileId}/{versionId}" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())) - .replaceAll("\\{" + "versionId" + "\\}", localVarApiClient.escapeString(versionId.toString())); + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -555,7 +664,8 @@ public okhttp3.Call downloadFileVersionCall(String fileId, Integer versionId, fi Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - + "image/*", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -563,111 +673,133 @@ public okhttp3.Call downloadFileVersionCall(String fileId, Integer versionId, fi } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - + // verify the required parameter 'versionId' is set if (versionId == null) { throw new ApiException("Missing the required parameter 'versionId' when calling downloadFileVersion(Async)"); } - - okhttp3.Call localVarCall = downloadFileVersionCall(fileId, versionId, _callback); - return localVarCall; + return downloadFileVersionCall(fileId, versionId, _callback); } /** * 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. - * @param fileId (required) - * @param versionId (required) + * 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 void downloadFileVersion(String fileId, Integer versionId) throws ApiException { - downloadFileVersionWithHttpInfo(fileId, versionId); + 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. - * @param fileId (required) - * @param versionId (required) - * @return ApiResponse<Void> + * 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); - return localVarApiClient.execute(localVarCall); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 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. - * @param fileId (required) - * @param versionId (required) + * 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); - localVarApiClient.executeAsync(localVarCall, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for finishFileDataUpload - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) * @param finishFileDataUploadRequest Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. (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 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = finishFileDataUploadRequest; // create path and map variables String localVarPath = "/file/{fileId}/{versionId}/{fileType}/finish" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())) - .replaceAll("\\{" + "versionId" + "\\}", localVarApiClient.escapeString(versionId.toString())) - .replaceAll("\\{" + "fileType" + "\\}", localVarApiClient.escapeString(fileType.toString())); + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.toString())) + .replace("{" + "fileType" + "}", localVarApiClient.escapeString(fileType.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -687,119 +819,134 @@ public okhttp3.Call finishFileDataUploadCall(String fileId, Integer versionId, S "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - + // verify the required parameter 'versionId' is set if (versionId == null) { throw new ApiException("Missing the required parameter 'versionId' when calling finishFileDataUpload(Async)"); } - + // verify the required parameter 'fileType' is set if (fileType == null) { throw new ApiException("Missing the required parameter 'fileType' when calling finishFileDataUpload(Async)"); } - - okhttp3.Call localVarCall = finishFileDataUploadCall(fileId, versionId, fileType, finishFileDataUploadRequest, _callback); - return localVarCall; + return finishFileDataUploadCall(fileId, versionId, fileType, finishFileDataUploadRequest, _callback); } /** * Finish FileData Upload * Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) * @param finishFileDataUploadRequest Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. (optional) - * @return java.io.File + * @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 java.io.File finishFileDataUpload(String fileId, Integer versionId, String fileType, FinishFileDataUploadRequest finishFileDataUploadRequest) throws ApiException { - ApiResponse localVarResp = finishFileDataUploadWithHttpInfo(fileId, versionId, fileType, finishFileDataUploadRequest); + 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(); } /** * Finish FileData Upload * Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) * @param finishFileDataUploadRequest Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. (optional) - * @return ApiResponse<java.io.File> + * @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(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Finish FileData Upload (asynchronously) * Finish an upload of a FileData. This will mark it as \"complete\". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) * @param finishFileDataUploadRequest Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`. (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 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(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getFile - * @param fileId (required) + * Build call for getAdminAssetBundle + * @param adminAssetBundleId Must be a valid admin asset bundle 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 single File object. -
404 Error response when trying to show information about a non-existent file. -
200 Returns a single AdminAssetBundle object. -
*/ - public okhttp3.Call getFileCall(String fileId, 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[] { }; + + // 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 = "/file/{fileId}" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())); + String localVarPath = "/adminassetbundles/{adminAssetBundleId}" + .replace("{" + "adminAssetBundleId" + "}", localVarApiClient.escapeString(adminAssetBundleId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -816,109 +963,119 @@ public okhttp3.Call getFileCall(String fileId, final ApiCallback _callback) thro } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFileValidateBeforeCall(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)"); + 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)"); } - - okhttp3.Call localVarCall = getFileCall(fileId, _callback); - return localVarCall; + return getAdminAssetBundleCall(adminAssetBundleId, _callback); } /** - * Show File - * Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. - * @param fileId (required) - * @return java.io.File + * Get AdminAssetBundle + * Returns an AdminAssetBundle + * @param adminAssetBundleId Must be a valid admin asset bundle ID. (required) + * @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 File object. -
404 Error response when trying to show information about a non-existent file. -
200 Returns a single AdminAssetBundle object. -
*/ - public java.io.File getFile(String fileId) throws ApiException { - ApiResponse localVarResp = getFileWithHttpInfo(fileId); + public AdminAssetBundle getAdminAssetBundle(@javax.annotation.Nonnull String adminAssetBundleId) throws ApiException { + ApiResponse localVarResp = getAdminAssetBundleWithHttpInfo(adminAssetBundleId); return localVarResp.getData(); } /** - * Show File - * Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. - * @param fileId (required) - * @return ApiResponse<java.io.File> + * Get AdminAssetBundle + * Returns an AdminAssetBundle + * @param adminAssetBundleId Must be a valid admin asset bundle ID. (required) + * @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 File object. -
404 Error response when trying to show information about a non-existent file. -
200 Returns a single AdminAssetBundle object. -
*/ - public ApiResponse getFileWithHttpInfo(String fileId) throws ApiException { - okhttp3.Call localVarCall = getFileValidateBeforeCall(fileId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Show File (asynchronously) - * Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. - * @param fileId (required) + * Get AdminAssetBundle (asynchronously) + * Returns an AdminAssetBundle + * @param adminAssetBundleId Must be a valid admin asset bundle 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 single File object. -
404 Error response when trying to show information about a non-existent file. -
200 Returns a single AdminAssetBundle object. -
*/ - public okhttp3.Call getFileAsync(String fileId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAdminAssetBundleAsync(@javax.annotation.Nonnull String adminAssetBundleId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFileValidateBeforeCall(fileId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAdminAssetBundleValidateBeforeCall(adminAssetBundleId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getFileDataUploadStatus - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) + * Build call for getContentAgreementStatus + * @param agreementCode The type of agreement (currently content.copyright.owned) (required) + * @param contentId The id of the content being uploaded, such as a WorldID, AvatarID, or PropID (required) + * @param version The version of the agreement (currently 1) (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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
200 Returns a single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFileDataUploadStatusCall(String fileId, Integer versionId, String fileType, 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[] { }; + + // 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 = "/file/{fileId}/{versionId}/{fileType}/status" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())) - .replaceAll("\\{" + "versionId" + "\\}", localVarApiClient.escapeString(versionId.toString())) - .replaceAll("\\{" + "fileType" + "\\}", localVarApiClient.escapeString(fileType.toString())); + String localVarPath = "/agreement"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -926,6 +1083,18 @@ public okhttp3.Call getFileDataUploadStatusCall(String fileId, Integer versionId Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (agreementCode != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("agreementCode", agreementCode)); + } + + if (contentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("contentId", contentId)); + } + + if (version != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("version", version)); + } + final String[] localVarAccepts = { "application/json" }; @@ -935,120 +1104,137 @@ public okhttp3.Call getFileDataUploadStatusCall(String fileId, Integer versionId } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFileDataUploadStatusValidateBeforeCall(String fileId, Integer versionId, 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)"); + 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)"); } - - // verify the required parameter 'versionId' is set - if (versionId == null) { - throw new ApiException("Missing the required parameter 'versionId' when calling getFileDataUploadStatus(Async)"); + + // verify the required parameter 'contentId' is set + if (contentId == null) { + throw new ApiException("Missing the required parameter 'contentId' when calling getContentAgreementStatus(Async)"); } - - // verify the required parameter 'fileType' is set - if (fileType == null) { - throw new ApiException("Missing the required parameter 'fileType' when calling getFileDataUploadStatus(Async)"); + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException("Missing the required parameter 'version' when calling getContentAgreementStatus(Async)"); } - - okhttp3.Call localVarCall = getFileDataUploadStatusCall(fileId, versionId, fileType, _callback); - return localVarCall; + return getContentAgreementStatusCall(agreementCode, contentId, version, _callback); } /** - * Check FileData Upload Status - * Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) - * @return FileVersionUploadStatus + * Get Content Agreement Status + * Returns the agreement status of the currently authenticated user for the given agreementCode, contentId, and version. + * @param agreementCode The type of agreement (currently content.copyright.owned) (required) + * @param contentId The id of the content being uploaded, such as a WorldID, AvatarID, or PropID (required) + * @param version The version of the agreement (currently 1) (required) + * @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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
200 Returns a single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public FileVersionUploadStatus getFileDataUploadStatus(String fileId, Integer versionId, String fileType) throws ApiException { - ApiResponse localVarResp = getFileDataUploadStatusWithHttpInfo(fileId, versionId, fileType); + 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(); } /** - * Check FileData Upload Status - * Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) - * @return ApiResponse<FileVersionUploadStatus> + * Get Content Agreement Status + * Returns the agreement status of the currently authenticated user for the given agreementCode, contentId, and version. + * @param agreementCode The type of agreement (currently content.copyright.owned) (required) + * @param contentId The id of the content being uploaded, such as a WorldID, AvatarID, or PropID (required) + * @param version The version of the agreement (currently 1) (required) + * @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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
200 Returns a single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getFileDataUploadStatusWithHttpInfo(String fileId, Integer versionId, String fileType) throws ApiException { - okhttp3.Call localVarCall = getFileDataUploadStatusValidateBeforeCall(fileId, versionId, fileType, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Check FileData Upload Status (asynchronously) - * Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) + * Get Content Agreement Status (asynchronously) + * Returns the agreement status of the currently authenticated user for the given agreementCode, contentId, and version. + * @param agreementCode The type of agreement (currently content.copyright.owned) (required) + * @param contentId The id of the content being uploaded, such as a WorldID, AvatarID, or PropID (required) + * @param version The version of the agreement (currently 1) (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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
200 Returns a single AgreementStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getFileDataUploadStatusAsync(String fileId, Integer versionId, String fileType, 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 = getFileDataUploadStatusValidateBeforeCall(fileId, versionId, fileType, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getContentAgreementStatusValidateBeforeCall(agreementCode, contentId, version, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getFiles - * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) - * @param userId UserID, will always generate a 500 permission error. (optional) - * @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) + * Build call for getFile + * @param fileId Must be a valid file 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 list of File objects. -
200 Returns a single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFilesCall(String tag, String userId, Integer n, Integer offset, 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[] { }; + + // 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 = "/files"; + String localVarPath = "/file/{fileId}" + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1056,22 +1242,6 @@ public okhttp3.Call getFilesCall(String tag, String userId, Integer n, Integer o Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (tag != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("tag", tag)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (n != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); - } - - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1081,112 +1251,124 @@ public okhttp3.Call getFilesCall(String tag, String userId, Integer n, Integer o } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFilesValidateBeforeCall(String tag, String userId, Integer n, Integer offset, 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)"); + } - okhttp3.Call localVarCall = getFilesCall(tag, userId, n, offset, _callback); - return localVarCall; + return getFileCall(fileId, _callback); } /** - * List Files - * Returns a list of files - * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) - * @param userId UserID, will always generate a 500 permission error. (optional) - * @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) - * @return List<java.io.File> + * Show File + * Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. + * @param fileId Must be a valid file ID. (required) + * @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 list of File objects. -
200 Returns a single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public List getFiles(String tag, String userId, Integer n, Integer offset) throws ApiException { - ApiResponse> localVarResp = getFilesWithHttpInfo(tag, userId, n, offset); + public ModelFile getFile(@javax.annotation.Nonnull String fileId) throws ApiException { + ApiResponse localVarResp = getFileWithHttpInfo(fileId); return localVarResp.getData(); } /** - * List Files - * Returns a list of files - * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) - * @param userId UserID, will always generate a 500 permission error. (optional) - * @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) - * @return ApiResponse<List<java.io.File>> + * Show File + * Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. + * @param fileId Must be a valid file ID. (required) + * @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 list of File objects. -
200 Returns a single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public ApiResponse> getFilesWithHttpInfo(String tag, String userId, Integer n, Integer offset) throws ApiException { - okhttp3.Call localVarCall = getFilesValidateBeforeCall(tag, userId, n, offset, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + 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); } /** - * List Files (asynchronously) - * Returns a list of files - * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) - * @param userId UserID, will always generate a 500 permission error. (optional) - * @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) + * Show File (asynchronously) + * Shows general information about the \"File\" object. Each File can have several \"Version\"'s, and each Version can have multiple real files or \"Data\" blobs. + * @param fileId Must be a valid file 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 list of File objects. -
200 Returns a single File object. -
404 Error response when trying to show information about a non-existent file. -
*/ - public okhttp3.Call getFilesAsync(String tag, String userId, Integer n, Integer offset, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFileAsync(@javax.annotation.Nonnull String fileId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFilesValidateBeforeCall(tag, userId, n, offset, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getFileValidateBeforeCall(fileId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for startFileDataUpload - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) - * @param partNumber (optional) + * Build call for getFileAnalysis + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (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 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`. -
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 startFileDataUploadCall(String fileId, Integer versionId, String fileType, Integer partNumber, 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[] { }; + + // 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 = "/file/{fileId}/{versionId}/{fileType}/start" - .replaceAll("\\{" + "fileId" + "\\}", localVarApiClient.escapeString(fileId.toString())) - .replaceAll("\\{" + "versionId" + "\\}", localVarApiClient.escapeString(versionId.toString())) - .replaceAll("\\{" + "fileType" + "\\}", localVarApiClient.escapeString(fileType.toString())); + String localVarPath = "/analysis/{fileId}/{versionId}" + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1194,10 +1376,6 @@ public okhttp3.Call startFileDataUploadCall(String fileId, Integer versionId, St Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (partNumber != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("partNumber", partNumber)); - } - final String[] localVarAccepts = { "application/json" }; @@ -1207,103 +1385,1671 @@ public okhttp3.Call startFileDataUploadCall(String fileId, Integer versionId, St } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call startFileDataUploadValidateBeforeCall(String fileId, Integer versionId, String fileType, Integer partNumber, 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 startFileDataUpload(Async)"); + throw new ApiException("Missing the required parameter 'fileId' when calling getFileAnalysis(Async)"); } - + // verify the required parameter 'versionId' is set if (versionId == null) { - throw new ApiException("Missing the required parameter 'versionId' when calling startFileDataUpload(Async)"); - } - - // verify the required parameter 'fileType' is set - if (fileType == null) { - throw new ApiException("Missing the required parameter 'fileType' when calling startFileDataUpload(Async)"); + throw new ApiException("Missing the required parameter 'versionId' when calling getFileAnalysis(Async)"); } - - okhttp3.Call localVarCall = startFileDataUploadCall(fileId, versionId, fileType, partNumber, _callback); - return localVarCall; + return getFileAnalysisCall(fileId, versionId, _callback); } /** - * Start FileData Upload - * Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) - * @param partNumber (optional) - * @return FileUploadURL + * Get File Version Analysis + * Get the performance analysis for the uploaded assets of an avatar + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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 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`. -
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 FileUploadURL startFileDataUpload(String fileId, Integer versionId, String fileType, Integer partNumber) throws ApiException { - ApiResponse localVarResp = startFileDataUploadWithHttpInfo(fileId, versionId, fileType, partNumber); + public FileAnalysis getFileAnalysis(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { + ApiResponse localVarResp = getFileAnalysisWithHttpInfo(fileId, versionId); return localVarResp.getData(); } /** - * Start FileData Upload - * Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) - * @param partNumber (optional) - * @return ApiResponse<FileUploadURL> + * Get File Version Analysis + * Get the performance analysis for the uploaded assets of an avatar + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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 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`. -
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 startFileDataUploadWithHttpInfo(String fileId, Integer versionId, String fileType, Integer partNumber) throws ApiException { - okhttp3.Call localVarCall = startFileDataUploadValidateBeforeCall(fileId, versionId, fileType, partNumber, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Start FileData Upload (asynchronously) - * Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. - * @param fileId (required) - * @param versionId (required) - * @param fileType (required) - * @param partNumber (optional) + * Get File Version Analysis (asynchronously) + * Get the performance analysis for the uploaded assets of an avatar + * @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 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`. -
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 startFileDataUploadAsync(String fileId, Integer versionId, String fileType, Integer partNumber, 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 = startFileDataUploadValidateBeforeCall(fileId, versionId, fileType, partNumber, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getFileAnalysisValidateBeforeCall(fileId, versionId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFileAnalysisSecurity + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (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 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(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, 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 = "/analysis/{fileId}/{versionId}/security" + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.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 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)"); + } + + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException("Missing the required parameter 'versionId' when calling getFileAnalysisSecurity(Async)"); + } + + return getFileAnalysisSecurityCall(fileId, versionId, _callback); + + } + + /** + * Get File Version Analysis Security + * Get the security performance analysis for the uploaded assets of an avatar + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { + ApiResponse localVarResp = getFileAnalysisSecurityWithHttpInfo(fileId, versionId); + return localVarResp.getData(); + } + + /** + * Get File Version Analysis Security + * Get the security performance analysis for the uploaded assets of an avatar + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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(@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); + } + + /** + * Get File Version Analysis Security (asynchronously) + * Get the security performance analysis for the uploaded assets of an avatar + * @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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFileAnalysisStandard + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (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 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(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId, 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 = "/analysis/{fileId}/{versionId}/standard" + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.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 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)"); + } + + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException("Missing the required parameter 'versionId' when calling getFileAnalysisStandard(Async)"); + } + + return getFileAnalysisStandardCall(fileId, versionId, _callback); + + } + + /** + * Get File Version Analysis Standard + * Get the standard performance analysis for the uploaded assets of an avatar + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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(@javax.annotation.Nonnull String fileId, @javax.annotation.Nonnull Integer versionId) throws ApiException { + ApiResponse localVarResp = getFileAnalysisStandardWithHttpInfo(fileId, versionId); + return localVarResp.getData(); + } + + /** + * Get File Version Analysis Standard + * Get the standard performance analysis for the uploaded assets of an avatar + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @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(@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); + } + + /** + * Get File Version Analysis Standard (asynchronously) + * Get the standard performance analysis for the uploaded assets of an avatar + * @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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFileDataUploadStatus + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
+ */ + 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[] { }; + + // 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 = "/file/{fileId}/{versionId}/{fileType}/status" + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.toString())) + .replace("{" + "fileType" + "}", localVarApiClient.escapeString(fileType.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 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)"); + } + + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException("Missing the required parameter 'versionId' when calling getFileDataUploadStatus(Async)"); + } + + // verify the required parameter 'fileType' is set + if (fileType == null) { + throw new ApiException("Missing the required parameter 'fileType' when calling getFileDataUploadStatus(Async)"); + } + + return getFileDataUploadStatusCall(fileId, versionId, fileType, _callback); + + } + + /** + * Check FileData Upload Status + * Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) + * @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(@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(); + } + + /** + * Check FileData Upload Status + * Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) + * @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(@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); + } + + /** + * Check FileData Upload Status (asynchronously) + * Retrieves the upload status for file upload. Can currently only be accessed when `status` is `waiting`. Trying to access it on a file version already uploaded currently times out. + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (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 Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getFiles + * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) + * @param userId UserID, will always generate a 500 permission error. (optional) + * @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 _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 File objects. -
+ */ + 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[] { }; + + // 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 = "/files"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (tag != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tag", tag)); + } + + if (userId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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); + + } + + /** + * List Files + * Returns a list of files + * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) + * @param userId UserID, will always generate a 500 permission error. (optional) + * @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) + * @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(@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(); + } + + /** + * List Files + * Returns a list of files + * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) + * @param userId UserID, will always generate a 500 permission error. (optional) + * @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) + * @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(@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); + } + + /** + * List Files (asynchronously) + * Returns a list of files + * @param tag Tag, for example \"icon\" or \"gallery\", not included by default. (optional) + * @param userId UserID, will always generate a 500 permission error. (optional) + * @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 _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 File objects. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for setGroupGalleryFileOrder + * @param groupGalleryFileOrderRequest (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 File IDs. -
404 Error response when trying to show information about a non-existent file. -
+ */ + public okhttp3.Call setGroupGalleryFileOrderCall(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, 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 = groupGalleryFileOrderRequest; + + // create path and map variables + String localVarPath = "/files/order"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setGroupGalleryFileOrderValidateBeforeCall(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest, final ApiCallback _callback) throws ApiException { + return setGroupGalleryFileOrderCall(groupGalleryFileOrderRequest, _callback); + + } + + /** + * Set Group Gallery File Order + * Set the order of the files in a group gallery + * @param groupGalleryFileOrderRequest (optional) + * @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(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest) throws ApiException { + ApiResponse localVarResp = setGroupGalleryFileOrderWithHttpInfo(groupGalleryFileOrderRequest); + return localVarResp.getData(); + } + + /** + * Set Group Gallery File Order + * Set the order of the files in a group gallery + * @param groupGalleryFileOrderRequest (optional) + * @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(@javax.annotation.Nullable GroupGalleryFileOrderRequest groupGalleryFileOrderRequest) throws ApiException { + okhttp3.Call localVarCall = setGroupGalleryFileOrderValidateBeforeCall(groupGalleryFileOrderRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Set Group Gallery File Order (asynchronously) + * Set the order of the files in a group gallery + * @param groupGalleryFileOrderRequest (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 File IDs. -
404 Error response when trying to show information about a non-existent file. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for startFileDataUpload + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) + * @param partNumber The part number to start uploading. If not provided, the first part will be started. (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 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(@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[] { }; + + // 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 = "/file/{fileId}/{versionId}/{fileType}/start" + .replace("{" + "fileId" + "}", localVarApiClient.escapeString(fileId.toString())) + .replace("{" + "versionId" + "}", localVarApiClient.escapeString(versionId.toString())) + .replace("{" + "fileType" + "}", localVarApiClient.escapeString(fileType.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (partNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("partNumber", partNumber)); + } + + 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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'versionId' is set + if (versionId == null) { + throw new ApiException("Missing the required parameter 'versionId' when calling startFileDataUpload(Async)"); + } + + // verify the required parameter 'fileType' is set + if (fileType == null) { + throw new ApiException("Missing the required parameter 'fileType' when calling startFileDataUpload(Async)"); + } + + return startFileDataUploadCall(fileId, versionId, fileType, partNumber, _callback); + + } + + /** + * Start FileData Upload + * Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) + * @param partNumber The part number to start uploading. If not provided, the first part will be started. (optional) + * @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(@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(); + } + + /** + * Start FileData Upload + * Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) + * @param partNumber The part number to start uploading. If not provided, the first part will be started. (optional) + * @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(@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); + } + + /** + * Start FileData Upload (asynchronously) + * Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each `partNumber`. Please see AWS's REST documentation on \"PUT Object to S3\" on how to upload. Once all parts has been uploaded, proceed to `/finish` endpoint. **Note:** `nextPartNumber` seems like it is always ignored. Despite it returning 0, first partNumber is always 1. + * @param fileId Must be a valid file ID. (required) + * @param versionId Version ID of the asset. (required) + * @param fileType Type of file. (required) + * @param partNumber The part number to start uploading. If not provided, the first part will be started. (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for submitContentAgreement + * @param agreementRequest (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 single Agreement object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call submitContentAgreementCall(@javax.annotation.Nullable AgreementRequest agreementRequest, 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 = agreementRequest; + + // create path and map variables + String localVarPath = "/agreement"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call submitContentAgreementValidateBeforeCall(@javax.annotation.Nullable AgreementRequest agreementRequest, final ApiCallback _callback) throws ApiException { + return submitContentAgreementCall(agreementRequest, _callback); + + } + + /** + * Submit Content Agreement + * Returns the agreement of the currently authenticated user for the given agreementCode, contentId, and version. + * @param agreementRequest (optional) + * @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(@javax.annotation.Nullable AgreementRequest agreementRequest) throws ApiException { + ApiResponse localVarResp = submitContentAgreementWithHttpInfo(agreementRequest); + return localVarResp.getData(); + } + + /** + * Submit Content Agreement + * Returns the agreement of the currently authenticated user for the given agreementCode, contentId, and version. + * @param agreementRequest (optional) + * @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(@javax.annotation.Nullable AgreementRequest agreementRequest) throws ApiException { + okhttp3.Call localVarCall = submitContentAgreementValidateBeforeCall(agreementRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Submit Content Agreement (asynchronously) + * Returns the agreement of the currently authenticated user for the given agreementCode, contentId, and version. + * @param agreementRequest (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 single Agreement object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateAssetReviewNotes + * @param assetReviewId Must be an valid asset review ID. (required) + * @param updateAssetReviewNotesRequest (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 The asset review notes are submitted. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateAssetReviewNotesRequest; + + // create path and map variables + String localVarPath = "/assetReview/{assetReviewId}/notes" + .replace("{" + "assetReviewId" + "}", localVarApiClient.escapeString(assetReviewId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return updateAssetReviewNotesCall(assetReviewId, updateAssetReviewNotesRequest, _callback); + + } + + /** + * Update Asset Review Notes + * Update notes regarding an asset review. + * @param assetReviewId Must be an valid asset review ID. (required) + * @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(@javax.annotation.Nonnull String assetReviewId, @javax.annotation.Nullable UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest) throws ApiException { + updateAssetReviewNotesWithHttpInfo(assetReviewId, updateAssetReviewNotesRequest); + } + + /** + * Update Asset Review Notes + * Update notes regarding an asset review. + * @param assetReviewId Must be an valid asset review ID. (required) + * @param updateAssetReviewNotesRequest (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 The asset review notes are submitted. -
401 Error response due to missing auth cookie. -
+ */ + 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); + } + + /** + * Update Asset Review Notes (asynchronously) + * Update notes regarding an asset review. + * @param assetReviewId Must be an valid asset review ID. (required) + * @param updateAssetReviewNotesRequest (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 The asset review notes are submitted. -
401 Error response due to missing auth cookie. -
+ */ + 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); + return localVarCall; + } + /** + * Build call for uploadGalleryImage + * @param _file The binary blob of the png file. (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 single File object. -
+ */ + public okhttp3.Call uploadGalleryImageCall(@javax.annotation.Nonnull File _file, 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 = "/gallery"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (_file != null) { + localVarFormParams.put("file", _file); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return uploadGalleryImageCall(_file, _callback); + + } + + /** + * Upload gallery image + * Upload a gallery image + * @param _file The binary blob of the png file. (required) + * @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(@javax.annotation.Nonnull File _file) throws ApiException { + ApiResponse localVarResp = uploadGalleryImageWithHttpInfo(_file); + return localVarResp.getData(); + } + + /** + * Upload gallery image + * Upload a gallery image + * @param _file The binary blob of the png file. (required) + * @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(@javax.annotation.Nonnull File _file) throws ApiException { + okhttp3.Call localVarCall = uploadGalleryImageValidateBeforeCall(_file, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Upload gallery image (asynchronously) + * Upload a gallery image + * @param _file The binary blob of the png file. (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 single File object. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for uploadIcon + * @param _file The binary blob of the png file. (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 single File object. -
+ */ + public okhttp3.Call uploadIconCall(@javax.annotation.Nonnull File _file, 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 = "/icon"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (_file != null) { + localVarFormParams.put("file", _file); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return uploadIconCall(_file, _callback); + + } + + /** + * Upload icon + * Upload an icon + * @param _file The binary blob of the png file. (required) + * @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(@javax.annotation.Nonnull File _file) throws ApiException { + ApiResponse localVarResp = uploadIconWithHttpInfo(_file); + return localVarResp.getData(); + } + + /** + * Upload icon + * Upload an icon + * @param _file The binary blob of the png file. (required) + * @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(@javax.annotation.Nonnull File _file) throws ApiException { + okhttp3.Call localVarCall = uploadIconValidateBeforeCall(_file, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Upload icon (asynchronously) + * Upload an icon + * @param _file The binary blob of the png file. (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 single File object. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for uploadImage + * @param _file The binary blob of the png file. (required) + * @param tag (required) + * @param animationStyle (optional) + * @param frames Required for animated images. Total number of frames of the spritesheet to be animated. (optional) + * @param framesOverTime Required for animated images. Animation frames per second. (optional) + * @param loopStyle (optional, default to linear) + * @param maskTag (optional, default to square) + * @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 single File object. -
+ */ + 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[] { }; + + // 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 = "/file/image"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (animationStyle != null) { + localVarFormParams.put("animationStyle", animationStyle); + } + + if (_file != null) { + localVarFormParams.put("file", _file); + } + + if (frames != null) { + localVarFormParams.put("frames", frames); + } + + if (framesOverTime != null) { + localVarFormParams.put("framesOverTime", framesOverTime); + } + + if (loopStyle != null) { + localVarFormParams.put("loopStyle", loopStyle); + } + + if (maskTag != null) { + localVarFormParams.put("maskTag", maskTag); + } + + if (tag != null) { + localVarFormParams.put("tag", tag); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'tag' is set + if (tag == null) { + throw new ApiException("Missing the required parameter 'tag' when calling uploadImage(Async)"); + } + + return uploadImageCall(_file, tag, animationStyle, frames, framesOverTime, loopStyle, maskTag, _callback); + + } + + /** + * Upload gallery image, icon, emoji or sticker + * Upload an image, which can be an icon, gallery image, sticker or emoji + * @param _file The binary blob of the png file. (required) + * @param tag (required) + * @param animationStyle (optional) + * @param frames Required for animated images. Total number of frames of the spritesheet to be animated. (optional) + * @param framesOverTime Required for animated images. Animation frames per second. (optional) + * @param loopStyle (optional, default to linear) + * @param maskTag (optional, default to square) + * @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(@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(); + } + + /** + * Upload gallery image, icon, emoji or sticker + * Upload an image, which can be an icon, gallery image, sticker or emoji + * @param _file The binary blob of the png file. (required) + * @param tag (required) + * @param animationStyle (optional) + * @param frames Required for animated images. Total number of frames of the spritesheet to be animated. (optional) + * @param framesOverTime Required for animated images. Animation frames per second. (optional) + * @param loopStyle (optional, default to linear) + * @param maskTag (optional, default to square) + * @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(@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); + } + + /** + * Upload gallery image, icon, emoji or sticker (asynchronously) + * Upload an image, which can be an icon, gallery image, sticker or emoji + * @param _file The binary blob of the png file. (required) + * @param tag (required) + * @param animationStyle (optional) + * @param frames Required for animated images. Total number of frames of the spritesheet to be animated. (optional) + * @param framesOverTime Required for animated images. Animation frames per second. (optional) + * @param loopStyle (optional, default to linear) + * @param maskTag (optional, default to square) + * @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 single File object. -
+ */ + 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/io/github/vrchatapi/api/FriendsApi.java b/src/main/java/io/github/vrchatapi/api/FriendsApi.java index a2f53f50..c87a30fd 100644 --- a/src/main/java/io/github/vrchatapi/api/FriendsApi.java +++ b/src/main/java/io/github/vrchatapi/api/FriendsApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,9 +26,10 @@ import java.io.IOException; +import io.github.vrchatapi.model.BoopRequest; import io.github.vrchatapi.model.Error; import io.github.vrchatapi.model.FriendStatus; -import io.github.vrchatapi.model.LimitedUser; +import io.github.vrchatapi.model.LimitedUserFriend; import io.github.vrchatapi.model.Notification; import io.github.vrchatapi.model.Success; @@ -40,6 +41,8 @@ public class FriendsApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public FriendsApi() { this(Configuration.getDefaultApiClient()); @@ -57,26 +60,205 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for boop + * @param userId Must be a valid user ID. (required) + * @param boopRequest (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 Successful response after booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
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 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = boopRequest; + + // create path and map variables + String localVarPath = "/users/{userId}/boop" + .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 = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'boopRequest' is set + if (boopRequest == null) { + throw new ApiException("Missing the required parameter 'boopRequest' when calling boop(Async)"); + } + + return boopCall(userId, boopRequest, _callback); + + } + + /** + * Send Boop + * Send a boop to another user. + * @param userId Must be a valid user ID. (required) + * @param boopRequest (required) + * @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 booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
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 Success boop(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull BoopRequest boopRequest) throws ApiException { + ApiResponse localVarResp = boopWithHttpInfo(userId, boopRequest); + return localVarResp.getData(); + } + + /** + * Send Boop + * Send a boop to another user. + * @param userId Must be a valid user ID. (required) + * @param boopRequest (required) + * @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 booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
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 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); + } + + /** + * Send Boop (asynchronously) + * Send a boop to another user. + * @param userId Must be a valid user ID. (required) + * @param boopRequest (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 Successful response after booping a user. -
400 Error response when trying to unfriend someone who is not a friend. -
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 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for deleteFriendRequest - * @param userId (required) + * @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 Successful response after cancelling a friend request. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables String localVarPath = "/user/{userId}/friendRequest" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -93,44 +275,43 @@ public okhttp3.Call deleteFriendRequestCall(String userId, final ApiCallback _ca } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = deleteFriendRequestCall(userId, _callback); - return localVarCall; + return deleteFriendRequestCall(userId, _callback); } /** * Delete Friend Request * Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -138,18 +319,19 @@ public Success deleteFriendRequest(String userId) throws ApiException { /** * Delete Friend Request * Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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 apiKey or auth cookie. -
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); @@ -158,19 +340,20 @@ public ApiResponse deleteFriendRequestWithHttpInfo(String userId) throw /** * Delete Friend Request (asynchronously) * Deletes an outgoing pending friend request to another user. To delete an incoming friend request, use the `deleteNotification` endpoint instead. - * @param userId (required) + * @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 Successful response after cancelling a friend request. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -179,24 +362,39 @@ public okhttp3.Call deleteFriendRequestAsync(String userId, final ApiCallback + + - - + + +
Response Details
Status Code Description Response Headers
200 Returns a single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables String localVarPath = "/user/{userId}/friendRequest" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -213,44 +411,44 @@ public okhttp3.Call friendCall(String userId, final ApiCallback _callback) throw } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); } - - okhttp3.Call localVarCall = friendCall(userId, _callback); - return localVarCall; + return friendCall(userId, _callback); } /** * Send Friend Request * Send a friend request to another user. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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. -
401 Error response due to missing apiKey or auth cookie. -
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(); } @@ -258,18 +456,20 @@ public Notification friend(String userId) throws ApiException { /** * Send Friend Request * Send a friend request to another user. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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. -
401 Error response due to missing apiKey or auth cookie. -
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); @@ -278,19 +478,21 @@ public ApiResponse friendWithHttpInfo(String userId) throws ApiExc /** * Send Friend Request (asynchronously) * Send a friend request to another user. - * @param userId (required) + * @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 single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -299,23 +501,37 @@ public okhttp3.Call friendAsync(String userId, final ApiCallback _ } /** * Build call for getFriendStatus - * @param userId (required) + * @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 users Friend Status. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables String localVarPath = "/user/{userId}/friendStatus" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -332,43 +548,42 @@ public okhttp3.Call getFriendStatusCall(String userId, final ApiCallback _callba } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = getFriendStatusCall(userId, _callback); - return localVarCall; + return getFriendStatusCall(userId, _callback); } /** * Check Friend Status * Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -376,17 +591,18 @@ public FriendStatus getFriendStatus(String userId) throws ApiException { /** * Check Friend Status * Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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 apiKey or auth cookie. -
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); @@ -395,18 +611,19 @@ public ApiResponse getFriendStatusWithHttpInfo(String userId) thro /** * Check Friend Status (asynchronously) * Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification. - * @param userId (required) + * @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 users Friend Status. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -422,13 +639,27 @@ public okhttp3.Call getFriendStatusAsync(String userId, final ApiCallback + + - - + +
Response Details
Status Code Description Response Headers
200 Returns a list of LimitedUser objects. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 @@ -461,21 +692,19 @@ public okhttp3.Call getFriendsCall(Integer offset, Integer n, Boolean offline, f } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFriendsValidateBeforeCall(Integer offset, Integer n, Boolean offline, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getFriendsCall(offset, n, offline, _callback); - return localVarCall; + 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); } @@ -485,17 +714,18 @@ private okhttp3.Call getFriendsValidateBeforeCall(Integer offset, Integer n, Boo * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param n The number of objects to return. (optional, default to 60) * @param offline Returns *only* offline users if true, returns only online and active users if false (optional) - * @return List<LimitedUser> + * @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 LimitedUser objects. -
401 Error response due to missing apiKey or auth cookie. -
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 { - ApiResponse> localVarResp = getFriendsWithHttpInfo(offset, n, offline); + 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(); } @@ -505,18 +735,19 @@ public List getFriends(Integer offset, Integer n, Boolean offline) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param n The number of objects to return. (optional, default to 60) * @param offline Returns *only* offline users if true, returns only online and active users if false (optional) - * @return ApiResponse<List<LimitedUser>> + * @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 LimitedUser objects. -
401 Error response due to missing apiKey or auth cookie. -
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(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -530,39 +761,54 @@ public ApiResponse> getFriendsWithHttpInfo(Integer offset, Int * @return The request call * @throws ApiException If 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 LimitedUser objects. -
401 Error response due to missing apiKey or auth cookie. -
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(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for unfriend - * @param userId (required) + * @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 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 apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables String localVarPath = "/auth/user/friends/{userId}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -579,44 +825,43 @@ public okhttp3.Call unfriendCall(String userId, final ApiCallback _callback) thr } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = unfriendCall(userId, _callback); - return localVarCall; + return unfriendCall(userId, _callback); } /** * Unfriend * Unfriend a user by ID. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -624,18 +869,19 @@ public Success unfriend(String userId) throws ApiException { /** * Unfriend * Unfriend a user by ID. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @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 apiKey or auth cookie. -
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); @@ -644,19 +890,20 @@ public ApiResponse unfriendWithHttpInfo(String userId) throws ApiExcept /** * Unfriend (asynchronously) * Unfriend a user by ID. - * @param userId (required) + * @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 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 apiKey or auth cookie. -
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 new file mode 100644 index 00000000..d266fd04 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/api/GroupsApi.java @@ -0,0 +1,7622 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.api; + +import io.github.vrchatapi.ApiCallback; +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.ApiResponse; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ProgressRequestBody; +import io.github.vrchatapi.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.github.vrchatapi.model.AddGroupGalleryImageRequest; +import io.github.vrchatapi.model.BanGroupMemberRequest; +import io.github.vrchatapi.model.CreateGroupAnnouncementRequest; +import io.github.vrchatapi.model.CreateGroupGalleryRequest; +import io.github.vrchatapi.model.CreateGroupInviteRequest; +import io.github.vrchatapi.model.CreateGroupPostRequest; +import io.github.vrchatapi.model.CreateGroupRequest; +import io.github.vrchatapi.model.CreateGroupRoleRequest; +import io.github.vrchatapi.model.DeclineGroupInviteRequest; +import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.GetGroupPosts200Response; +import io.github.vrchatapi.model.Group; +import io.github.vrchatapi.model.GroupAnnouncement; +import io.github.vrchatapi.model.GroupGallery; +import io.github.vrchatapi.model.GroupGalleryImage; +import io.github.vrchatapi.model.GroupInstance; +import io.github.vrchatapi.model.GroupMember; +import io.github.vrchatapi.model.GroupPermission; +import io.github.vrchatapi.model.GroupPost; +import io.github.vrchatapi.model.GroupRole; +import io.github.vrchatapi.model.GroupRoleTemplateValues; +import io.github.vrchatapi.model.GroupSearchSort; +import io.github.vrchatapi.model.GroupTransferable; +import io.github.vrchatapi.model.JoinGroupRequest; +import io.github.vrchatapi.model.LimitedGroup; +import java.time.OffsetDateTime; +import io.github.vrchatapi.model.PaginatedGroupAuditLogEntryList; +import io.github.vrchatapi.model.RespondGroupJoinRequest; +import io.github.vrchatapi.model.SearchGroupMembers200Response; +import io.github.vrchatapi.model.Success; +import io.github.vrchatapi.model.TransferGroupRequest; +import io.github.vrchatapi.model.UpdateGroupGalleryRequest; +import io.github.vrchatapi.model.UpdateGroupMemberRequest; +import io.github.vrchatapi.model.UpdateGroupRepresentationRequest; +import io.github.vrchatapi.model.UpdateGroupRequest; +import io.github.vrchatapi.model.UpdateGroupRoleRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class GroupsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public GroupsApi() { + this(Configuration.getDefaultApiClient()); + } + + public GroupsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for addGroupGalleryImage + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param addGroupGalleryImageRequest (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 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(@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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = addGroupGalleryImageRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/galleries/{groupGalleryId}/images" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "groupGalleryId" + "}", localVarApiClient.escapeString(groupGalleryId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) { + throw new ApiException("Missing the required parameter 'groupGalleryId' when calling addGroupGalleryImage(Async)"); + } + + // verify the required parameter 'addGroupGalleryImageRequest' is set + if (addGroupGalleryImageRequest == null) { + throw new ApiException("Missing the required parameter 'addGroupGalleryImageRequest' when calling addGroupGalleryImage(Async)"); + } + + return addGroupGalleryImageCall(groupId, groupGalleryId, addGroupGalleryImageRequest, _callback); + + } + + /** + * Add Group Gallery Image + * Adds an image to a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param addGroupGalleryImageRequest (required) + * @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(@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(); + } + + /** + * Add Group Gallery Image + * Adds an image to a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param addGroupGalleryImageRequest (required) + * @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(@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); + } + + /** + * Add Group Gallery Image (asynchronously) + * Adds an image to a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param addGroupGalleryImageRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for addGroupMemberRole + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role 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 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(@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[] { }; + + // 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 = "/groups/{groupId}/members/{userId}/roles/{groupRoleId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "groupRoleId" + "}", localVarApiClient.escapeString(groupRoleId.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling addGroupMemberRole(Async)"); + } + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) { + throw new ApiException("Missing the required parameter 'groupRoleId' when calling addGroupMemberRole(Async)"); + } + + return addGroupMemberRoleCall(groupId, userId, groupRoleId, _callback); + + } + + /** + * Add Role to GroupMember + * Adds a Role to a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @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(@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(); + } + + /** + * Add Role to GroupMember + * Adds a Role to a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @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(@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); + } + + /** + * Add Role to GroupMember (asynchronously) + * Adds a Role to a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for addGroupPost + * @param groupId Must be a valid group ID. (required) + * @param createGroupPostRequest (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 GroupPost object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createGroupPostRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/posts" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'createGroupPostRequest' is set + if (createGroupPostRequest == null) { + throw new ApiException("Missing the required parameter 'createGroupPostRequest' when calling addGroupPost(Async)"); + } + + return addGroupPostCall(groupId, createGroupPostRequest, _callback); + + } + + /** + * Create a post in a Group + * Create a post in a Group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupPostRequest (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupPostRequest createGroupPostRequest) throws ApiException { + ApiResponse localVarResp = addGroupPostWithHttpInfo(groupId, createGroupPostRequest); + return localVarResp.getData(); + } + + /** + * Create a post in a Group + * Create a post in a Group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupPostRequest (required) + * @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(@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); + } + + /** + * Create a post in a Group (asynchronously) + * Create a post in a Group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupPostRequest (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 GroupPost object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for banGroupMember + * @param groupId Must be a valid group ID. (required) + * @param banGroupMemberRequest (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 list of GroupMember objects. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = banGroupMemberRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/bans" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'banGroupMemberRequest' is set + if (banGroupMemberRequest == null) { + throw new ApiException("Missing the required parameter 'banGroupMemberRequest' when calling banGroupMember(Async)"); + } + + return banGroupMemberCall(groupId, banGroupMemberRequest, _callback); + + } + + /** + * Ban Group Member + * Bans a user from a Group. + * @param groupId Must be a valid group ID. (required) + * @param banGroupMemberRequest (required) + * @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. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + public GroupMember banGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull BanGroupMemberRequest banGroupMemberRequest) throws ApiException { + ApiResponse localVarResp = banGroupMemberWithHttpInfo(groupId, banGroupMemberRequest); + return localVarResp.getData(); + } + + /** + * Ban Group Member + * Bans a user from a Group. + * @param groupId Must be a valid group ID. (required) + * @param banGroupMemberRequest (required) + * @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. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Ban Group Member (asynchronously) + * Bans a user from a Group. + * @param groupId Must be a valid group ID. (required) + * @param banGroupMemberRequest (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 list of GroupMember objects. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for blockGroup + * @param groupId Must be a valid group 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 Successful response after blocking a Group. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
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. -
+ */ + public okhttp3.Call blockGroupCall(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/block" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return blockGroupCall(groupId, _callback); + + } + + /** + * Block Group + * Blocks a Group for the current user. To unblock a group, call kickGroupMember (DELETE /groups/{groupId}/members/{userId}). + * @param groupId Must be a valid group ID. (required) + * @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 blocking a Group. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
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. -
+ */ + public Success blockGroup(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse localVarResp = blockGroupWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Block Group + * Blocks a Group for the current user. To unblock a group, call kickGroupMember (DELETE /groups/{groupId}/members/{userId}). + * @param groupId Must be a valid group ID. (required) + * @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 blocking a Group. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
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. -
+ */ + 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); + } + + /** + * Block Group (asynchronously) + * Blocks a Group for the current user. To unblock a group, call kickGroupMember (DELETE /groups/{groupId}/members/{userId}). + * @param groupId Must be a valid group 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 Successful response after blocking a Group. -
400 Bad request error response when banning a user -
401 Error response due to missing auth cookie. -
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. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for cancelGroupRequest + * @param groupId Must be a valid group ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 You can't cancel a join request if you didn't request to join․ -
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 cancelGroupRequestCall(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/requests" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return cancelGroupRequestCall(groupId, _callback); + + } + + /** + * Cancel Group Join Request + * Cancels a request sent to join the group. + * @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 -
400 You can't cancel a join request if you didn't request to join․ -
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 cancelGroupRequest(@javax.annotation.Nonnull String groupId) throws ApiException { + cancelGroupRequestWithHttpInfo(groupId); + } + + /** + * Cancel Group Join Request + * Cancels a request sent to join the group. + * @param groupId Must be a valid group ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 You can't cancel a join request if you didn't request to join․ -
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 cancelGroupRequestWithHttpInfo(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = cancelGroupRequestValidateBeforeCall(groupId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Cancel Group Join Request (asynchronously) + * Cancels a request sent to join the group. + * @param groupId Must be a valid group ID. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 You can't cancel a join request if you didn't request to join․ -
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 cancelGroupRequestAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = cancelGroupRequestValidateBeforeCall(groupId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for cancelGroupTransfer + * @param groupId Must be a valid group 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 Successful response after cancelling a group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending 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 cancelGroupTransferCall(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/transfer" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return cancelGroupTransferCall(groupId, _callback); + + } + + /** + * Cancel Group Transfer + * Cancel a Group Transfer. + * @param groupId Must be a valid group ID. (required) + * @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 group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending transfer. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + public Success cancelGroupTransfer(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse localVarResp = cancelGroupTransferWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Cancel Group Transfer + * Cancel a Group Transfer. + * @param groupId Must be a valid group ID. (required) + * @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 group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending transfer. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Cancel Group Transfer (asynchronously) + * Cancel a Group Transfer. + * @param groupId Must be a valid group 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 Successful response after cancelling a group transfer. -
400 Error response when trying to cancel a transfer for a group without a pending 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 cancelGroupTransferAsync(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = cancelGroupTransferValidateBeforeCall(groupId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createGroup + * @param createGroupRequest (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 single Group object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call createGroupCall(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest, 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 = createGroupRequest; + + // create path and map variables + String localVarPath = "/groups"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return createGroupCall(createGroupRequest, _callback); + + } + + /** + * Create Group + * Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + * @param createGroupRequest (required) + * @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(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest) throws ApiException { + ApiResponse localVarResp = createGroupWithHttpInfo(createGroupRequest); + return localVarResp.getData(); + } + + /** + * Create Group + * Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + * @param createGroupRequest (required) + * @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(@javax.annotation.Nonnull CreateGroupRequest createGroupRequest) throws ApiException { + okhttp3.Call localVarCall = createGroupValidateBeforeCall(createGroupRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Group (asynchronously) + * Creates a Group and returns a Group object. **Requires VRC+ Subscription.** + * @param createGroupRequest (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 single Group object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createGroupAnnouncement + * @param groupId Must be a valid group ID. (required) + * @param createGroupAnnouncementRequest (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupAnnouncementRequest createGroupAnnouncementRequest, 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 = createGroupAnnouncementRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/announcement" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'createGroupAnnouncementRequest' is set + if (createGroupAnnouncementRequest == null) { + throw new ApiException("Missing the required parameter 'createGroupAnnouncementRequest' when calling createGroupAnnouncement(Async)"); + } + + return createGroupAnnouncementCall(groupId, createGroupAnnouncementRequest, _callback); + + } + + /** + * Create Group Announcement + * Creates an Announcement for a Group. Warning: This will also remove all announcements. To make proper announcements, use the posts endpoint instead + * @param groupId Must be a valid group ID. (required) + * @param createGroupAnnouncementRequest (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupAnnouncementRequest createGroupAnnouncementRequest) throws ApiException { + ApiResponse localVarResp = createGroupAnnouncementWithHttpInfo(groupId, createGroupAnnouncementRequest); + return localVarResp.getData(); + } + + /** + * Create Group Announcement + * Creates an Announcement for a Group. Warning: This will also remove all announcements. To make proper announcements, use the posts endpoint instead + * @param groupId Must be a valid group ID. (required) + * @param createGroupAnnouncementRequest (required) + * @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(@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); + } + + /** + * Create Group Announcement (asynchronously) + * Creates an Announcement for a Group. Warning: This will also remove all announcements. To make proper announcements, use the posts endpoint instead + * @param groupId Must be a valid group ID. (required) + * @param createGroupAnnouncementRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createGroupGallery + * @param groupId Must be a valid group ID. (required) + * @param createGroupGalleryRequest (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupGalleryRequest createGroupGalleryRequest, 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 = createGroupGalleryRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/galleries" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'createGroupGalleryRequest' is set + if (createGroupGalleryRequest == null) { + throw new ApiException("Missing the required parameter 'createGroupGalleryRequest' when calling createGroupGallery(Async)"); + } + + return createGroupGalleryCall(groupId, createGroupGalleryRequest, _callback); + + } + + /** + * Create Group Gallery + * Creates a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupGalleryRequest (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupGalleryRequest createGroupGalleryRequest) throws ApiException { + ApiResponse localVarResp = createGroupGalleryWithHttpInfo(groupId, createGroupGalleryRequest); + return localVarResp.getData(); + } + + /** + * Create Group Gallery + * Creates a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupGalleryRequest (required) + * @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(@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); + } + + /** + * Create Group Gallery (asynchronously) + * Creates a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupGalleryRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createGroupInvite + * @param groupId Must be a valid group ID. (required) + * @param createGroupInviteRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when creating a group invite. -
401 Error response due to missing auth cookie. -
403 Forbidden error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createGroupInviteRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/invites" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'createGroupInviteRequest' is set + if (createGroupInviteRequest == null) { + throw new ApiException("Missing the required parameter 'createGroupInviteRequest' when calling createGroupInvite(Async)"); + } + + return createGroupInviteCall(groupId, createGroupInviteRequest, _callback); + + } + + /** + * Invite User to Group + * Sends an invite to a user to join the group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupInviteRequest (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 creating a group invite. -
401 Error response due to missing auth cookie. -
403 Forbidden error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + public void createGroupInvite(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupInviteRequest createGroupInviteRequest) throws ApiException { + createGroupInviteWithHttpInfo(groupId, createGroupInviteRequest); + } + + /** + * Invite User to Group + * Sends an invite to a user to join the group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupInviteRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when creating a group invite. -
401 Error response due to missing auth cookie. -
403 Forbidden error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Invite User to Group (asynchronously) + * Sends an invite to a user to join the group. + * @param groupId Must be a valid group ID. (required) + * @param createGroupInviteRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when creating a group invite. -
401 Error response due to missing auth cookie. -
403 Forbidden error response when creating a group invite. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + return localVarCall; + } + /** + * Build call for createGroupRole + * @param groupId Must be a valid group ID. (required) + * @param createGroupRoleRequest (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupRoleRequest createGroupRoleRequest, 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 = createGroupRoleRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/roles" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'createGroupRoleRequest' is set + if (createGroupRoleRequest == null) { + throw new ApiException("Missing the required parameter 'createGroupRoleRequest' when calling createGroupRole(Async)"); + } + + return createGroupRoleCall(groupId, createGroupRoleRequest, _callback); + + } + + /** + * Create GroupRole + * Create a Group role. + * @param groupId Must be a valid group ID. (required) + * @param createGroupRoleRequest (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull CreateGroupRoleRequest createGroupRoleRequest) throws ApiException { + ApiResponse localVarResp = createGroupRoleWithHttpInfo(groupId, createGroupRoleRequest); + return localVarResp.getData(); + } + + /** + * Create GroupRole + * Create a Group role. + * @param groupId Must be a valid group ID. (required) + * @param createGroupRoleRequest (required) + * @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(@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); + } + + /** + * Create GroupRole (asynchronously) + * Create a Group role. + * @param groupId Must be a valid group ID. (required) + * @param createGroupRoleRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for declineGroupInvite + * @param groupId Must be a valid group ID. (required) + * @param declineGroupInviteRequest (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 Successful response after declining a group invite. -
400 Bad request error response when declining a group invite. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = declineGroupInviteRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/invites" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return declineGroupInviteCall(groupId, declineGroupInviteRequest, _callback); + + } + + /** + * Decline Invite from Group + * Declines an invite to the user from a group. + * @param groupId Must be a valid group ID. (required) + * @param declineGroupInviteRequest (optional) + * @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 declining a group invite. -
400 Bad request error response when declining a group invite. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + public Success declineGroupInvite(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable DeclineGroupInviteRequest declineGroupInviteRequest) throws ApiException { + ApiResponse localVarResp = declineGroupInviteWithHttpInfo(groupId, declineGroupInviteRequest); + return localVarResp.getData(); + } + + /** + * Decline Invite from Group + * Declines an invite to the user from a group. + * @param groupId Must be a valid group ID. (required) + * @param declineGroupInviteRequest (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 + + + + + + + +
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. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Decline Invite from Group (asynchronously) + * Declines an invite to the user from a group. + * @param groupId Must be a valid group ID. (required) + * @param declineGroupInviteRequest (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 Successful response after declining a group invite. -
400 Bad request error response when declining a group invite. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGroup + * @param groupId Must be a valid group ID. (required) + * @param hardDelete (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean hardDelete, 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 = "/groups/{groupId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (hardDelete != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hardDelete", hardDelete)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call 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)"); + } + + return deleteGroupCall(groupId, hardDelete, _callback); + + } + + /** + * Delete Group + * Deletes a Group. + * @param groupId Must be a valid group ID. (required) + * @param hardDelete (optional) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean hardDelete) throws ApiException { + ApiResponse localVarResp = deleteGroupWithHttpInfo(groupId, hardDelete); + return localVarResp.getData(); + } + + /** + * Delete Group + * Deletes a Group. + * @param groupId Must be a valid group ID. (required) + * @param hardDelete (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 + + + + + + +
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(@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); + } + + /** + * Delete Group (asynchronously) + * Deletes a Group. + * @param groupId Must be a valid group ID. (required) + * @param hardDelete (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGroupAnnouncement + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/announcement" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deleteGroupAnnouncementCall(groupId, _callback); + + } + + /** + * Delete Group Announcement + * Deletes the announcement for a Group. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse localVarResp = deleteGroupAnnouncementWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Delete Group Announcement + * Deletes the announcement for a Group. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = deleteGroupAnnouncementValidateBeforeCall(groupId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete Group Announcement (asynchronously) + * Deletes the announcement for a Group. + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteGroupAnnouncementValidateBeforeCall(groupId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGroupGallery + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery 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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId, 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 = "/groups/{groupId}/galleries/{groupGalleryId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "groupGalleryId" + "}", localVarApiClient.escapeString(groupGalleryId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) { + throw new ApiException("Missing the required parameter 'groupGalleryId' when calling deleteGroupGallery(Async)"); + } + + return deleteGroupGalleryCall(groupId, groupGalleryId, _callback); + + } + + /** + * Delete Group Gallery + * Deletes a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupGalleryId) throws ApiException { + ApiResponse localVarResp = deleteGroupGalleryWithHttpInfo(groupId, groupGalleryId); + return localVarResp.getData(); + } + + /** + * Delete Group Gallery + * Deletes a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @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(@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); + } + + /** + * Delete Group Gallery (asynchronously) + * Deletes a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGroupGalleryImage + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param groupGalleryImageId Must be a valid group gallery image 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 Successful response after deleting a group gallery image. -
401 Error response due to missing auth cookie. -
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. -
+ */ + 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[] { }; + + // 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 = "/groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "groupGalleryId" + "}", localVarApiClient.escapeString(groupGalleryId.toString())) + .replace("{" + "groupGalleryImageId" + "}", localVarApiClient.escapeString(groupGalleryImageId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) { + throw new ApiException("Missing the required parameter 'groupGalleryId' when calling deleteGroupGalleryImage(Async)"); + } + + // verify the required parameter 'groupGalleryImageId' is set + if (groupGalleryImageId == null) { + throw new ApiException("Missing the required parameter 'groupGalleryImageId' when calling deleteGroupGalleryImage(Async)"); + } + + return deleteGroupGalleryImageCall(groupId, groupGalleryId, groupGalleryImageId, _callback); + + } + + /** + * Delete Group Gallery Image + * Deletes an image from a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param groupGalleryImageId Must be a valid group gallery image ID. (required) + * @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 image. -
401 Error response due to missing auth cookie. -
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. -
+ */ + 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(); + } + + /** + * Delete Group Gallery Image + * Deletes an image from a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param groupGalleryImageId Must be a valid group gallery image ID. (required) + * @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 image. -
401 Error response due to missing auth cookie. -
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. -
+ */ + 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); + } + + /** + * Delete Group Gallery Image (asynchronously) + * Deletes an image from a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param groupGalleryImageId Must be a valid group gallery image 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 Successful response after deleting a group gallery image. -
401 Error response due to missing auth cookie. -
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. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGroupInvite + * @param groupId Must be a valid group ID. (required) + * @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 OK -
400 Bad request error response when deleting a group invite -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/groups/{groupId}/invites/{userId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling deleteGroupInvite(Async)"); + } + + return deleteGroupInviteCall(groupId, userId, _callback); + + } + + /** + * Delete User Invite + * Deletes an Group invite sent to a User + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { + deleteGroupInviteWithHttpInfo(groupId, userId); + } + + /** + * Delete User Invite + * Deletes an Group invite sent to a User + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad request error response when deleting a group invite -
401 Error response due to missing auth cookie. -
+ */ + 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); + } + + /** + * Delete User Invite (asynchronously) + * Deletes an Group invite sent to a User + * @param groupId Must be a valid group ID. (required) + * @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 OK -
400 Bad request error response when deleting a group invite -
401 Error response due to missing auth cookie. -
+ */ + 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); + return localVarCall; + } + /** + * Build call for deleteGroupPost + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification 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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId, 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 = "/groups/{groupId}/posts/{notificationId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'notificationId' is set + if (notificationId == null) { + throw new ApiException("Missing the required parameter 'notificationId' when calling deleteGroupPost(Async)"); + } + + return deleteGroupPostCall(groupId, notificationId, _callback); + + } + + /** + * Delete a Group post + * Delete a Group post + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String notificationId) throws ApiException { + ApiResponse localVarResp = deleteGroupPostWithHttpInfo(groupId, notificationId); + return localVarResp.getData(); + } + + /** + * Delete a Group post + * Delete a Group post + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification ID. (required) + * @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(@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); + } + + /** + * Delete a Group post (asynchronously) + * Delete a Group post + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteGroupRole + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role 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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId, 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 = "/groups/{groupId}/roles/{groupRoleId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "groupRoleId" + "}", localVarApiClient.escapeString(groupRoleId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) { + throw new ApiException("Missing the required parameter 'groupRoleId' when calling deleteGroupRole(Async)"); + } + + return deleteGroupRoleCall(groupId, groupRoleId, _callback); + + } + + /** + * Delete Group Role + * Deletes a Group Role by ID and returns the remaining roles. + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String groupRoleId) throws ApiException { + ApiResponse> localVarResp = deleteGroupRoleWithHttpInfo(groupId, groupRoleId); + return localVarResp.getData(); + } + + /** + * Delete Group Role + * Deletes a Group Role by ID and returns the remaining roles. + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @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(@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); + } + + /** + * Delete Group Role (asynchronously) + * Deletes a Group Role by ID and returns the remaining roles. + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroup + * @param groupId Must be a valid group ID. (required) + * @param includeRoles Include roles for the Group object. Defaults to false. (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean includeRoles, 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 = "/groups/{groupId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (includeRoles != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeRoles", includeRoles)); + } + + 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 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)"); + } + + return getGroupCall(groupId, includeRoles, _callback); + + } + + /** + * Get Group by ID + * Returns a single Group by ID. + * @param groupId Must be a valid group ID. (required) + * @param includeRoles Include roles for the Group object. Defaults to false. (optional) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable Boolean includeRoles) throws ApiException { + ApiResponse localVarResp = getGroupWithHttpInfo(groupId, includeRoles); + return localVarResp.getData(); + } + + /** + * Get Group by ID + * Returns a single Group by ID. + * @param groupId Must be a valid group ID. (required) + * @param includeRoles Include roles for the Group object. Defaults to false. (optional) + * @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(@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); + } + + /** + * Get Group by ID (asynchronously) + * Returns a single Group by ID. + * @param groupId Must be a valid group ID. (required) + * @param includeRoles Include roles for the Group object. Defaults to false. (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupAnnouncements + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/announcement" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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 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)"); + } + + return getGroupAnnouncementsCall(groupId, _callback); + + } + + /** + * Get Group Announcement + * Returns the announcement for a Group. If no announcement has been made, then it returns **empty object**. If an announcement exists, then it will always return all fields except `imageId` and `imageUrl` which may be null. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse localVarResp = getGroupAnnouncementsWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Get Group Announcement + * Returns the announcement for a Group. If no announcement has been made, then it returns **empty object**. If an announcement exists, then it will always return all fields except `imageId` and `imageUrl` which may be null. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = getGroupAnnouncementsValidateBeforeCall(groupId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Group Announcement (asynchronously) + * Returns the announcement for a Group. If no announcement has been made, then it returns **empty object**. If an announcement exists, then it will always return all fields except `imageId` and `imageUrl` which may be null. + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getGroupAnnouncementsValidateBeforeCall(groupId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupAuditLogEntryTypes + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/auditLogTypes" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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 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)"); + } + + return getGroupAuditLogEntryTypesCall(groupId, _callback); + + } + + /** + * Get Group Audit Log Entry Types + * Returns a list of audit log entry types for which the group has entries. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse> localVarResp = getGroupAuditLogEntryTypesWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Get Group Audit Log Entry Types + * Returns a list of audit log entry types for which the group has entries. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = getGroupAuditLogEntryTypesValidateBeforeCall(groupId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Group Audit Log Entry Types (asynchronously) + * Returns a list of audit log entry types for which the group has entries. + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGroupAuditLogEntryTypesValidateBeforeCall(groupId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupAuditLogs + * @param groupId Must be a valid group ID. (required) + * @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 startDate The start date of the search range. (optional) + * @param endDate The end date of the search range. (optional) + * @param actorIds The comma-separated actor ids to search for. (optional) + * @param eventTypes The comma-separated event types to search for. (optional) + * @param targetIds The comma-separated target ids to search for. (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 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(@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[] { }; + + // 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 = "/groups/{groupId}/auditLogs" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (startDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); + } + + if (endDate != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); + } + + if (actorIds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("actorIds", actorIds)); + } + + if (eventTypes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("eventTypes", eventTypes)); + } + + if (targetIds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("targetIds", targetIds)); + } + + 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 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)"); + } + + return getGroupAuditLogsCall(groupId, n, offset, startDate, endDate, actorIds, eventTypes, targetIds, _callback); + + } + + /** + * Get Group Audit Logs + * Returns a list of audit logs for a Group. + * @param groupId Must be a valid group ID. (required) + * @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 startDate The start date of the search range. (optional) + * @param endDate The end date of the search range. (optional) + * @param actorIds The comma-separated actor ids to search for. (optional) + * @param eventTypes The comma-separated event types to search for. (optional) + * @param targetIds The comma-separated target ids to search for. (optional) + * @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(@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(); + } + + /** + * Get Group Audit Logs + * Returns a list of audit logs for a Group. + * @param groupId Must be a valid group ID. (required) + * @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 startDate The start date of the search range. (optional) + * @param endDate The end date of the search range. (optional) + * @param actorIds The comma-separated actor ids to search for. (optional) + * @param eventTypes The comma-separated event types to search for. (optional) + * @param targetIds The comma-separated target ids to search for. (optional) + * @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(@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); + } + + /** + * Get Group Audit Logs (asynchronously) + * Returns a list of audit logs for a Group. + * @param groupId Must be a valid group ID. (required) + * @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 startDate The start date of the search range. (optional) + * @param endDate The end date of the search range. (optional) + * @param actorIds The comma-separated actor ids to search for. (optional) + * @param eventTypes The comma-separated event types to search for. (optional) + * @param targetIds The comma-separated target ids to search for. (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupBans + * @param groupId Must be a valid group ID. (required) + * @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 _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 GroupMember objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // 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 = "/groups/{groupId}/bans" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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)"); + } + + return getGroupBansCall(groupId, n, offset, _callback); + + } + + /** + * Get Group Bans + * Returns a list of banned users for a Group. + * @param groupId Must be a valid group ID. (required) + * @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) + * @return List<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. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + } + + /** + * Get Group Bans + * Returns a list of banned users for a Group. + * @param groupId Must be a valid group ID. (required) + * @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) + * @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 + + + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Get Group Bans (asynchronously) + * Returns a list of banned users for a Group. + * @param groupId Must be a valid group ID. (required) + * @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 _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 GroupMember objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupGalleryImages + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @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 approved If specified, only returns images that have been approved or not approved. (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 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(@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[] { }; + + // 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 = "/groups/{groupId}/galleries/{groupGalleryId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "groupGalleryId" + "}", localVarApiClient.escapeString(groupGalleryId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (approved != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("approved", approved)); + } + + 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 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)"); + } + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) { + throw new ApiException("Missing the required parameter 'groupGalleryId' when calling getGroupGalleryImages(Async)"); + } + + return getGroupGalleryImagesCall(groupId, groupGalleryId, n, offset, approved, _callback); + + } + + /** + * Get Group Gallery Images + * Returns a list of images for a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @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 approved If specified, only returns images that have been approved or not approved. (optional) + * @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(@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(); + } + + /** + * Get Group Gallery Images + * Returns a list of images for a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @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 approved If specified, only returns images that have been approved or not approved. (optional) + * @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(@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); + } + + /** + * Get Group Gallery Images (asynchronously) + * Returns a list of images for a Group gallery. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @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 approved If specified, only returns images that have been approved or not approved. (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupInstances + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/instances" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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 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)"); + } + + return getGroupInstancesCall(groupId, _callback); + + } + + /** + * Get Group Instances + * Returns a list of group instances + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse> localVarResp = getGroupInstancesWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Get Group Instances + * Returns a list of group instances + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = getGroupInstancesValidateBeforeCall(groupId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Group Instances (asynchronously) + * Returns a list of group instances + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGroupInstancesValidateBeforeCall(groupId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupInvites + * @param groupId Must be a valid group ID. (required) + * @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 _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 GroupMember objects. -
401 Error response due to missing auth cookie. -
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 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[] { }; + + // 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 = "/groups/{groupId}/invites" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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)"); + } + + return getGroupInvitesCall(groupId, n, offset, _callback); + + } + + /** + * Get Group Invites Sent + * Returns a list of members that have been invited to the Group. + * @param groupId Must be a valid group ID. (required) + * @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) + * @return List<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. -
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 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(); + } + + /** + * Get Group Invites Sent + * Returns a list of members that have been invited to the Group. + * @param groupId Must be a valid group ID. (required) + * @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) + * @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 + + + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a list of GroupMember objects. -
401 Error response due to missing auth cookie. -
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> 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); + } + + /** + * Get Group Invites Sent (asynchronously) + * Returns a list of members that have been invited to the Group. + * @param groupId Must be a valid group ID. (required) + * @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 _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 GroupMember objects. -
401 Error response due to missing auth cookie. -
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 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupMember + * @param groupId Must be a valid group ID. (required) + * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
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 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[] { }; + + // 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 = "/groups/{groupId}/members/{userId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .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 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling getGroupMember(Async)"); + } + + return getGroupMemberCall(groupId, userId, _callback); + + } + + /** + * Get Group Member + * Returns a GroupMember. + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @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. -
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 GroupMember getGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getGroupMemberWithHttpInfo(groupId, userId); + return localVarResp.getData(); + } + + /** + * Get Group Member + * Returns a GroupMember. + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @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. -
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 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); + } + + /** + * Get Group Member (asynchronously) + * Returns a GroupMember. + * @param groupId Must be a valid group ID. (required) + * @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 list of GroupMember objects. -
401 Error response due to missing auth cookie. -
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 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupMembers + * @param groupId Must be a valid group ID. (required) + * @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 sort The sort order of Group Member results (optional) + * @param roleId Only returns members with a specific groupRoleId (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 GroupMember objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // 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 = "/groups/{groupId}/members" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (sort != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); + } + + if (roleId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("roleId", roleId)); + } + + 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 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)"); + } + + return getGroupMembersCall(groupId, n, offset, sort, roleId, _callback); + + } + + /** + * List Group Members + * Returns a List of all **other** Group Members. This endpoint will never return the user calling the endpoint. Information about the user calling the endpoint must be found in the `myMember` field of the Group object. + * @param groupId Must be a valid group ID. (required) + * @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 sort The sort order of Group Member results (optional) + * @param roleId Only returns members with a specific groupRoleId (optional) + * @return List<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. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + } + + /** + * List Group Members + * Returns a List of all **other** Group Members. This endpoint will never return the user calling the endpoint. Information about the user calling the endpoint must be found in the `myMember` field of the Group object. + * @param groupId Must be a valid group ID. (required) + * @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 sort The sort order of Group Member results (optional) + * @param roleId Only returns members with a specific groupRoleId (optional) + * @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 + + + + + + + +
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. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * List Group Members (asynchronously) + * Returns a List of all **other** Group Members. This endpoint will never return the user calling the endpoint. Information about the user calling the endpoint must be found in the `myMember` field of the Group object. + * @param groupId Must be a valid group ID. (required) + * @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 sort The sort order of Group Member results (optional) + * @param roleId Only returns members with a specific groupRoleId (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 GroupMember objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupPermissions + * @param groupId Must be a valid group 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 list of GroupPermission objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + public okhttp3.Call getGroupPermissionsCall(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/permissions" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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 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)"); + } + + return getGroupPermissionsCall(groupId, _callback); + + } + + /** + * List Group Permissions + * Returns a List of all possible/available permissions for a Group. + * @param groupId Must be a valid group ID. (required) + * @return List<GroupPermission> + * @throws ApiException If fail to call the 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 GroupPermission objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + public List getGroupPermissions(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse> localVarResp = getGroupPermissionsWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * List Group Permissions + * Returns a List of all possible/available permissions for a Group. + * @param groupId Must be a valid group ID. (required) + * @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 + + + + + + + +
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. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * List Group Permissions (asynchronously) + * Returns a List of all possible/available permissions for a Group. + * @param groupId Must be a valid group 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 list of GroupPermission objects. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupPosts + * @param groupId Must be a valid group ID. (required) + * @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 publicOnly See public posts only. (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 GroupPost Array. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/groups/{groupId}/posts" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (publicOnly != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("publicOnly", publicOnly)); + } + + 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 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)"); + } + + return getGroupPostsCall(groupId, n, offset, publicOnly, _callback); + + } + + /** + * Get posts from a Group + * Get posts from a Group + * @param groupId Must be a valid group ID. (required) + * @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 publicOnly See public posts only. (optional) + * @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(@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(); + } + + /** + * Get posts from a Group + * Get posts from a Group + * @param groupId Must be a valid group ID. (required) + * @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 publicOnly See public posts only. (optional) + * @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(@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); + } + + /** + * Get posts from a Group (asynchronously) + * Get posts from a Group + * @param groupId Must be a valid group ID. (required) + * @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 publicOnly See public posts only. (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 GroupPost Array. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupRequests + * @param groupId Must be a valid group ID. (required) + * @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 blocked See blocked join requests (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 GroupMember objects. -
400 Bad request error response when responding to a group join request -
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 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[] { }; + + // 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 = "/groups/{groupId}/requests" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (blocked != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("blocked", blocked)); + } + + 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 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)"); + } + + return getGroupRequestsCall(groupId, n, offset, blocked, _callback); + + } + + /** + * Get Group Join Requests + * Returns a list of members that have requested to join the Group. + * @param groupId Must be a valid group ID. (required) + * @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 blocked See blocked join requests (optional) + * @return List<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. -
400 Bad request error response when responding to a group join request -
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 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(); + } + + /** + * Get Group Join Requests + * Returns a list of members that have requested to join the Group. + * @param groupId Must be a valid group ID. (required) + * @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 blocked See blocked join requests (optional) + * @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 + + + + + + + +
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 -
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> 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); + } + + /** + * Get Group Join Requests (asynchronously) + * Returns a list of members that have requested to join the Group. + * @param groupId Must be a valid group ID. (required) + * @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 blocked See blocked join requests (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 GroupMember objects. -
400 Bad request error response when responding to a group join request -
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 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupRoleTemplates + * @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 dictionary of GroupRoleTemplate objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getGroupRoleTemplatesCall(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 = "/groups/roleTemplates"; + + 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 getGroupRoleTemplatesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getGroupRoleTemplatesCall(_callback); + + } + + /** + * Get Group Role Templates + * Obtain predefined templates for group roles + * @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. -
+ */ + public Map getGroupRoleTemplates() throws ApiException { + ApiResponse> localVarResp = getGroupRoleTemplatesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Group Role Templates + * Obtain predefined templates for group roles + * @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. -
+ */ + public ApiResponse> getGroupRoleTemplatesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getGroupRoleTemplatesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Group Role Templates (asynchronously) + * Obtain predefined templates for group roles + * @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 dictionary of GroupRoleTemplate objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getGroupRoleTemplatesAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGroupRoleTemplatesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupRoles + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/roles" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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 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)"); + } + + return getGroupRolesCall(groupId, _callback); + + } + + /** + * Get Group Roles + * Returns a Group Role by ID. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse> localVarResp = getGroupRolesWithHttpInfo(groupId); + return localVarResp.getData(); + } + + /** + * Get Group Roles + * Returns a Group Role by ID. + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = getGroupRolesValidateBeforeCall(groupId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Group Roles (asynchronously) + * Returns a Group Role by ID. + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String groupId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getGroupRolesValidateBeforeCall(groupId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getGroupTransferability + * @param groupId Must be a valid group ID. (required) + * @param transferTargetId The UserID of the prospective transferee. (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 single GroupTransferable object. -
401 Error response due to missing auth cookie. -
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 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[] { }; + + // 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 = "/groups/{groupId}/transfer" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (transferTargetId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("transferTargetId", transferTargetId)); + } + + 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 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)"); + } + + return getGroupTransferabilityCall(groupId, transferTargetId, _callback); + + } + + /** + * Get Group Transferability + * Returns the transferability of the group to a given user. + * @param groupId Must be a valid group ID. (required) + * @param transferTargetId The UserID of the prospective transferee. (optional) + * @return GroupTransferable + * @throws ApiException If fail to call the 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 GroupTransferable object. -
401 Error response due to missing auth cookie. -
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 GroupTransferable getGroupTransferability(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable String transferTargetId) throws ApiException { + ApiResponse localVarResp = getGroupTransferabilityWithHttpInfo(groupId, transferTargetId); + return localVarResp.getData(); + } + + /** + * Get Group Transferability + * Returns the transferability of the group to a given user. + * @param groupId Must be a valid group ID. (required) + * @param transferTargetId The UserID of the prospective transferee. (optional) + * @return ApiResponse<GroupTransferable> + * @throws ApiException If fail to call the 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 GroupTransferable object. -
401 Error response due to missing auth cookie. -
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 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); + } + + /** + * Get Group Transferability (asynchronously) + * Returns the transferability of the group to a given user. + * @param groupId Must be a valid group ID. (required) + * @param transferTargetId The UserID of the prospective transferee. (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 single GroupTransferable object. -
401 Error response due to missing auth cookie. -
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 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for initiateOrAcceptGroupTransfer + * @param groupId Must be a valid group ID. (required) + * @param transferGroupRequest (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 Successful response after initiating or completing a group transfer. -
401 Error response due to missing auth cookie. -
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. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = transferGroupRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/transfer" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return initiateOrAcceptGroupTransferCall(groupId, transferGroupRequest, _callback); + + } + + /** + * 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 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 + + + + + + + +
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. -
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. -
+ */ + 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 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 + + + + + + + +
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. -
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. -
+ */ + 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); + } + + /** + * 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 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 + + + + + + + +
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. -
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. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for joinGroup + * @param groupId Must be a valid group ID. (required) + * @param confirmOverrideBlock Manually override the failure that would occur if the user has blocked the group. (optional) + * @param joinGroupRequest (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 GroupMember objects. -
400 Error response when trying to join a group that the user is already a member of. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = joinGroupRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/join" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (confirmOverrideBlock != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("confirmOverrideBlock", confirmOverrideBlock)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return joinGroupCall(groupId, confirmOverrideBlock, joinGroupRequest, _callback); + + } + + /** + * Join Group + * Join a Group by ID and returns the member object. + * @param groupId Must be a valid group ID. (required) + * @param confirmOverrideBlock Manually override the failure that would occur if the user has blocked the group. (optional) + * @param joinGroupRequest (optional) + * @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. -
400 Error response when trying to join a group that the user is already a member of. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + } + + /** + * Join Group + * Join a Group by ID and returns the member object. + * @param groupId Must be a valid group ID. (required) + * @param confirmOverrideBlock Manually override the failure that would occur if the user has blocked the group. (optional) + * @param joinGroupRequest (optional) + * @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. -
400 Error response when trying to join a group that the user is already a member of. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Join Group (asynchronously) + * Join a Group by ID and returns the member object. + * @param groupId Must be a valid group ID. (required) + * @param confirmOverrideBlock Manually override the failure that would occur if the user has blocked the group. (optional) + * @param joinGroupRequest (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 GroupMember objects. -
400 Error response when trying to join a group that the user is already a member of. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for kickGroupMember + * @param groupId Must be a valid group ID. (required) + * @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 Successful response after deleting a group member. -
401 Error response due to missing auth cookie. -
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 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[] { }; + + // 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 = "/groups/{groupId}/members/{userId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling kickGroupMember(Async)"); + } + + return kickGroupMemberCall(groupId, userId, _callback); + + } + + /** + * Kick Group Member + * Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. Also used for unblocking groups. + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @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 member. -
401 Error response due to missing auth cookie. -
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 Success kickGroupMember(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = kickGroupMemberWithHttpInfo(groupId, userId); + return localVarResp.getData(); + } + + /** + * Kick Group Member + * Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. Also used for unblocking groups. + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @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 member. -
401 Error response due to missing auth cookie. -
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 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); + } + + /** + * Kick Group Member (asynchronously) + * Kicks a Group Member from the Group. The current user must have the \"Remove Group Members\" permission. Also used for unblocking groups. + * @param groupId Must be a valid group ID. (required) + * @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 Successful response after deleting a group member. -
401 Error response due to missing auth cookie. -
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 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for leaveGroup + * @param groupId Must be a valid group ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
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(@javax.annotation.Nonnull String groupId, 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 = "/groups/{groupId}/leave" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return leaveGroupCall(groupId, _callback); + + } + + /** + * Leave Group + * Leave a group by ID. + * @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(@javax.annotation.Nonnull String groupId) throws ApiException { + leaveGroupWithHttpInfo(groupId); + } + + /** + * Leave Group + * Leave a group by ID. + * @param groupId Must be a valid group ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
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(@javax.annotation.Nonnull String groupId) throws ApiException { + okhttp3.Call localVarCall = leaveGroupValidateBeforeCall(groupId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Leave Group (asynchronously) + * Leave a group by ID. + * @param groupId Must be a valid group ID. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
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(@javax.annotation.Nonnull String groupId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = leaveGroupValidateBeforeCall(groupId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for removeGroupMemberRole + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role 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 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(@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[] { }; + + // 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 = "/groups/{groupId}/members/{userId}/roles/{groupRoleId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "groupRoleId" + "}", localVarApiClient.escapeString(groupRoleId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling removeGroupMemberRole(Async)"); + } + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) { + throw new ApiException("Missing the required parameter 'groupRoleId' when calling removeGroupMemberRole(Async)"); + } + + return removeGroupMemberRoleCall(groupId, userId, groupRoleId, _callback); + + } + + /** + * Remove Role from GroupMember + * Removes a Role from a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @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(@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(); + } + + /** + * Remove Role from GroupMember + * Removes a Role from a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @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(@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); + } + + /** + * Remove Role from GroupMember (asynchronously) + * Removes a Role from a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param groupRoleId Must be a valid group role 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for respondGroupJoinRequest + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param respondGroupJoinRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = respondGroupJoinRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/requests/{userId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .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 = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling respondGroupJoinRequest(Async)"); + } + + // verify the required parameter 'respondGroupJoinRequest' is set + if (respondGroupJoinRequest == null) { + throw new ApiException("Missing the required parameter 'respondGroupJoinRequest' when calling respondGroupJoinRequest(Async)"); + } + + return respondGroupJoinRequestCall(groupId, userId, respondGroupJoinRequest, _callback); + + } + + /** + * Respond Group Join request + * Responds to a Group Join Request with Accept/Deny + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId, @javax.annotation.Nonnull RespondGroupJoinRequest respondGroupJoinRequest) throws ApiException { + respondGroupJoinRequestWithHttpInfo(groupId, userId, respondGroupJoinRequest); + } + + /** + * Respond Group Join request + * Responds to a Group Join Request with Accept/Deny + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param respondGroupJoinRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Respond Group Join request (asynchronously) + * Responds to a Group Join Request with Accept/Deny + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param respondGroupJoinRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + return localVarCall; + } + /** + * Build call for searchGroupMembers + * @param groupId Must be a valid group ID. (required) + * @param query Filter for member displayName. (required) + * @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 _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 GroupMember objects from a search. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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[] { }; + + // 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 = "/groups/{groupId}/members/search" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (query != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); + } + + 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 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)"); + } + + // verify the required parameter 'query' is set + if (query == null) { + throw new ApiException("Missing the required parameter 'query' when calling searchGroupMembers(Async)"); + } + + return searchGroupMembersCall(groupId, query, n, offset, _callback); + + } + + /** + * Search Group Members + * Search for members in the group by displayName. + * @param groupId Must be a valid group ID. (required) + * @param query Filter for member displayName. (required) + * @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) + * @return SearchGroupMembers200Response + * @throws ApiException If fail to call the 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 from a search. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + } + + /** + * Search Group Members + * Search for members in the group by displayName. + * @param groupId Must be a valid group ID. (required) + * @param query Filter for member displayName. (required) + * @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) + * @return ApiResponse<SearchGroupMembers200Response> + * @throws ApiException If fail to call the 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 from a search. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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); + } + + /** + * Search Group Members (asynchronously) + * Search for members in the group by displayName. + * @param groupId Must be a valid group ID. (required) + * @param query Filter for member displayName. (required) + * @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 _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 GroupMember objects from a search. -
400 Error response when trying to search list of users with an invalid request. -
401 Error response due to missing auth cookie. -
404 Error response when trying to perform operations on a non-existing group. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchGroups + * @param query Query to search for, can be either Group Name or Group shortCode (optional) + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @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 LimitedGroup objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/groups"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (query != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + 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[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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); + + } + + /** + * Search Group + * Searches Groups by name or shortCode + * @param query Query to search for, can be either Group Name or Group shortCode (optional) + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @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(@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(); + } + + /** + * Search Group + * Searches Groups by name or shortCode + * @param query Query to search for, can be either Group Name or Group shortCode (optional) + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @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(@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); + } + + /** + * Search Group (asynchronously) + * Searches Groups by name or shortCode + * @param query Query to search for, can be either Group Name or Group shortCode (optional) + * @param offset A zero-based offset from the default object sorting from where search results start. (optional) + * @param n The number of objects to return. (optional, default to 60) + * @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 LimitedGroup objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unbanGroupMember + * @param groupId Must be a valid group ID. (required) + * @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 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(@javax.annotation.Nonnull String groupId, @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 = "/groups/{groupId}/bans/{userId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling unbanGroupMember(Async)"); + } + + return unbanGroupMemberCall(groupId, userId, _callback); + + } + + /** + * Unban Group Member + * Unbans a user from a Group. + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = unbanGroupMemberWithHttpInfo(groupId, userId); + return localVarResp.getData(); + } + + /** + * Unban Group Member + * Unbans a user from a Group. + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @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(@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); + } + + /** + * Unban Group Member (asynchronously) + * Unbans a user from a Group. + * @param groupId Must be a valid group ID. (required) + * @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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGroup + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRequest (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable UpdateGroupRequest updateGroupRequest, 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 = updateGroupRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return updateGroupCall(groupId, updateGroupRequest, _callback); + + } + + /** + * Update Group + * Updates a Group and returns it. + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRequest (optional) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nullable UpdateGroupRequest updateGroupRequest) throws ApiException { + ApiResponse localVarResp = updateGroupWithHttpInfo(groupId, updateGroupRequest); + return localVarResp.getData(); + } + + /** + * Update Group + * Updates a Group and returns it. + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRequest (optional) + * @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(@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); + } + + /** + * Update Group (asynchronously) + * Updates a Group and returns it. + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGroupGallery + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param updateGroupGalleryRequest (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 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(@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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateGroupGalleryRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/galleries/{groupGalleryId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "groupGalleryId" + "}", localVarApiClient.escapeString(groupGalleryId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'groupGalleryId' is set + if (groupGalleryId == null) { + throw new ApiException("Missing the required parameter 'groupGalleryId' when calling updateGroupGallery(Async)"); + } + + return updateGroupGalleryCall(groupId, groupGalleryId, updateGroupGalleryRequest, _callback); + + } + + /** + * Update Group Gallery + * Updates a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param updateGroupGalleryRequest (optional) + * @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(@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(); + } + + /** + * Update Group Gallery + * Updates a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param updateGroupGalleryRequest (optional) + * @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(@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); + } + + /** + * Update Group Gallery (asynchronously) + * Updates a gallery for a Group. + * @param groupId Must be a valid group ID. (required) + * @param groupGalleryId Must be a valid group gallery ID. (required) + * @param updateGroupGalleryRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGroupMember + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param updateGroupMemberRequest (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 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(@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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateGroupMemberRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/members/{userId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .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 = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling updateGroupMember(Async)"); + } + + return updateGroupMemberCall(groupId, userId, updateGroupMemberRequest, _callback); + + } + + /** + * Update Group Member + * Updates a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param updateGroupMemberRequest (optional) + * @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(@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(); + } + + /** + * Update Group Member + * Updates a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param updateGroupMemberRequest (optional) + * @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(@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); + } + + /** + * Update Group Member (asynchronously) + * Updates a Group Member + * @param groupId Must be a valid group ID. (required) + * @param userId Must be a valid user ID. (required) + * @param updateGroupMemberRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGroupPost + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification ID. (required) + * @param createGroupPostRequest (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 GroupPost object. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createGroupPostRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/posts/{notificationId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'notificationId' is set + if (notificationId == null) { + throw new ApiException("Missing the required parameter 'notificationId' when calling updateGroupPost(Async)"); + } + + // verify the required parameter 'createGroupPostRequest' is set + if (createGroupPostRequest == null) { + throw new ApiException("Missing the required parameter 'createGroupPostRequest' when calling updateGroupPost(Async)"); + } + + return updateGroupPostCall(groupId, notificationId, createGroupPostRequest, _callback); + + } + + /** + * Edits a Group post + * Edits a Group post + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification ID. (required) + * @param createGroupPostRequest (required) + * @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(@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(); + } + + /** + * Edits a Group post + * Edits a Group post + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification ID. (required) + * @param createGroupPostRequest (required) + * @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(@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); + } + + /** + * Edits a Group post (asynchronously) + * Edits a Group post + * @param groupId Must be a valid group ID. (required) + * @param notificationId Must be a valid notification ID. (required) + * @param createGroupPostRequest (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 GroupPost object. -
401 Error response due to missing auth cookie. -
404 Response after deleting a group post. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGroupRepresentation + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRepresentationRequest (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 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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull UpdateGroupRepresentationRequest updateGroupRepresentationRequest, 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 = updateGroupRepresentationRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/representation" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'updateGroupRepresentationRequest' is set + if (updateGroupRepresentationRequest == null) { + throw new ApiException("Missing the required parameter 'updateGroupRepresentationRequest' when calling updateGroupRepresentation(Async)"); + } + + return updateGroupRepresentationCall(groupId, updateGroupRepresentationRequest, _callback); + + } + + /** + * Update Group Representation + * Updates whether the user is representing the group. When `isRepresenting` is set to `true`, this flag will be set to `false` for all other groups + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRepresentationRequest (required) + * @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(@javax.annotation.Nonnull String groupId, @javax.annotation.Nonnull UpdateGroupRepresentationRequest updateGroupRepresentationRequest) throws ApiException { + ApiResponse localVarResp = updateGroupRepresentationWithHttpInfo(groupId, updateGroupRepresentationRequest); + return localVarResp.getData(); + } + + /** + * Update Group Representation + * Updates whether the user is representing the group. When `isRepresenting` is set to `true`, this flag will be set to `false` for all other groups + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRepresentationRequest (required) + * @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(@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); + } + + /** + * Update Group Representation (asynchronously) + * Updates whether the user is representing the group. When `isRepresenting` is set to `true`, this flag will be set to `false` for all other groups + * @param groupId Must be a valid group ID. (required) + * @param updateGroupRepresentationRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateGroupRole + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @param updateGroupRoleRequest (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 GroupRole objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateGroupRoleRequest; + + // create path and map variables + String localVarPath = "/groups/{groupId}/roles/{groupRoleId}" + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.toString())) + .replace("{" + "groupRoleId" + "}", localVarApiClient.escapeString(groupRoleId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'groupRoleId' is set + if (groupRoleId == null) { + throw new ApiException("Missing the required parameter 'groupRoleId' when calling updateGroupRole(Async)"); + } + + return updateGroupRoleCall(groupId, groupRoleId, updateGroupRoleRequest, _callback); + + } + + /** + * Update Group Role + * Updates a group role by ID. + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @param updateGroupRoleRequest (optional) + * @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(@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(); + } + + /** + * Update Group Role + * Updates a group role by ID. + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @param updateGroupRoleRequest (optional) + * @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(@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); + } + + /** + * Update Group Role (asynchronously) + * Updates a group role by ID. + * @param groupId Must be a valid group ID. (required) + * @param groupRoleId Must be a valid group role ID. (required) + * @param updateGroupRoleRequest (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 GroupRole objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/io/github/vrchatapi/api/InstancesApi.java b/src/main/java/io/github/vrchatapi/api/InstancesApi.java index c36884d1..4ba8fcbf 100644 --- a/src/main/java/io/github/vrchatapi/api/InstancesApi.java +++ b/src/main/java/io/github/vrchatapi/api/InstancesApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,9 +26,11 @@ import java.io.IOException; +import io.github.vrchatapi.model.CreateInstanceRequest; import io.github.vrchatapi.model.Error; import io.github.vrchatapi.model.Instance; -import io.github.vrchatapi.model.Success; +import io.github.vrchatapi.model.InstanceShortNameResponse; +import java.time.OffsetDateTime; import java.lang.reflect.Type; import java.util.ArrayList; @@ -38,6 +40,8 @@ public class InstancesApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public InstancesApi() { this(Configuration.getDefaultApiClient()); @@ -55,27 +59,353 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for closeInstance + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @param hardClose Whether to hard close the instance. Defaults to false. (optional) + * @param closedAt The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. (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 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 existent instance -
+ */ + 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[] { }; + + // 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 = "/instances/{worldId}:{instanceId}" + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())) + .replace("{" + "instanceId" + "}", localVarApiClient.escapeString(instanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (hardClose != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("hardClose", hardClose)); + } + + if (closedAt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("closedAt", closedAt)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call 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)"); + } + + // verify the required parameter 'instanceId' is set + if (instanceId == null) { + throw new ApiException("Missing the required parameter 'instanceId' when calling closeInstance(Async)"); + } + + return closeInstanceCall(worldId, instanceId, hardClose, closedAt, _callback); + + } + + /** + * Close Instance + * Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-manage` permission. + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @param hardClose Whether to hard close the instance. Defaults to false. (optional) + * @param closedAt The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. (optional) + * @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 existent instance -
+ */ + 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(); + } + + /** + * Close Instance + * Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-manage` permission. + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @param hardClose Whether to hard close the instance. Defaults to false. (optional) + * @param closedAt The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. (optional) + * @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 existent instance -
+ */ + 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); + } + + /** + * Close Instance (asynchronously) + * Close an instance or update the closedAt time when it will be closed. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-manage` permission. + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @param hardClose Whether to hard close the instance. Defaults to false. (optional) + * @param closedAt The time after which users won't be allowed to join the instances. If omitted, the instance will be closed immediately. (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 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 existent instance -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createInstance + * @param createInstanceRequest (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 single Instance object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call createInstanceCall(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest, 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 = createInstanceRequest; + + // create path and map variables + String localVarPath = "/instances"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return createInstanceCall(createInstanceRequest, _callback); + + } + + /** + * Create Instance + * Create an instance + * @param createInstanceRequest (required) + * @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(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest) throws ApiException { + ApiResponse localVarResp = createInstanceWithHttpInfo(createInstanceRequest); + return localVarResp.getData(); + } + + /** + * Create Instance + * Create an instance + * @param createInstanceRequest (required) + * @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(@javax.annotation.Nonnull CreateInstanceRequest createInstanceRequest) throws ApiException { + okhttp3.Call localVarCall = createInstanceValidateBeforeCall(createInstanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Instance (asynchronously) + * Create an instance + * @param createInstanceRequest (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 single Instance object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getInstance - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 single Instance object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/instances/{worldId}:{instanceId}" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())) - .replaceAll("\\{" + "instanceId" + "\\}", localVarApiClient.escapeString(instanceId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())) + .replace("{" + "instanceId" + "}", localVarApiClient.escapeString(instanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -92,49 +422,48 @@ public okhttp3.Call getInstanceCall(String worldId, String instanceId, final Api } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - + // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getInstance(Async)"); } - - okhttp3.Call localVarCall = getInstanceCall(worldId, instanceId, _callback); - return localVarCall; + return getInstanceCall(worldId, instanceId, _callback); } /** * Get Instance * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -142,18 +471,19 @@ public Instance getInstance(String worldId, String instanceId) throws ApiExcepti /** * Get Instance * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) * @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 apiKey or auth cookie. -
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); @@ -162,19 +492,20 @@ public ApiResponse getInstanceWithHttpInfo(String worldId, String inst /** * Get Instance (asynchronously) * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 single Instance object. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -182,26 +513,39 @@ public okhttp3.Call getInstanceAsync(String worldId, String instanceId, final Ap return localVarCall; } /** - * Build call for getShortName - * @param worldId (required) - * @param instanceId (required) + * Build call for getInstanceByShortName + * @param shortName Must be a valid instance short name. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - - + + +
Response Details
Status Code Description Response Headers
200 Returns an instance short name. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single Instance object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existent instance -
*/ - public okhttp3.Call getShortNameCall(String worldId, String instanceId, 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[] { }; + + // 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 = "/instances/{worldId}:{instanceId}/shortName" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())) - .replaceAll("\\{" + "instanceId" + "\\}", localVarApiClient.escapeString(instanceId.toString())); + String localVarPath = "/instances/s/{shortName}" + .replace("{" + "shortName" + "}", localVarApiClient.escapeString(shortName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -210,7 +554,7 @@ public okhttp3.Call getShortNameCall(String worldId, String instanceId, final Ap Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", "application/json" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -218,116 +562,263 @@ public okhttp3.Call getShortNameCall(String worldId, String instanceId, final Ap } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getShortNameValidateBeforeCall(String worldId, 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)"); - } - - // verify the required parameter 'instanceId' is set - if (instanceId == null) { - throw new ApiException("Missing the required parameter 'instanceId' when calling getShortName(Async)"); + 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)"); } - - okhttp3.Call localVarCall = getShortNameCall(worldId, instanceId, _callback); + return getInstanceByShortNameCall(shortName, _callback); + + } + + /** + * Get Instance By Short Name + * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. + * @param shortName Must be a valid instance short name. (required) + * @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 existent instance -
+ */ + public Instance getInstanceByShortName(@javax.annotation.Nonnull String shortName) throws ApiException { + ApiResponse localVarResp = getInstanceByShortNameWithHttpInfo(shortName); + return localVarResp.getData(); + } + + /** + * Get Instance By Short Name + * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. + * @param shortName Must be a valid instance short name. (required) + * @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 existent instance -
+ */ + 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); + } + + /** + * Get Instance By Short Name (asynchronously) + * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. + * @param shortName Must be a valid instance short name. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 Returns a single Instance object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existent instance -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; + } + /** + * Build call for getRecentLocations + * @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 _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 LocationIDs. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/instances/recent"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 getRecentLocationsValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { + return getRecentLocationsCall(n, offset, _callback); } /** - * Get Instance Short Name - * Returns an instance short name. - * @param worldId (required) - * @param instanceId (required) - * @return String + * List Recent Locations + * Returns a list of recently visited locations. + * @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) + * @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 an instance short name. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of LocationIDs. -
401 Error response due to missing auth cookie. -
*/ - public String getShortName(String worldId, String instanceId) throws ApiException { - ApiResponse localVarResp = getShortNameWithHttpInfo(worldId, instanceId); + public List getRecentLocations(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { + ApiResponse> localVarResp = getRecentLocationsWithHttpInfo(n, offset); return localVarResp.getData(); } /** - * Get Instance Short Name - * Returns an instance short name. - * @param worldId (required) - * @param instanceId (required) - * @return ApiResponse<String> + * List Recent Locations + * Returns a list of recently visited locations. + * @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) + * @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 an instance short name. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of LocationIDs. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getShortNameWithHttpInfo(String worldId, String instanceId) throws ApiException { - okhttp3.Call localVarCall = getShortNameValidateBeforeCall(worldId, instanceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Get Instance Short Name (asynchronously) - * Returns an instance short name. - * @param worldId (required) - * @param instanceId (required) + * List Recent Locations (asynchronously) + * Returns a list of recently visited locations. + * @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 _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 an instance short name. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of LocationIDs. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getShortNameAsync(String worldId, String instanceId, 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 = getShortNameValidateBeforeCall(worldId, instanceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getRecentLocationsValidateBeforeCall(n, offset, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for sendSelfInvite - * @param worldId (required) - * @param instanceId (required) + * Build call for getShortName + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 Success response after sending an invite to yourself to the instance. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call sendSelfInviteCall(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[] { }; + + // 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 = "/instances/{worldId}:{instanceId}/invite" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())) - .replaceAll("\\{" + "instanceId" + "\\}", localVarApiClient.escapeString(instanceId.toString())); + String localVarPath = "/instances/{worldId}:{instanceId}/shortName" + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())) + .replace("{" + "instanceId" + "}", localVarApiClient.escapeString(instanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -344,92 +835,93 @@ public okhttp3.Call sendSelfInviteCall(String worldId, String instanceId, final } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call sendSelfInviteValidateBeforeCall(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 sendSelfInvite(Async)"); + throw new ApiException("Missing the required parameter 'worldId' when calling getShortName(Async)"); } - + // verify the required parameter 'instanceId' is set if (instanceId == null) { - throw new ApiException("Missing the required parameter 'instanceId' when calling sendSelfInvite(Async)"); + throw new ApiException("Missing the required parameter 'instanceId' when calling getShortName(Async)"); } - - okhttp3.Call localVarCall = sendSelfInviteCall(worldId, instanceId, _callback); - return localVarCall; + return getShortNameCall(worldId, instanceId, _callback); } /** - * Send Self Invite - * Sends an invite to the instance to yourself. - * @param worldId (required) - * @param instanceId (required) - * @return Success + * Get Instance Short Name + * Returns an instance short name. + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @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 Success response after sending an invite to yourself to the instance. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public Success sendSelfInvite(String worldId, String instanceId) throws ApiException { - ApiResponse localVarResp = sendSelfInviteWithHttpInfo(worldId, instanceId); + public InstanceShortNameResponse getShortName(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { + ApiResponse localVarResp = getShortNameWithHttpInfo(worldId, instanceId); return localVarResp.getData(); } /** - * Send Self Invite - * Sends an invite to the instance to yourself. - * @param worldId (required) - * @param instanceId (required) - * @return ApiResponse<Success> + * Get Instance Short Name + * Returns an instance short name. + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @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 Success response after sending an invite to yourself to the instance. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse sendSelfInviteWithHttpInfo(String worldId, String instanceId) throws ApiException { - okhttp3.Call localVarCall = sendSelfInviteValidateBeforeCall(worldId, instanceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Send Self Invite (asynchronously) - * Sends an invite to the instance to yourself. - * @param worldId (required) - * @param instanceId (required) + * Get Instance Short Name (asynchronously) + * Returns an instance short name. + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 Success response after sending an invite to yourself to the instance. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns an instance secureName and/or shortName. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call sendSelfInviteAsync(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 = sendSelfInviteValidateBeforeCall(worldId, instanceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getShortNameValidateBeforeCall(worldId, instanceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/io/github/vrchatapi/api/InventoryApi.java b/src/main/java/io/github/vrchatapi/api/InventoryApi.java new file mode 100644 index 00000000..2a8ba5d4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/api/InventoryApi.java @@ -0,0 +1,2198 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.api; + +import io.github.vrchatapi.ApiCallback; +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.ApiResponse; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ProgressRequestBody; +import io.github.vrchatapi.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.github.vrchatapi.model.EquipInventoryItemRequest; +import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.Inventory; +import io.github.vrchatapi.model.InventoryConsumptionResults; +import io.github.vrchatapi.model.InventoryDrop; +import io.github.vrchatapi.model.InventoryEquipSlot; +import io.github.vrchatapi.model.InventoryFlag; +import io.github.vrchatapi.model.InventoryItem; +import io.github.vrchatapi.model.InventoryItemType; +import io.github.vrchatapi.model.InventorySpawn; +import io.github.vrchatapi.model.InventoryTemplate; +import io.github.vrchatapi.model.OkStatus; +import io.github.vrchatapi.model.RewardRedemptionRequest; +import io.github.vrchatapi.model.RewardRedemptionResult; +import io.github.vrchatapi.model.ShareInventoryItemDirectRequest; +import io.github.vrchatapi.model.SuccessFlag; +import io.github.vrchatapi.model.UpdateInventoryItemRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class InventoryApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public InventoryApi() { + this(Configuration.getDefaultApiClient()); + } + + public InventoryApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for consumeOwnInventoryItem + * @param inventoryItemId Must be a valid inventory item 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 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(@javax.annotation.Nonnull String inventoryItemId, 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 = "/inventory/{inventoryItemId}/consume" + .replace("{" + "inventoryItemId" + "}", localVarApiClient.escapeString(inventoryItemId.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return consumeOwnInventoryItemCall(inventoryItemId, _callback); + + } + + /** + * Consume Own Inventory Item + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { + ApiResponse localVarResp = consumeOwnInventoryItemWithHttpInfo(inventoryItemId); + return localVarResp.getData(); + } + + /** + * Consume Own Inventory Item + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { + okhttp3.Call localVarCall = consumeOwnInventoryItemValidateBeforeCall(inventoryItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Consume Own Inventory Item (asynchronously) + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item 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 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(@javax.annotation.Nonnull String inventoryItemId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = consumeOwnInventoryItemValidateBeforeCall(inventoryItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteOwnInventoryItem + * @param inventoryItemId Must be a valid inventory item 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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteOwnInventoryItemCall(@javax.annotation.Nonnull String inventoryItemId, 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 = "/inventory/{inventoryItemId}" + .replace("{" + "inventoryItemId" + "}", localVarApiClient.escapeString(inventoryItemId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deleteOwnInventoryItemCall(inventoryItemId, _callback); + + } + + /** + * Delete Own Inventory Item + * Deletes an InventoryItem from the inventory of the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { + ApiResponse localVarResp = deleteOwnInventoryItemWithHttpInfo(inventoryItemId); + return localVarResp.getData(); + } + + /** + * Delete Own Inventory Item + * Deletes an InventoryItem from the inventory of the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { + okhttp3.Call localVarCall = deleteOwnInventoryItemValidateBeforeCall(inventoryItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete Own Inventory Item (asynchronously) + * Deletes an InventoryItem from the inventory of the currently logged in user. + * @param inventoryItemId Must be a valid inventory item 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 an SuccessFlag object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for equipOwnInventoryItem + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param equipInventoryItemRequest (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 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(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable EquipInventoryItemRequest equipInventoryItemRequest, 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 = equipInventoryItemRequest; + + // create path and map variables + String localVarPath = "/inventory/{inventoryItemId}/equip" + .replace("{" + "inventoryItemId" + "}", localVarApiClient.escapeString(inventoryItemId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return equipOwnInventoryItemCall(inventoryItemId, equipInventoryItemRequest, _callback); + + } + + /** + * Equip Own Inventory Item + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param equipInventoryItemRequest (optional) + * @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(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable EquipInventoryItemRequest equipInventoryItemRequest) throws ApiException { + ApiResponse localVarResp = equipOwnInventoryItemWithHttpInfo(inventoryItemId, equipInventoryItemRequest); + return localVarResp.getData(); + } + + /** + * Equip Own Inventory Item + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param equipInventoryItemRequest (optional) + * @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(@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); + } + + /** + * Equip Own Inventory Item (asynchronously) + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param equipInventoryItemRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInventory + * @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 holderId The UserID of the owner of the inventory; defaults to the currently authenticated user. (optional) + * @param equipSlot Filter for inventory retrieval. (optional, default to ) + * @param order Sort order for inventory retrieval. (optional) + * @param tags Filter tags for inventory retrieval (comma-separated). (optional) + * @param types Filter for inventory retrieval. (optional, default to bundle) + * @param flags Filter flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param notTypes Filter out types for inventory retrieval (comma-separated). (optional, default to bundle) + * @param notFlags Filter out flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param archived Filter archived status for inventory retrieval. (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 an Inventory object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
+ */ + 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[] { }; + + // 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 = "/inventory"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (holderId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("holderId", holderId)); + } + + if (equipSlot != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("equipSlot", equipSlot)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + if (tags != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("tags", tags)); + } + + if (types != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("types", types)); + } + + if (flags != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("flags", flags)); + } + + if (notTypes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("notTypes", notTypes)); + } + + if (notFlags != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("notFlags", notFlags)); + } + + if (archived != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("archived", archived)); + } + + 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 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); + + } + + /** + * Get Inventory + * Returns an Inventory object. + * @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 holderId The UserID of the owner of the inventory; defaults to the currently authenticated user. (optional) + * @param equipSlot Filter for inventory retrieval. (optional, default to ) + * @param order Sort order for inventory retrieval. (optional) + * @param tags Filter tags for inventory retrieval (comma-separated). (optional) + * @param types Filter for inventory retrieval. (optional, default to bundle) + * @param flags Filter flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param notTypes Filter out types for inventory retrieval (comma-separated). (optional, default to bundle) + * @param notFlags Filter out flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param archived Filter archived status for inventory retrieval. (optional) + * @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(@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(); + } + + /** + * Get Inventory + * Returns an Inventory object. + * @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 holderId The UserID of the owner of the inventory; defaults to the currently authenticated user. (optional) + * @param equipSlot Filter for inventory retrieval. (optional, default to ) + * @param order Sort order for inventory retrieval. (optional) + * @param tags Filter tags for inventory retrieval (comma-separated). (optional) + * @param types Filter for inventory retrieval. (optional, default to bundle) + * @param flags Filter flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param notTypes Filter out types for inventory retrieval (comma-separated). (optional, default to bundle) + * @param notFlags Filter out flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param archived Filter archived status for inventory retrieval. (optional) + * @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(@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); + } + + /** + * Get Inventory (asynchronously) + * Returns an Inventory object. + * @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 holderId The UserID of the owner of the inventory; defaults to the currently authenticated user. (optional) + * @param equipSlot Filter for inventory retrieval. (optional, default to ) + * @param order Sort order for inventory retrieval. (optional) + * @param tags Filter tags for inventory retrieval (comma-separated). (optional) + * @param types Filter for inventory retrieval. (optional, default to bundle) + * @param flags Filter flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param notTypes Filter out types for inventory retrieval (comma-separated). (optional, default to bundle) + * @param notFlags Filter out flags for inventory retrieval (comma-separated). (optional, default to instantiatable) + * @param archived Filter archived status for inventory retrieval. (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 an Inventory object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInventoryCollections + * @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 strings. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getInventoryCollectionsCall(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 = "/inventory/collections"; + + 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 getInventoryCollectionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getInventoryCollectionsCall(_callback); + + } + + /** + * List Inventory Collections + * Returns a list of collection names. + * @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. -
+ */ + public List getInventoryCollections() throws ApiException { + ApiResponse> localVarResp = getInventoryCollectionsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * List Inventory Collections + * Returns a list of collection names. + * @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. -
+ */ + public ApiResponse> getInventoryCollectionsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getInventoryCollectionsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Inventory Collections (asynchronously) + * Returns a list of collection names. + * @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 strings. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getInventoryCollectionsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getInventoryCollectionsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInventoryDrops + * @param active Filter for users' listings and inventory bundles. (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 InventoryDrop objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getInventoryDropsCall(@javax.annotation.Nullable Boolean active, 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 = "/inventory/drops"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (active != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("active", active)); + } + + 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 getInventoryDropsValidateBeforeCall(@javax.annotation.Nullable Boolean active, final ApiCallback _callback) throws ApiException { + return getInventoryDropsCall(active, _callback); + + } + + /** + * List Inventory Drops + * Returns a list of InventoryDrop objects. + * @param active Filter for users' listings and inventory bundles. (optional) + * @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(@javax.annotation.Nullable Boolean active) throws ApiException { + ApiResponse> localVarResp = getInventoryDropsWithHttpInfo(active); + return localVarResp.getData(); + } + + /** + * List Inventory Drops + * Returns a list of InventoryDrop objects. + * @param active Filter for users' listings and inventory bundles. (optional) + * @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(@javax.annotation.Nullable Boolean active) throws ApiException { + okhttp3.Call localVarCall = getInventoryDropsValidateBeforeCall(active, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Inventory Drops (asynchronously) + * Returns a list of InventoryDrop objects. + * @param active Filter for users' listings and inventory bundles. (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 InventoryDrop objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInventoryTemplate + * @param inventoryTemplateId Must be a valid inventory template 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 an InventoryTemplate object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getInventoryTemplateCall(@javax.annotation.Nonnull String inventoryTemplateId, 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 = "/inventory/template/{inventoryTemplateId}" + .replace("{" + "inventoryTemplateId" + "}", localVarApiClient.escapeString(inventoryTemplateId.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 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)"); + } + + return getInventoryTemplateCall(inventoryTemplateId, _callback); + + } + + /** + * Get Inventory Template + * Returns an InventoryTemplate object. + * @param inventoryTemplateId Must be a valid inventory template ID. (required) + * @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(@javax.annotation.Nonnull String inventoryTemplateId) throws ApiException { + ApiResponse localVarResp = getInventoryTemplateWithHttpInfo(inventoryTemplateId); + return localVarResp.getData(); + } + + /** + * Get Inventory Template + * Returns an InventoryTemplate object. + * @param inventoryTemplateId Must be a valid inventory template ID. (required) + * @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(@javax.annotation.Nonnull String inventoryTemplateId) throws ApiException { + okhttp3.Call localVarCall = getInventoryTemplateValidateBeforeCall(inventoryTemplateId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Inventory Template (asynchronously) + * Returns an InventoryTemplate object. + * @param inventoryTemplateId Must be a valid inventory template 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 an InventoryTemplate object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOwnInventoryItem + * @param inventoryItemId Must be a valid inventory item 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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getOwnInventoryItemCall(@javax.annotation.Nonnull String inventoryItemId, 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 = "/inventory/{inventoryItemId}" + .replace("{" + "inventoryItemId" + "}", localVarApiClient.escapeString(inventoryItemId.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 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)"); + } + + return getOwnInventoryItemCall(inventoryItemId, _callback); + + } + + /** + * Get Own Inventory Item + * Returns an InventoryItem object held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { + ApiResponse localVarResp = getOwnInventoryItemWithHttpInfo(inventoryItemId); + return localVarResp.getData(); + } + + /** + * Get Own Inventory Item + * Returns an InventoryItem object held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@javax.annotation.Nonnull String inventoryItemId) throws ApiException { + okhttp3.Call localVarCall = getOwnInventoryItemValidateBeforeCall(inventoryItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Own Inventory Item (asynchronously) + * Returns an InventoryItem object held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item 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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserInventoryItem + * @param userId Must be a valid user ID. (required) + * @param inventoryItemId Must be a valid inventory item 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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/{userId}/inventory/{inventoryItemId}" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "inventoryItemId" + "}", localVarApiClient.escapeString(inventoryItemId.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 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)"); + } + + // verify the required parameter 'inventoryItemId' is set + if (inventoryItemId == null) { + throw new ApiException("Missing the required parameter 'inventoryItemId' when calling getUserInventoryItem(Async)"); + } + + return getUserInventoryItemCall(userId, inventoryItemId, _callback); + + } + + /** + * Get User Inventory Item + * Returns an InventoryItem object held by the given user. + * @param userId Must be a valid user ID. (required) + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String inventoryItemId) throws ApiException { + ApiResponse localVarResp = getUserInventoryItemWithHttpInfo(userId, inventoryItemId); + return localVarResp.getData(); + } + + /** + * Get User Inventory Item + * Returns an InventoryItem object held by the given user. + * @param userId Must be a valid user ID. (required) + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @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(@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); + } + + /** + * Get User Inventory Item (asynchronously) + * Returns an InventoryItem object held by the given user. + * @param userId Must be a valid user ID. (required) + * @param inventoryItemId Must be a valid inventory item 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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for redeemReward + * @param rewardRedemptionRequest (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 single RewardRedemptionResult object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call redeemRewardCall(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest, 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 = rewardRedemptionRequest; + + // create path and map variables + String localVarPath = "/reward/redeem"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return redeemRewardCall(rewardRedemptionRequest, _callback); + + } + + /** + * Redeem Reward + * Redeem a reward for the currently logged in user. + * @param rewardRedemptionRequest (required) + * @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(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest) throws ApiException { + ApiResponse> localVarResp = redeemRewardWithHttpInfo(rewardRedemptionRequest); + return localVarResp.getData(); + } + + /** + * Redeem Reward + * Redeem a reward for the currently logged in user. + * @param rewardRedemptionRequest (required) + * @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(@javax.annotation.Nonnull RewardRedemptionRequest rewardRedemptionRequest) throws ApiException { + okhttp3.Call localVarCall = redeemRewardValidateBeforeCall(rewardRedemptionRequest, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Redeem Reward (asynchronously) + * Redeem a reward for the currently logged in user. + * @param rewardRedemptionRequest (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 single RewardRedemptionResult object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for shareInventoryItemDirect + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (required) + * @param shareInventoryItemDirectRequest (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 an OkStatus object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = shareInventoryItemDirectRequest; + + // create path and map variables + String localVarPath = "/inventory/cloning/direct"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (itemId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("itemId", itemId)); + } + + if (duration != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("duration", duration)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'duration' is set + if (duration == null) { + throw new ApiException("Missing the required parameter 'duration' when calling shareInventoryItemDirect(Async)"); + } + + // verify the required parameter 'shareInventoryItemDirectRequest' is set + if (shareInventoryItemDirectRequest == null) { + throw new ApiException("Missing the required parameter 'shareInventoryItemDirectRequest' when calling shareInventoryItemDirect(Async)"); + } + + return shareInventoryItemDirectCall(itemId, duration, shareInventoryItemDirectRequest, _callback); + + } + + /** + * Share Inventory Item Direct + * Share content directly with other users. + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (required) + * @param shareInventoryItemDirectRequest (required) + * @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(@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(); + } + + /** + * Share Inventory Item Direct + * Share content directly with other users. + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (required) + * @param shareInventoryItemDirectRequest (required) + * @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(@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); + } + + /** + * Share Inventory Item Direct (asynchronously) + * Share content directly with other users. + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (required) + * @param shareInventoryItemDirectRequest (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 an OkStatus object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for shareInventoryItemPedestal + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/inventory/cloning/pedestal"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (itemId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("itemId", itemId)); + } + + if (duration != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("duration", duration)); + } + + 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 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)"); + } + + // verify the required parameter 'duration' is set + if (duration == null) { + throw new ApiException("Missing the required parameter 'duration' when calling shareInventoryItemPedestal(Async)"); + } + + return shareInventoryItemPedestalCall(itemId, duration, _callback); + + } + + /** + * Share Inventory Item by Pedestal + * Returns an InventorySpawn object. + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (required) + * @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(@javax.annotation.Nonnull String itemId, @javax.annotation.Nonnull Integer duration) throws ApiException { + ApiResponse localVarResp = shareInventoryItemPedestalWithHttpInfo(itemId, duration); + return localVarResp.getData(); + } + + /** + * Share Inventory Item by Pedestal + * Returns an InventorySpawn object. + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (required) + * @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(@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); + } + + /** + * Share Inventory Item by Pedestal (asynchronously) + * Returns an InventorySpawn object. + * @param itemId Id for inventory item sharing. (required) + * @param duration The duration before the sharing pedestal despawns. (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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for spawnInventoryItem + * @param id Id for inventory item spawning. (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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call spawnInventoryItemCall(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/inventory/spawn"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (id != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); + } + + 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 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)"); + } + + return spawnInventoryItemCall(id, _callback); + + } + + /** + * Spawn Inventory Item + * Returns an InventorySpawn object. + * @param id Id for inventory item spawning. (required) + * @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(@javax.annotation.Nonnull String id) throws ApiException { + ApiResponse localVarResp = spawnInventoryItemWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Spawn Inventory Item + * Returns an InventorySpawn object. + * @param id Id for inventory item spawning. (required) + * @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(@javax.annotation.Nonnull String id) throws ApiException { + okhttp3.Call localVarCall = spawnInventoryItemValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Spawn Inventory Item (asynchronously) + * Returns an InventorySpawn object. + * @param id Id for inventory item spawning. (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 an InventorySpawn object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unequipOwnInventorySlot + * @param inventoryItemId Selector for inventory slot management. (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 string. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call unequipOwnInventorySlotCall(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId, 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 = "/inventory/{inventoryItemId}/equip" + .replace("{" + "inventoryItemId" + "}", localVarApiClient.escapeString(inventoryItemId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return unequipOwnInventorySlotCall(inventoryItemId, _callback); + + } + + /** + * Unequip Own Inventory Slot + * Unequips the InventoryItem in the given slot of the inventory of the currently logged in user. + * @param inventoryItemId Selector for inventory slot management. (required) + * @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(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId) throws ApiException { + ApiResponse localVarResp = unequipOwnInventorySlotWithHttpInfo(inventoryItemId); + return localVarResp.getData(); + } + + /** + * Unequip Own Inventory Slot + * Unequips the InventoryItem in the given slot of the inventory of the currently logged in user. + * @param inventoryItemId Selector for inventory slot management. (required) + * @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(@javax.annotation.Nonnull InventoryEquipSlot inventoryItemId) throws ApiException { + okhttp3.Call localVarCall = unequipOwnInventorySlotValidateBeforeCall(inventoryItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Unequip Own Inventory Slot (asynchronously) + * Unequips the InventoryItem in the given slot of the inventory of the currently logged in user. + * @param inventoryItemId Selector for inventory slot management. (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 string. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateOwnInventoryItem + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param updateInventoryItemRequest (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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateInventoryItemRequest; + + // create path and map variables + String localVarPath = "/inventory/{inventoryItemId}" + .replace("{" + "inventoryItemId" + "}", localVarApiClient.escapeString(inventoryItemId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return updateOwnInventoryItemCall(inventoryItemId, updateInventoryItemRequest, _callback); + + } + + /** + * Update Own Inventory Item + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param updateInventoryItemRequest (optional) + * @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(@javax.annotation.Nonnull String inventoryItemId, @javax.annotation.Nullable UpdateInventoryItemRequest updateInventoryItemRequest) throws ApiException { + ApiResponse localVarResp = updateOwnInventoryItemWithHttpInfo(inventoryItemId, updateInventoryItemRequest); + return localVarResp.getData(); + } + + /** + * Update Own Inventory Item + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param updateInventoryItemRequest (optional) + * @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(@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); + } + + /** + * Update Own Inventory Item (asynchronously) + * Returns the modified InventoryItem object as held by the currently logged in user. + * @param inventoryItemId Must be a valid inventory item ID. (required) + * @param updateInventoryItemRequest (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 an InventoryItem object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/io/github/vrchatapi/api/InviteApi.java b/src/main/java/io/github/vrchatapi/api/InviteApi.java index 71497f1f..99157377 100644 --- a/src/main/java/io/github/vrchatapi/api/InviteApi.java +++ b/src/main/java/io/github/vrchatapi/api/InviteApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -27,11 +27,14 @@ import io.github.vrchatapi.model.Error; +import java.io.File; import io.github.vrchatapi.model.InviteMessage; +import io.github.vrchatapi.model.InviteMessageType; import io.github.vrchatapi.model.InviteRequest; import io.github.vrchatapi.model.InviteResponse; import io.github.vrchatapi.model.Notification; import io.github.vrchatapi.model.RequestInviteRequest; +import io.github.vrchatapi.model.SentNotification; import io.github.vrchatapi.model.UpdateInviteMessageRequest; import java.lang.reflect.Type; @@ -42,6 +45,8 @@ public class InviteApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public InviteApi() { this(Configuration.getDefaultApiClient()); @@ -59,16 +64,33 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + /** * Build call for getInviteMessage - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (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 - +
+ @@ -76,14 +98,27 @@ public void setApiClient(ApiClient apiClient) {
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, String 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[] { }; + + // 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 = "/message/{userId}/{messageType}/{slot}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) - .replaceAll("\\{" + "messageType" + "\\}", localVarApiClient.escapeString(messageType.toString())) - .replaceAll("\\{" + "slot" + "\\}", localVarApiClient.escapeString(slot.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "messageType" + "}", localVarApiClient.escapeString(messageType.toString())) + .replace("{" + "slot" + "}", localVarApiClient.escapeString(slot.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -100,49 +135,48 @@ public okhttp3.Call getInviteMessageCall(String userId, String messageType, Inte } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getInviteMessageValidateBeforeCall(String userId, String 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)"); } - + // verify the required parameter 'messageType' is set if (messageType == null) { throw new ApiException("Missing the required parameter 'messageType' when calling getInviteMessage(Async)"); } - + // verify the required parameter 'slot' is set if (slot == null) { throw new ApiException("Missing the required parameter 'slot' when calling getInviteMessage(Async)"); } - - okhttp3.Call localVarCall = getInviteMessageCall(userId, messageType, slot, _callback); - return localVarCall; + return getInviteMessageCall(userId, messageType, slot, _callback); } /** * Get Invite Message * Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @return InviteMessage * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -150,7 +184,7 @@ private okhttp3.Call getInviteMessageValidateBeforeCall(String userId, String me
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, String 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(); } @@ -158,13 +192,14 @@ public InviteMessage getInviteMessage(String userId, String messageType, Integer /** * Get Invite Message * Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @return ApiResponse<InviteMessage> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -172,7 +207,7 @@ public InviteMessage getInviteMessage(String userId, String messageType, Integer
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, String 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); @@ -181,14 +216,15 @@ public ApiResponse getInviteMessageWithHttpInfo(String userId, St /** * Get Invite Message (asynchronously) * Returns a single Invite Message. This returns the exact same information but less than `getInviteMessages`. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (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 - +
+ @@ -196,7 +232,7 @@ public ApiResponse getInviteMessageWithHttpInfo(String userId, St
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, String 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(); @@ -205,26 +241,40 @@ public okhttp3.Call getInviteMessageAsync(String userId, String messageType, Int } /** * Build call for getInviteMessages - * @param userId (required) - * @param messageType (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (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 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, String 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[] { }; + + // 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 = "/message/{userId}/{messageType}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) - .replaceAll("\\{" + "messageType" + "\\}", localVarApiClient.escapeString(messageType.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "messageType" + "}", localVarApiClient.escapeString(messageType.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -241,50 +291,49 @@ public okhttp3.Call getInviteMessagesCall(String userId, String messageType, fin } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getInviteMessagesValidateBeforeCall(String userId, String 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)"); } - + // verify the required parameter 'messageType' is set if (messageType == null) { throw new ApiException("Missing the required parameter 'messageType' when calling getInviteMessages(Async)"); } - - okhttp3.Call localVarCall = getInviteMessagesCall(userId, messageType, _callback); - return localVarCall; + return getInviteMessagesCall(userId, messageType, _callback); } /** * List Invite Messages * Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) * @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, String 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(); } @@ -292,19 +341,20 @@ public List getInviteMessages(String userId, String messageType) /** * List Invite Messages * Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) * @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, String 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); @@ -313,46 +363,206 @@ public ApiResponse> getInviteMessagesWithHttpInfo(String use /** * List Invite Messages (asynchronously) * Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (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 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, String 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for inviteMyselfTo + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 single SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existent instance -
+ */ + 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[] { }; + + // 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 = "/invite/myself/to/{worldId}:{instanceId}" + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())) + .replace("{" + "instanceId" + "}", localVarApiClient.escapeString(instanceId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'instanceId' is set + if (instanceId == null) { + throw new ApiException("Missing the required parameter 'instanceId' when calling inviteMyselfTo(Async)"); + } + + return inviteMyselfToCall(worldId, instanceId, _callback); + + } + + /** + * Invite Myself To Instance + * Sends self an invite to an instance + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @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 SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existent instance -
+ */ + public SentNotification inviteMyselfTo(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String instanceId) throws ApiException { + ApiResponse localVarResp = inviteMyselfToWithHttpInfo(worldId, instanceId); + return localVarResp.getData(); + } + + /** + * Invite Myself To Instance + * Sends self an invite to an instance + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) + * @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 SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existent instance -
+ */ + 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); + } + + /** + * Invite Myself To Instance (asynchronously) + * Sends self an invite to an instance + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 single SentNotification object. -
401 Error response due to missing auth cookie. -
404 Error response due to non existent instance -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for inviteUser - * @param userId (required) - * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (optional) + * @param userId Must be a valid user ID. (required) + * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (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 single Notifcation 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = inviteRequest; // create path and map variables String localVarPath = "/invite/{userId}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -372,107 +582,286 @@ public okhttp3.Call inviteUserCall(String userId, InviteRequest inviteRequest, f "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); } - - okhttp3.Call localVarCall = inviteUserCall(userId, inviteRequest, _callback); - return localVarCall; + // verify the required parameter 'inviteRequest' is set + if (inviteRequest == null) { + throw new ApiException("Missing the required parameter 'inviteRequest' when calling inviteUser(Async)"); + } + + return inviteUserCall(userId, inviteRequest, _callback); } /** * Invite User * Sends an invite to a user. Returns the Notification of type `invite` that was sent. - * @param userId (required) - * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (optional) - * @return Notification + * @param userId Must be a valid user ID. (required) + * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (required) + * @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 Notifcation 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 Notification inviteUser(String userId, InviteRequest inviteRequest) throws ApiException { - ApiResponse localVarResp = inviteUserWithHttpInfo(userId, inviteRequest); + public SentNotification inviteUser(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull InviteRequest inviteRequest) throws ApiException { + ApiResponse localVarResp = inviteUserWithHttpInfo(userId, inviteRequest); return localVarResp.getData(); } /** * Invite User * Sends an invite to a user. Returns the Notification of type `invite` that was sent. - * @param userId (required) - * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (optional) - * @return ApiResponse<Notification> + * @param userId Must be a valid user ID. (required) + * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (required) + * @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 Notifcation 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(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Invite User (asynchronously) * Sends an invite to a user. Returns the Notification of type `invite` that was sent. - * @param userId (required) - * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (optional) + * @param userId Must be a valid user ID. (required) + * @param inviteRequest Slot number of the Invite Message to use when inviting a user. (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 single Notifcation 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(); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for inviteUserWithPhoto + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (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 single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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[] { }; + + // 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 = "/invite/{userId}/photo" + .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(); + + if (data != null) { + localVarFormParams.put("data", data); + } + + if (image != null) { + localVarFormParams.put("image", image); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'data' is set + if (data == null) { + throw new ApiException("Missing the required parameter 'data' when calling inviteUserWithPhoto(Async)"); + } + + // verify the required parameter 'image' is set + if (image == null) { + throw new ApiException("Missing the required parameter 'image' when calling inviteUserWithPhoto(Async)"); + } + + return inviteUserWithPhotoCall(userId, data, image, _callback); + + } + + /** + * Invite User with photo + * Sends an photo invite to a user. Returns the Notification of type `invite` that was sent. + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (required) + * @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 SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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(); + } + + /** + * Invite User with photo + * Sends an photo invite to a user. Returns the Notification of type `invite` that was sent. + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (required) + * @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 SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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); + } + + /** + * Invite User with photo (asynchronously) + * Sends an photo invite to a user. Returns the Notification of type `invite` that was sent. + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (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 single SentNotification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for requestInvite - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param requestInviteRequest Slot number of the Request Message to use when request an invite. (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 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = requestInviteRequest; // create path and map variables String localVarPath = "/requestInvite/{userId}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -492,41 +881,41 @@ public okhttp3.Call requestInviteCall(String userId, RequestInviteRequest reques "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); } - - okhttp3.Call localVarCall = requestInviteCall(userId, requestInviteRequest, _callback); - return localVarCall; + return requestInviteCall(userId, requestInviteRequest, _callback); } /** * Request Invite * Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param requestInviteRequest Slot number of the Request Message to use when request an invite. (optional) * @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(); } @@ -534,18 +923,19 @@ public Notification requestInvite(String userId, RequestInviteRequest requestInv /** * Request Invite * Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param requestInviteRequest Slot number of the Request Message to use when request an invite. (optional) * @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); @@ -554,51 +944,224 @@ public ApiResponse requestInviteWithHttpInfo(String userId, Reques /** * Request Invite (asynchronously) * Requests an invite from a user. Returns the Notification of type `requestInvite` that was sent. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param requestInviteRequest Slot number of the Request Message to use when request an invite. (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 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for requestInviteWithPhoto + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (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 single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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[] { }; + + // 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 = "/requestInvite/{userId}/photo" + .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(); + + if (data != null) { + localVarFormParams.put("data", data); + } + + if (image != null) { + localVarFormParams.put("image", image); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'data' is set + if (data == null) { + throw new ApiException("Missing the required parameter 'data' when calling requestInviteWithPhoto(Async)"); + } + + // verify the required parameter 'image' is set + if (image == null) { + throw new ApiException("Missing the required parameter 'image' when calling requestInviteWithPhoto(Async)"); + } + + return requestInviteWithPhotoCall(userId, data, image, _callback); + + } + + /** + * Request Invite with photo + * Requests with photo an invite from a user. Returns the Notification of type `requestInvite` that was sent. + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (required) + * @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 Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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(); + } + + /** + * Request Invite with photo + * Requests with photo an invite from a user. Returns the Notification of type `requestInvite` that was sent. + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (required) + * @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 Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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); + } + + /** + * Request Invite with photo (asynchronously) + * Requests with photo an invite from a user. Returns the Notification of type `requestInvite` that was sent. + * @param userId Must be a valid user ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (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 single Notification object. -
403 Error response when trying to invite someone whom you are not friends with. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for resetInviteMessage - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (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 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, String 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[] { }; + + // 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 = "/message/{userId}/{messageType}/{slot}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) - .replaceAll("\\{" + "messageType" + "\\}", localVarApiClient.escapeString(messageType.toString())) - .replaceAll("\\{" + "slot" + "\\}", localVarApiClient.escapeString(slot.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "messageType" + "}", localVarApiClient.escapeString(messageType.toString())) + .replace("{" + "slot" + "}", localVarApiClient.escapeString(slot.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -615,58 +1178,57 @@ public okhttp3.Call resetInviteMessageCall(String userId, String messageType, In } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call resetInviteMessageValidateBeforeCall(String userId, String 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)"); } - + // verify the required parameter 'messageType' is set if (messageType == null) { throw new ApiException("Missing the required parameter 'messageType' when calling resetInviteMessage(Async)"); } - + // verify the required parameter 'slot' is set if (slot == null) { throw new ApiException("Missing the required parameter 'slot' when calling resetInviteMessage(Async)"); } - - okhttp3.Call localVarCall = resetInviteMessageCall(userId, messageType, slot, _callback); - return localVarCall; + return resetInviteMessageCall(userId, messageType, slot, _callback); } /** * Reset Invite Message * Resets a single Invite Message back to its original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, so it is not possible to reset within the 60 minutes countdown. Resetting it does however not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite The DELETE endpoint does not have/require any request body. - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @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, String 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(); } @@ -674,22 +1236,23 @@ public List resetInviteMessage(String userId, String messageType, /** * Reset Invite Message * Resets a single Invite Message back to its original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, so it is not possible to reset within the 60 minutes countdown. Resetting it does however not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite The DELETE endpoint does not have/require any request body. - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @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, String 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); @@ -698,23 +1261,24 @@ public ApiResponse> resetInviteMessageWithHttpInfo(String us /** * Reset Invite Message (asynchronously) * Resets a single Invite Message back to its original message, and then returns a list of all of them. Admin Credentials are required to update messages of other users! Resetting a message respects the rate-limit, so it is not possible to reset within the 60 minutes countdown. Resetting it does however not set the rate-limit to 60 like when editing it. It is possible to edit it right after resetting it. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite The DELETE endpoint does not have/require any request body. - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (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 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, String 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(); @@ -723,24 +1287,38 @@ public okhttp3.Call resetInviteMessageAsync(String userId, String messageType, I } /** * Build call for respondInvite - * @param notificationId (required) - * @param inviteResponse Slot number of the Response Message to use when responding to a user. (optional) + * @param notificationId Must be a valid notification ID. (required) + * @param inviteResponse Slot number of the Response Message to use when responding to a user. (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 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = inviteResponse; // create path and map variables String localVarPath = "/invite/{notificationId}/response" - .replaceAll("\\{" + "notificationId" + "\\}", localVarApiClient.escapeString(notificationId.toString())); + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -760,60 +1338,66 @@ public okhttp3.Call respondInviteCall(String notificationId, InviteResponse invi "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); } - - okhttp3.Call localVarCall = respondInviteCall(notificationId, inviteResponse, _callback); - return localVarCall; + // verify the required parameter 'inviteResponse' is set + if (inviteResponse == null) { + throw new ApiException("Missing the required parameter 'inviteResponse' when calling respondInvite(Async)"); + } + + return respondInviteCall(notificationId, inviteResponse, _callback); } /** * Respond Invite - * Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. - * @param notificationId (required) - * @param inviteResponse Slot number of the Response Message to use when responding to a user. (optional) + * Respond to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead. + * @param notificationId Must be a valid notification ID. (required) + * @param inviteResponse Slot number of the Response Message to use when responding to a user. (required) * @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(); } /** * Respond Invite - * Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. - * @param notificationId (required) - * @param inviteResponse Slot number of the Response Message to use when responding to a user. (optional) + * Respond to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead. + * @param notificationId Must be a valid notification ID. (required) + * @param inviteResponse Slot number of the Response Message to use when responding to a user. (required) * @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); @@ -821,37 +1405,197 @@ public ApiResponse respondInviteWithHttpInfo(String notificationId /** * Respond Invite (asynchronously) - * Respond to an invite request by sending a world invite to the requesting user. `:notificationId` is the ID of the requesting notification. - * @param notificationId (required) - * @param inviteResponse Slot number of the Response Message to use when responding to a user. (optional) + * Respond to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead. + * @param notificationId Must be a valid notification ID. (required) + * @param inviteResponse Slot number of the Response Message to use when responding to a user. (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 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for respondInviteWithPhoto + * @param notificationId Must be a valid notification ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (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 single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
+ */ + 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[] { }; + + // 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 = "/invite/{notificationId}/response/photo" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (data != null) { + localVarFormParams.put("data", data); + } + + if (image != null) { + localVarFormParams.put("image", image); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'data' is set + if (data == null) { + throw new ApiException("Missing the required parameter 'data' when calling respondInviteWithPhoto(Async)"); + } + + // verify the required parameter 'image' is set + if (image == null) { + throw new ApiException("Missing the required parameter 'image' when calling respondInviteWithPhoto(Async)"); + } + + return respondInviteWithPhotoCall(notificationId, data, image, _callback); + + } + + /** + * Respond Invite with photo + * Respond with photo to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead.' + * @param notificationId Must be a valid notification ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (required) + * @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 Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
+ */ + 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(); + } + + /** + * Respond Invite with photo + * Respond with photo to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead.' + * @param notificationId Must be a valid notification ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (required) + * @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 Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
+ */ + 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); + } + + /** + * Respond Invite with photo (asynchronously) + * Respond with photo to an invite or invite request without accepting it. `:notificationId` is the ID of the requesting notification. In case the notification being replied to is an invite, the `responseSlot` refers to a response message from the the `message` collection. In case the notification is an invite request, it will refer to one from the `requestResponse` collection instead.' + * @param notificationId Must be a valid notification ID. (required) + * @param data (required) + * @param image The binary blob of the png file. (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 single Notification object. -
400 Error response when trying to respond to an invite and something went wrong. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for updateInviteMessage - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @param updateInviteMessageRequest Message of what to set the invite message to. (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 - +
+ @@ -859,14 +1603,27 @@ public okhttp3.Call respondInviteAsync(String notificationId, InviteResponse inv
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, String 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = updateInviteMessageRequest; // create path and map variables String localVarPath = "/message/{userId}/{messageType}/{slot}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) - .replaceAll("\\{" + "messageType" + "\\}", localVarApiClient.escapeString(messageType.toString())) - .replaceAll("\\{" + "slot" + "\\}", localVarApiClient.escapeString(slot.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "messageType" + "}", localVarApiClient.escapeString(messageType.toString())) + .replace("{" + "slot" + "}", localVarApiClient.escapeString(slot.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -886,47 +1643,47 @@ public okhttp3.Call updateInviteMessageCall(String userId, String messageType, I "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateInviteMessageValidateBeforeCall(String userId, String 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)"); } - + // verify the required parameter 'messageType' is set if (messageType == null) { throw new ApiException("Missing the required parameter 'messageType' when calling updateInviteMessage(Async)"); } - + // verify the required parameter 'slot' is set if (slot == null) { throw new ApiException("Missing the required parameter 'slot' when calling updateInviteMessage(Async)"); } - - okhttp3.Call localVarCall = updateInviteMessageCall(userId, messageType, slot, updateInviteMessageRequest, _callback); - return localVarCall; + return updateInviteMessageCall(userId, messageType, slot, updateInviteMessageRequest, _callback); } /** * Update Invite Message * Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @param updateInviteMessageRequest Message of what to set the invite message to. (optional) * @return List<InviteMessage> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ @@ -934,7 +1691,7 @@ private okhttp3.Call updateInviteMessageValidateBeforeCall(String userId, String
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, String 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(); } @@ -942,14 +1699,15 @@ public List updateInviteMessage(String userId, String messageType /** * Update Invite Message * Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @param updateInviteMessageRequest Message of what to set the invite message to. (optional) * @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 - +
+ @@ -957,7 +1715,7 @@ public List updateInviteMessage(String userId, String messageType
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, String 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); @@ -966,15 +1724,16 @@ public ApiResponse> updateInviteMessageWithHttpInfo(String u /** * Update Invite Message (asynchronously) * Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users! Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 \"Too Fast Error\". Message type refers to a different collection of messages, used during different types of responses. * `message` = Message during a normal invite * `response` = Message when replying to a message * `request` = Message when requesting an invite * `requestResponse` = Message when replying to a request for invite - * @param userId (required) - * @param messageType (required) - * @param slot (required) + * @param userId Must be a valid user ID. (required) + * @param messageType The type of message to fetch, must be a valid InviteMessageType. (required) + * @param slot The message slot to fetch of a given message type. (required) * @param updateInviteMessageRequest Message of what to set the invite message to. (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 - +
+ @@ -982,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, String 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 new file mode 100644 index 00000000..332fe538 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/api/JamsApi.java @@ -0,0 +1,770 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.api; + +import io.github.vrchatapi.ApiCallback; +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.ApiResponse; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ProgressRequestBody; +import io.github.vrchatapi.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.github.vrchatapi.model.CreateJamSubmissionRequest; +import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.Jam; +import io.github.vrchatapi.model.JamSubmission; +import io.github.vrchatapi.model.Success; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class JamsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public JamsApi() { + this(Configuration.getDefaultApiClient()); + } + + public JamsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for deleteJamSubmission + * @param jamId Must be a valid jam ID. (required) + * @param jamSubmissionId Must be a valid jam submission 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 an Success object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + 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[] { }; + + // 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 = "/jams/{jamId}/submissions/{jamSubmissionId}" + .replace("{" + "jamId" + "}", localVarApiClient.escapeString(jamId.toString())) + .replace("{" + "jamSubmissionId" + "}", localVarApiClient.escapeString(jamSubmissionId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'jamSubmissionId' is set + if (jamSubmissionId == null) { + throw new ApiException("Missing the required parameter 'jamSubmissionId' when calling deleteJamSubmission(Async)"); + } + + return deleteJamSubmissionCall(jamId, jamSubmissionId, _callback); + + } + + /** + * Delete Jam Submission + * Withdraws a content submission from a jam. + * @param jamId Must be a valid jam ID. (required) + * @param jamSubmissionId Must be a valid jam submission ID. (required) + * @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 Returns an Success object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + public Success deleteJamSubmission(@javax.annotation.Nonnull String jamId, @javax.annotation.Nonnull String jamSubmissionId) throws ApiException { + ApiResponse localVarResp = deleteJamSubmissionWithHttpInfo(jamId, jamSubmissionId); + return localVarResp.getData(); + } + + /** + * Delete Jam Submission + * Withdraws a content submission from a jam. + * @param jamId Must be a valid jam ID. (required) + * @param jamSubmissionId Must be a valid jam submission ID. (required) + * @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 Returns an Success object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + 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); + } + + /** + * Delete Jam Submission (asynchronously) + * Withdraws a content submission from a jam. + * @param jamId Must be a valid jam ID. (required) + * @param jamSubmissionId Must be a valid jam submission 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 an Success object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getJam + * @param jamId Must be a valid jam 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 Jam object. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + public okhttp3.Call getJamCall(@javax.annotation.Nonnull String jamId, 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 = "/jams/{jamId}" + .replace("{" + "jamId" + "}", localVarApiClient.escapeString(jamId.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 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)"); + } + + return getJamCall(jamId, _callback); + + } + + /** + * Show jam information + * Returns a jam. + * @param jamId Must be a valid jam ID. (required) + * @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(@javax.annotation.Nonnull String jamId) throws ApiException { + ApiResponse localVarResp = getJamWithHttpInfo(jamId); + return localVarResp.getData(); + } + + /** + * Show jam information + * Returns a jam. + * @param jamId Must be a valid jam ID. (required) + * @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(@javax.annotation.Nonnull String jamId) throws ApiException { + okhttp3.Call localVarCall = getJamValidateBeforeCall(jamId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Show jam information (asynchronously) + * Returns a jam. + * @param jamId Must be a valid jam 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 Jam object. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getJamSubmissions + * @param jamId Must be a valid jam ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @param submitterId Must be a valid user ID. (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 JamSubmission objects. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + 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[] { }; + + // 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 = "/jams/{jamId}/submissions" + .replace("{" + "jamId" + "}", localVarApiClient.escapeString(jamId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (contentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("contentId", contentId)); + } + + if (submitterId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("submitterId", submitterId)); + } + + 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 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)"); + } + + return getJamSubmissionsCall(jamId, contentId, submitterId, _callback); + + } + + /** + * Show jam submissions + * Returns all submissions of a jam. Can filter by contentId (for world or avatar jams) or submitterId (for a participant). + * @param jamId Must be a valid jam ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @param submitterId Must be a valid user ID. (optional) + * @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(@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(); + } + + /** + * Show jam submissions + * Returns all submissions of a jam. Can filter by contentId (for world or avatar jams) or submitterId (for a participant). + * @param jamId Must be a valid jam ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @param submitterId Must be a valid user ID. (optional) + * @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(@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); + } + + /** + * Show jam submissions (asynchronously) + * Returns all submissions of a jam. Can filter by contentId (for world or avatar jams) or submitterId (for a participant). + * @param jamId Must be a valid jam ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @param submitterId Must be a valid user ID. (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 JamSubmission objects. -
404 Error response when trying to show information about a non-existent jam. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getJams + * @param type Only show jams of this type (`avatar` or `world`). (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 Jam objects. -
+ */ + public okhttp3.Call getJamsCall(@javax.annotation.Nullable String type, 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 = "/jams"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + 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 getJamsValidateBeforeCall(@javax.annotation.Nullable String type, final ApiCallback _callback) throws ApiException { + return getJamsCall(type, _callback); + + } + + /** + * Show jams list + * Lists World Jams or Avatar Jams, both currently running and ones that have ended. `isActive` is used to select only active or already ended jams. `type` is used to select only world or avatar jams, and can only take `world` or `avatar`. `` + * @param type Only show jams of this type (`avatar` or `world`). (optional) + * @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(@javax.annotation.Nullable String type) throws ApiException { + ApiResponse> localVarResp = getJamsWithHttpInfo(type); + return localVarResp.getData(); + } + + /** + * Show jams list + * Lists World Jams or Avatar Jams, both currently running and ones that have ended. `isActive` is used to select only active or already ended jams. `type` is used to select only world or avatar jams, and can only take `world` or `avatar`. `` + * @param type Only show jams of this type (`avatar` or `world`). (optional) + * @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(@javax.annotation.Nullable String type) throws ApiException { + okhttp3.Call localVarCall = getJamsValidateBeforeCall(type, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Show jams list (asynchronously) + * Lists World Jams or Avatar Jams, both currently running and ones that have ended. `isActive` is used to select only active or already ended jams. `type` is used to select only world or avatar jams, and can only take `world` or `avatar`. `` + * @param type Only show jams of this type (`avatar` or `world`). (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 Jam objects. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for submitJamContent + * @param jamId Must be a valid jam ID. (required) + * @param createJamSubmissionRequest (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 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(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable CreateJamSubmissionRequest createJamSubmissionRequest, 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 = createJamSubmissionRequest; + + // create path and map variables + String localVarPath = "/jams/{jamId}/submissions" + .replace("{" + "jamId" + "}", localVarApiClient.escapeString(jamId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return submitJamContentCall(jamId, createJamSubmissionRequest, _callback); + + } + + /** + * Submit Jam Content + * Submits content to a jam. The content must have been uploaded by the submitter, and both the content upload and jam submission must be made within the jam's designated times. + * @param jamId Must be a valid jam ID. (required) + * @param createJamSubmissionRequest (optional) + * @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(@javax.annotation.Nonnull String jamId, @javax.annotation.Nullable CreateJamSubmissionRequest createJamSubmissionRequest) throws ApiException { + ApiResponse localVarResp = submitJamContentWithHttpInfo(jamId, createJamSubmissionRequest); + return localVarResp.getData(); + } + + /** + * Submit Jam Content + * Submits content to a jam. The content must have been uploaded by the submitter, and both the content upload and jam submission must be made within the jam's designated times. + * @param jamId Must be a valid jam ID. (required) + * @param createJamSubmissionRequest (optional) + * @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(@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); + } + + /** + * Submit Jam Content (asynchronously) + * Submits content to a jam. The content must have been uploaded by the submitter, and both the content upload and jam submission must be made within the jam's designated times. + * @param jamId Must be a valid jam ID. (required) + * @param createJamSubmissionRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/io/github/vrchatapi/api/SystemApi.java b/src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java similarity index 61% rename from src/main/java/io/github/vrchatapi/api/SystemApi.java rename to src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java index 6ac7f625..cc7f7b2b 100644 --- a/src/main/java/io/github/vrchatapi/api/SystemApi.java +++ b/src/main/java/io/github/vrchatapi/api/MiscellaneousApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -30,7 +30,8 @@ import io.github.vrchatapi.model.APIHealth; import io.github.vrchatapi.model.Error; import io.github.vrchatapi.model.InfoPush; -import org.threeten.bp.OffsetDateTime; +import java.time.OffsetDateTime; +import io.github.vrchatapi.model.Permission; import java.lang.reflect.Type; import java.util.ArrayList; @@ -38,14 +39,16 @@ import java.util.List; import java.util.Map; -public class SystemApi { +public class MiscellaneousApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; - public SystemApi() { + public MiscellaneousApi() { this(Configuration.getDefaultApiClient()); } - public SystemApi(ApiClient apiClient) { + public MiscellaneousApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } @@ -57,6 +60,143 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getAssignedPermissions + * @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 Permission objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getAssignedPermissionsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/permissions"; + + 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 getAssignedPermissionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getAssignedPermissionsCall(_callback); + + } + + /** + * Get Assigned Permissions + * Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. + * @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. -
+ */ + public List getAssignedPermissions() throws ApiException { + ApiResponse> localVarResp = getAssignedPermissionsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Assigned Permissions + * Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. + * @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. -
+ */ + public ApiResponse> getAssignedPermissionsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getAssignedPermissionsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Assigned Permissions (asynchronously) + * Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. + * @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 Permission objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getAssignedPermissionsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getAssignedPermissionsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getCSS * @param variant Specifies which `variant` of the site. Public is the end-user site, while `internal` is the staff-only site with special pages for moderation and management. (optional, default to public) @@ -65,13 +205,27 @@ public void setApiClient(ApiClient apiClient) { * @return 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 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[] { }; + + // 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 @@ -92,7 +246,8 @@ public okhttp3.Call getCSSCall(String variant, String branch, final ApiCallback } final String[] localVarAccepts = { - "text/css", "application/json" + "text/css", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -100,21 +255,19 @@ public okhttp3.Call getCSSCall(String variant, String branch, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCSSValidateBeforeCall(String variant, String branch, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getCSSCall(variant, branch, _callback); - return localVarCall; + private okhttp3.Call getCSSValidateBeforeCall(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { + return getCSSCall(variant, branch, _callback); } @@ -126,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(); } @@ -145,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); @@ -166,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(); @@ -185,12 +341,26 @@ 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. * Set-Cookie -
200 Returns the API's config. -
*/ public okhttp3.Call getConfigCall(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 @@ -211,21 +381,19 @@ public okhttp3.Call getConfigCall(final ApiCallback _callback) throws ApiExcepti } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getConfigValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getConfigCall(_callback); - return localVarCall; + return getConfigCall(_callback); } @@ -235,9 +403,10 @@ 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. * Set-Cookie -
200 Returns the API's config. -
*/ public APIConfig getConfig() throws ApiException { @@ -251,9 +420,10 @@ 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. * Set-Cookie -
200 Returns the API's config. -
*/ public ApiResponse getConfigWithHttpInfo() throws ApiException { @@ -269,9 +439,10 @@ 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. * Set-Cookie -
200 Returns the API's config. -
*/ public okhttp3.Call getConfigAsync(final ApiCallback _callback) throws ApiException { @@ -287,12 +458,26 @@ 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 -
*/ public okhttp3.Call getCurrentOnlineUsersCall(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 @@ -313,21 +498,19 @@ public okhttp3.Call getCurrentOnlineUsersCall(final ApiCallback _callback) throw } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getCurrentOnlineUsersValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getCurrentOnlineUsersCall(_callback); - return localVarCall; + return getCurrentOnlineUsersCall(_callback); } @@ -337,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 -
@@ -353,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 -
@@ -371,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 -
@@ -389,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. -
@@ -397,6 +584,19 @@ public okhttp3.Call getCurrentOnlineUsersAsync(final ApiCallback _callb */ @Deprecated public okhttp3.Call getHealthCall(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 @@ -417,22 +617,20 @@ public okhttp3.Call getHealthCall(final ApiCallback _callback) throws ApiExcepti } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call getHealthValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getHealthCall(_callback); - return localVarCall; + return getHealthCall(_callback); } @@ -442,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. -
@@ -460,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. -
@@ -480,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. -
@@ -502,12 +703,26 @@ 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[] { }; + + // 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 @@ -536,21 +751,19 @@ public okhttp3.Call getInfoPushCall(String require, String include, final ApiCal } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getInfoPushValidateBeforeCall(String require, String include, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getInfoPushCall(require, include, _callback); - return localVarCall; + private okhttp3.Call getInfoPushValidateBeforeCall(@javax.annotation.Nullable String require, @javax.annotation.Nullable String include, final ApiCallback _callback) throws ApiException { + return getInfoPushCall(require, include, _callback); } @@ -562,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(); } @@ -580,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); @@ -600,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(); @@ -620,13 +836,27 @@ 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[] { }; + + // 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 @@ -647,7 +877,8 @@ public okhttp3.Call getJavaScriptCall(String variant, String branch, final ApiCa } final String[] localVarAccepts = { - "application/javascript", "application/json" + "application/javascript", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -655,21 +886,19 @@ public okhttp3.Call getJavaScriptCall(String variant, String branch, final ApiCa } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getJavaScriptValidateBeforeCall(String variant, String branch, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getJavaScriptCall(variant, branch, _callback); - return localVarCall; + private okhttp3.Call getJavaScriptValidateBeforeCall(@javax.annotation.Nullable String variant, @javax.annotation.Nullable String branch, final ApiCallback _callback) throws ApiException { + return getJavaScriptCall(variant, branch, _callback); } @@ -681,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(); } @@ -700,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); @@ -721,31 +952,177 @@ 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getPermission + * @param permissionId Must be a valid permission 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 single Permission object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getPermissionCall(@javax.annotation.Nonnull String permissionId, 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 = "/permissions/{permissionId}" + .replace("{" + "permissionId" + "}", localVarApiClient.escapeString(permissionId.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 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)"); + } + + return getPermissionCall(permissionId, _callback); + + } + + /** + * Get Permission + * Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. + * @param permissionId Must be a valid permission ID. (required) + * @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(@javax.annotation.Nonnull String permissionId) throws ApiException { + ApiResponse localVarResp = getPermissionWithHttpInfo(permissionId); + return localVarResp.getData(); + } + + /** + * Get Permission + * Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. + * @param permissionId Must be a valid permission ID. (required) + * @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(@javax.annotation.Nonnull String permissionId) throws ApiException { + okhttp3.Call localVarCall = getPermissionValidateBeforeCall(permissionId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Permission (asynchronously) + * Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. + * @param permissionId Must be a valid permission 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 single Permission object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getSystemTime * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+
Response Details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getSystemTimeCall(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 @@ -766,21 +1143,19 @@ public okhttp3.Call getSystemTimeCall(final ApiCallback _callback) throws ApiExc } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getSystemTimeValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getSystemTimeCall(_callback); - return localVarCall; + return getSystemTimeCall(_callback); } @@ -790,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 -
@@ -806,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 -
@@ -824,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 fdbe6e9d..7d6e6235 100644 --- a/src/main/java/io/github/vrchatapi/api/NotificationsApi.java +++ b/src/main/java/io/github/vrchatapi/api/NotificationsApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -28,6 +28,8 @@ import io.github.vrchatapi.model.Error; import io.github.vrchatapi.model.Notification; +import io.github.vrchatapi.model.NotificationV2; +import io.github.vrchatapi.model.RespondNotificationV2Request; import io.github.vrchatapi.model.Success; import java.lang.reflect.Type; @@ -38,6 +40,8 @@ public class NotificationsApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public NotificationsApi() { this(Configuration.getDefaultApiClient()); @@ -55,26 +59,838 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for acceptFriendRequest + * @param notificationId Must be a valid notification 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 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(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/notifications/{notificationId}/accept" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return acceptFriendRequestCall(notificationId, _callback); + + } + + /** + * Accept Friend Request + * Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. + * @param notificationId Must be a valid notification ID. (required) + * @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(@javax.annotation.Nonnull String notificationId) throws ApiException { + ApiResponse localVarResp = acceptFriendRequestWithHttpInfo(notificationId); + return localVarResp.getData(); + } + + /** + * Accept Friend Request + * Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. + * @param notificationId Must be a valid notification ID. (required) + * @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(@javax.annotation.Nonnull String notificationId) throws ApiException { + okhttp3.Call localVarCall = acceptFriendRequestValidateBeforeCall(notificationId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Accept Friend Request (asynchronously) + * Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. + * @param notificationId Must be a valid notification 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 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(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = acceptFriendRequestValidateBeforeCall(notificationId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for acknowledgeNotificationV2 + * @param notificationId Must be a valid notification 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 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(@javax.annotation.Nonnull String notificationId, 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 = "/notifications/{notificationId}/see" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return acknowledgeNotificationV2Call(notificationId, _callback); + + } + + /** + * Acknowledge NotificationV2 + * Acknowledge a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @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 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(@javax.annotation.Nonnull String notificationId) throws ApiException { + ApiResponse localVarResp = acknowledgeNotificationV2WithHttpInfo(notificationId); + return localVarResp.getData(); + } + + /** + * Acknowledge NotificationV2 + * Acknowledge a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @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 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(@javax.annotation.Nonnull String notificationId) throws ApiException { + okhttp3.Call localVarCall = acknowledgeNotificationV2ValidateBeforeCall(notificationId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Acknowledge NotificationV2 (asynchronously) + * Acknowledge a specific notification + * @param notificationId Must be a valid notification 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 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(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = acknowledgeNotificationV2ValidateBeforeCall(notificationId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for clearNotifications + * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call clearNotificationsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/notifications/clear"; + + 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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call clearNotificationsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return clearNotificationsCall(_callback); + + } + + /** + * Clear All Notifications + * Clear **all** notifications. + * @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. -
+ */ + public Success clearNotifications() throws ApiException { + ApiResponse localVarResp = clearNotificationsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Clear All Notifications + * Clear **all** notifications. + * @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. -
+ */ + public ApiResponse clearNotificationsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = clearNotificationsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Clear All Notifications (asynchronously) + * Clear **all** notifications. + * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call clearNotificationsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = clearNotificationsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAllNotificationV2s + * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteAllNotificationV2sCall(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 = "/notifications"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAllNotificationV2sValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return deleteAllNotificationV2sCall(_callback); + + } + + /** + * Delete All NotificationV2s + * Delete all of the current user's notifications. + * @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. -
+ */ + public Success deleteAllNotificationV2s() throws ApiException { + ApiResponse localVarResp = deleteAllNotificationV2sWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Delete All NotificationV2s + * Delete all of the current user's notifications. + * @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. -
+ */ + public ApiResponse deleteAllNotificationV2sWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = deleteAllNotificationV2sValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete All NotificationV2s (asynchronously) + * Delete all of the current user's notifications. + * @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 Successful response after clearing all notifications. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteAllNotificationV2sAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAllNotificationV2sValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteNotification + * @param notificationId Must be a valid notification 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 single Notification object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteNotificationCall(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/user/notifications/{notificationId}/hide" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deleteNotificationCall(notificationId, _callback); + + } + + /** + * Delete Notification + * Delete a notification. + * @param notificationId Must be a valid notification ID. (required) + * @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 Notification object. -
401 Error response due to missing auth cookie. -
+ */ + public Notification deleteNotification(@javax.annotation.Nonnull String notificationId) throws ApiException { + ApiResponse localVarResp = deleteNotificationWithHttpInfo(notificationId); + return localVarResp.getData(); + } + + /** + * Delete Notification + * Delete a notification. + * @param notificationId Must be a valid notification ID. (required) + * @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 Notification object. -
401 Error response due to missing auth cookie. -
+ */ + 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); + } + + /** + * Delete Notification (asynchronously) + * Delete a notification. + * @param notificationId Must be a valid notification 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 single Notification object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteNotificationV2 + * @param notificationId Must be a valid notification 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 Successful response after clearing a notification. -
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 deleteNotificationV2Call(@javax.annotation.Nonnull String notificationId, 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 = "/notifications/{notificationId}" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deleteNotificationV2Call(notificationId, _callback); + + } + + /** + * Delete NotificationV2 + * Delete a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @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 a notification. -
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 Success deleteNotificationV2(@javax.annotation.Nonnull String notificationId) throws ApiException { + ApiResponse localVarResp = deleteNotificationV2WithHttpInfo(notificationId); + return localVarResp.getData(); + } + + /** + * Delete NotificationV2 + * Delete a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @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 a notification. -
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 deleteNotificationV2WithHttpInfo(@javax.annotation.Nonnull String notificationId) throws ApiException { + okhttp3.Call localVarCall = deleteNotificationV2ValidateBeforeCall(notificationId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete NotificationV2 (asynchronously) + * Delete a specific notification + * @param notificationId Must be a valid notification 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 Successful response after clearing a notification. -
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 deleteNotificationV2Async(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteNotificationV2ValidateBeforeCall(notificationId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** - * Build call for acceptFriendRequest - * @param notificationId (required) + * Build call for getNotification + * @param notificationId Must be a valid notification 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 Successful response after friending a user. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
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 acceptFriendRequestCall(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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/auth/user/notifications/{notificationId}/accept" - .replaceAll("\\{" + "notificationId" + "\\}", localVarApiClient.escapeString(notificationId.toString())); + String localVarPath = "/auth/user/notifications/{notificationId}" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -91,107 +907,128 @@ public okhttp3.Call acceptFriendRequestCall(String notificationId, final ApiCall } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call acceptFriendRequestValidateBeforeCall(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 acceptFriendRequest(Async)"); + throw new ApiException("Missing the required parameter 'notificationId' when calling getNotification(Async)"); } - - okhttp3.Call localVarCall = acceptFriendRequestCall(notificationId, _callback); - return localVarCall; + return getNotificationCall(notificationId, _callback); } /** - * Accept Friend Request - * Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. - * @param notificationId (required) - * @return Success + * Show notification + * Get a notification by notification `not_` ID. + * @param notificationId Must be a valid notification ID. (required) + * @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 Successful response after friending a user. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
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 Success acceptFriendRequest(String notificationId) throws ApiException { - ApiResponse localVarResp = acceptFriendRequestWithHttpInfo(notificationId); + public Notification getNotification(@javax.annotation.Nonnull String notificationId) throws ApiException { + ApiResponse localVarResp = getNotificationWithHttpInfo(notificationId); return localVarResp.getData(); } /** - * Accept Friend Request - * Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. - * @param notificationId (required) - * @return ApiResponse<Success> + * Show notification + * Get a notification by notification `not_` ID. + * @param notificationId Must be a valid notification ID. (required) + * @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 Successful response after friending a user. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
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 acceptFriendRequestWithHttpInfo(String notificationId) throws ApiException { - okhttp3.Call localVarCall = acceptFriendRequestValidateBeforeCall(notificationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Accept Friend Request (asynchronously) - * Accept a friend request by notification `frq_` ID. Friend requests can be found using the NotificationsAPI `getNotifications` by filtering of type `friendRequest`. - * @param notificationId (required) + * Show notification (asynchronously) + * Get a notification by notification `not_` ID. + * @param notificationId Must be a valid notification 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 Successful response after friending a user. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to accept a non-existent friend request. -
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 acceptFriendRequestAsync(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationAsync(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = acceptFriendRequestValidateBeforeCall(notificationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getNotificationValidateBeforeCall(notificationId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for clearNotifications + * Build call for getNotificationV2 + * @param notificationId Must be a valid notification 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 Successful response after clearing all notifications. -
401 Error response due to missing apiKey or auth cookie. -
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. -
+ * @deprecated */ - public okhttp3.Call clearNotificationsCall(final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getNotificationV2Call(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/auth/user/notifications/clear"; + String localVarPath = "/notifications/{notificationId}" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -208,98 +1045,133 @@ public okhttp3.Call clearNotificationsCall(final ApiCallback _callback) throws A } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call clearNotificationsValidateBeforeCall(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)"); + } - okhttp3.Call localVarCall = clearNotificationsCall(_callback); - return localVarCall; + return getNotificationV2Call(notificationId, _callback); } /** - * Clear All Notifications - * Clear **all** notifications. - * @return Success + * Get NotificationV2 + * Get a specific notification. Appears to require admin credentials by default. Expect a 403 Forbidden error response for normal users. + * @param notificationId Must be a valid notification ID. (required) + * @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 Successful response after clearing all notifications. -
401 Error response due to missing apiKey or auth cookie. -
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. -
+ * @deprecated */ - public Success clearNotifications() throws ApiException { - ApiResponse localVarResp = clearNotificationsWithHttpInfo(); + @Deprecated + public NotificationV2 getNotificationV2(@javax.annotation.Nonnull String notificationId) throws ApiException { + ApiResponse localVarResp = getNotificationV2WithHttpInfo(notificationId); return localVarResp.getData(); } /** - * Clear All Notifications - * Clear **all** notifications. - * @return ApiResponse<Success> + * Get NotificationV2 + * Get a specific notification. Appears to require admin credentials by default. Expect a 403 Forbidden error response for normal users. + * @param notificationId Must be a valid notification ID. (required) + * @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 Successful response after clearing all notifications. -
401 Error response due to missing apiKey or auth cookie. -
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. -
+ * @deprecated */ - public ApiResponse clearNotificationsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = clearNotificationsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); + @Deprecated + 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); } /** - * Clear All Notifications (asynchronously) - * Clear **all** notifications. + * Get NotificationV2 (asynchronously) + * Get a specific notification. Appears to require admin credentials by default. Expect a 403 Forbidden error response for normal users. + * @param notificationId Must be a valid notification 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 Successful response after clearing all notifications. -
401 Error response due to missing apiKey or auth cookie. -
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. -
+ * @deprecated */ - public okhttp3.Call clearNotificationsAsync(final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getNotificationV2Async(@javax.annotation.Nonnull String notificationId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = clearNotificationsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getNotificationV2ValidateBeforeCall(notificationId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteNotification - * @param notificationId (required) + * Build call for getNotificationV2s + * @param limit The maximum number of entries to get. (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 single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteNotificationCall(String notificationId, 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/auth/user/notifications/{notificationId}/hide" - .replaceAll("\\{" + "notificationId" + "\\}", localVarApiClient.escapeString(notificationId.toString())); + String localVarPath = "/notifications"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -307,6 +1179,10 @@ public okhttp3.Call deleteNotificationCall(String notificationId, final ApiCallb Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + final String[] localVarAccepts = { "application/json" }; @@ -316,90 +1192,86 @@ public okhttp3.Call deleteNotificationCall(String notificationId, final ApiCallb } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNotificationValidateBeforeCall(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)"); - } - - - okhttp3.Call localVarCall = deleteNotificationCall(notificationId, _callback); - return localVarCall; + private okhttp3.Call getNotificationV2sValidateBeforeCall(@javax.annotation.Nullable Integer limit, final ApiCallback _callback) throws ApiException { + return getNotificationV2sCall(limit, _callback); } /** - * Delete Notification - * Delete a notification. - * @param notificationId (required) - * @return Notification + * List NotificationV2s + * Retrieve all of the current user's notifications. + * @param limit The maximum number of entries to get. (optional) + * @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 single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public Notification deleteNotification(String notificationId) throws ApiException { - ApiResponse localVarResp = deleteNotificationWithHttpInfo(notificationId); + public List getNotificationV2s(@javax.annotation.Nullable Integer limit) throws ApiException { + ApiResponse> localVarResp = getNotificationV2sWithHttpInfo(limit); return localVarResp.getData(); } /** - * Delete Notification - * Delete a notification. - * @param notificationId (required) - * @return ApiResponse<Notification> + * List NotificationV2s + * Retrieve all of the current user's notifications. + * @param limit The maximum number of entries to get. (optional) + * @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 single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse deleteNotificationWithHttpInfo(String notificationId) throws ApiException { - okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(notificationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Delete Notification (asynchronously) - * Delete a notification. - * @param notificationId (required) + * List NotificationV2s (asynchronously) + * Retrieve all of the current user's notifications. + * @param limit The maximum number of entries to get. (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 single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a list of NotificationV2 objects. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call deleteNotificationAsync(String notificationId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getNotificationV2sAsync(@javax.annotation.Nullable Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(notificationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getNotificationV2sValidateBeforeCall(limit, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getNotifications - * @param type Only send notifications of this type (can use `all` for all). (optional) + * @param type Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated. (optional) * @param sent Return notifications sent by the user. Must be false or omitted. (optional) * @param hidden Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. (optional) * @param after Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) @@ -409,13 +1281,27 @@ 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 - +
+ - - + +
Response Details
Status Code Description Response Headers
200 Returns a list of Notifcation objects. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 @@ -460,28 +1346,26 @@ public okhttp3.Call getNotificationsCall(String type, Boolean sent, Boolean hidd } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getNotificationsValidateBeforeCall(String type, Boolean sent, Boolean hidden, String after, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getNotificationsCall(type, sent, hidden, after, n, offset, _callback); - return localVarCall; + 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); } /** * List Notifications * Retrieve all of the current user's notifications. - * @param type Only send notifications of this type (can use `all` for all). (optional) + * @param type Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated. (optional) * @param sent Return notifications sent by the user. Must be false or omitted. (optional) * @param hidden Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. (optional) * @param after Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) @@ -490,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. -
401 Error response due to missing apiKey or auth cookie. -
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(); } @@ -504,7 +1389,7 @@ public List getNotifications(String type, Boolean sent, Boolean hi /** * List Notifications * Retrieve all of the current user's notifications. - * @param type Only send notifications of this type (can use `all` for all). (optional) + * @param type Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated. (optional) * @param sent Return notifications sent by the user. Must be false or omitted. (optional) * @param hidden Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. (optional) * @param after Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) @@ -513,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. -
401 Error response due to missing apiKey or auth cookie. -
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); @@ -528,7 +1414,7 @@ public ApiResponse> getNotificationsWithHttpInfo(String type, /** * List Notifications (asynchronously) * Retrieve all of the current user's notifications. - * @param type Only send notifications of this type (can use `all` for all). (optional) + * @param type Only send notifications of this type (can use `all` for all). This parameter no longer does anything, and is deprecated. (optional) * @param sent Return notifications sent by the user. Must be false or omitted. (optional) * @param hidden Whether to return hidden or non-hidden notifications. True only allowed on type `friendRequest`. (optional) * @param after Only return notifications sent after this Date. Ignored if type is `friendRequest`. (optional) @@ -538,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. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -553,23 +1440,37 @@ public okhttp3.Call getNotificationsAsync(String type, Boolean sent, Boolean hid } /** * Build call for markNotificationAsRead - * @param notificationId (required) + * @param notificationId Must be a valid notification 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 single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = null; // create path and map variables String localVarPath = "/auth/user/notifications/{notificationId}/see" - .replaceAll("\\{" + "notificationId" + "\\}", localVarApiClient.escapeString(notificationId.toString())); + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -586,43 +1487,42 @@ public okhttp3.Call markNotificationAsReadCall(String notificationId, final ApiC } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = markNotificationAsReadCall(notificationId, _callback); - return localVarCall; + return markNotificationAsReadCall(notificationId, _callback); } /** * Mark Notification As Read * Mark a notification as seen. - * @param notificationId (required) + * @param notificationId Must be a valid notification ID. (required) * @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. -
401 Error response due to missing apiKey or auth cookie. -
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(); } @@ -630,17 +1530,18 @@ public Notification markNotificationAsRead(String notificationId) throws ApiExce /** * Mark Notification As Read * Mark a notification as seen. - * @param notificationId (required) + * @param notificationId Must be a valid notification ID. (required) * @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. -
401 Error response due to missing apiKey or auth cookie. -
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); @@ -649,22 +1550,321 @@ public ApiResponse markNotificationAsReadWithHttpInfo(String notif /** * Mark Notification As Read (asynchronously) * Mark a notification as seen. - * @param notificationId (required) + * @param notificationId Must be a valid notification 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 single Notifcation object. -
401 Error response due to missing apiKey or auth cookie. -
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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for replyNotificationV2 + * @param notificationId Must be a valid notification ID. (required) + * @param body (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 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(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull Object body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/notifications/{notificationId}/reply" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling replyNotificationV2(Async)"); + } + + return replyNotificationV2Call(notificationId, body, _callback); + + } + + /** + * Reply NotificationV2 + * Reply to a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @param body (required) + * @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 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(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull Object body) throws ApiException { + ApiResponse localVarResp = replyNotificationV2WithHttpInfo(notificationId, body); + return localVarResp.getData(); + } + + /** + * Reply NotificationV2 + * Reply to a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @param body (required) + * @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 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(@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); + } + + /** + * Reply NotificationV2 (asynchronously) + * Reply to a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @param body (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for respondNotificationV2 + * @param notificationId Must be a valid notification ID. (required) + * @param respondNotificationV2Request (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 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(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull RespondNotificationV2Request respondNotificationV2Request, 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 = respondNotificationV2Request; + + // create path and map variables + String localVarPath = "/notifications/{notificationId}/respond" + .replace("{" + "notificationId" + "}", localVarApiClient.escapeString(notificationId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'respondNotificationV2Request' is set + if (respondNotificationV2Request == null) { + throw new ApiException("Missing the required parameter 'respondNotificationV2Request' when calling respondNotificationV2(Async)"); + } + + return respondNotificationV2Call(notificationId, respondNotificationV2Request, _callback); + + } + + /** + * Respond NotificationV2 + * Respond to a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @param respondNotificationV2Request (required) + * @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 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(@javax.annotation.Nonnull String notificationId, @javax.annotation.Nonnull RespondNotificationV2Request respondNotificationV2Request) throws ApiException { + ApiResponse localVarResp = respondNotificationV2WithHttpInfo(notificationId, respondNotificationV2Request); + return localVarResp.getData(); + } + + /** + * Respond NotificationV2 + * Respond to a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @param respondNotificationV2Request (required) + * @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 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(@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); + } + + /** + * Respond NotificationV2 (asynchronously) + * Respond to a specific notification + * @param notificationId Must be a valid notification ID. (required) + * @param respondNotificationV2Request (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/src/main/java/io/github/vrchatapi/api/PermissionsApi.java b/src/main/java/io/github/vrchatapi/api/PermissionsApi.java deleted file mode 100644 index f8fb851f..00000000 --- a/src/main/java/io/github/vrchatapi/api/PermissionsApi.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * VRChat API Documentation - * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org - * - * 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.api; - -import io.github.vrchatapi.ApiCallback; -import io.github.vrchatapi.ApiClient; -import io.github.vrchatapi.ApiException; -import io.github.vrchatapi.ApiResponse; -import io.github.vrchatapi.Configuration; -import io.github.vrchatapi.Pair; -import io.github.vrchatapi.ProgressRequestBody; -import io.github.vrchatapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import io.github.vrchatapi.model.Error; -import io.github.vrchatapi.model.Permission; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PermissionsApi { - private ApiClient localVarApiClient; - - public PermissionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public PermissionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - /** - * Build call for getAssignedPermissions - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Returns a list of Permission objects. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public okhttp3.Call getAssignedPermissionsCall(final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/auth/permissions"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAssignedPermissionsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getAssignedPermissionsCall(_callback); - return localVarCall; - - } - - /** - * Get Assigned Permissions - * Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. - * @return List<Permission> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Returns a list of Permission objects. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public List getAssignedPermissions() throws ApiException { - ApiResponse> localVarResp = getAssignedPermissionsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get Assigned Permissions - * Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. - * @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 - - - - -
Status Code Description Response Headers
200 Returns a list of Permission objects. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public ApiResponse> getAssignedPermissionsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getAssignedPermissionsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Assigned Permissions (asynchronously) - * Returns a list of all permissions currently granted by the user. Permissions are assigned e.g. by subscribing to VRC+. - * @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 - - - - -
Status Code Description Response Headers
200 Returns a list of Permission objects. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public okhttp3.Call getAssignedPermissionsAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getAssignedPermissionsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getPermission - * @param permissionId (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 - - - - -
Status Code Description Response Headers
200 Returns a single Permission object. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public okhttp3.Call getPermissionCall(String permissionId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/permissions/{permissionId}" - .replaceAll("\\{" + "permissionId" + "\\}", localVarApiClient.escapeString(permissionId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPermissionValidateBeforeCall(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)"); - } - - - okhttp3.Call localVarCall = getPermissionCall(permissionId, _callback); - return localVarCall; - - } - - /** - * Get Permission - * Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. - * @param permissionId (required) - * @return Permission - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Returns a single Permission object. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public Permission getPermission(String permissionId) throws ApiException { - ApiResponse localVarResp = getPermissionWithHttpInfo(permissionId); - return localVarResp.getData(); - } - - /** - * Get Permission - * Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. - * @param permissionId (required) - * @return ApiResponse<Permission> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Returns a single Permission object. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public ApiResponse getPermissionWithHttpInfo(String permissionId) throws ApiException { - okhttp3.Call localVarCall = getPermissionValidateBeforeCall(permissionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Permission (asynchronously) - * Returns a single permission. This endpoint is pretty useless, as it returns the exact same information as `/auth/permissions`. - * @param permissionId (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 - - - - -
Status Code Description Response Headers
200 Returns a single Permission object. -
401 Error response due to missing apiKey or auth cookie. -
- */ - public okhttp3.Call getPermissionAsync(String permissionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPermissionValidateBeforeCall(permissionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java b/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java index b7e42fac..76abc780 100644 --- a/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java +++ b/src/main/java/io/github/vrchatapi/api/PlayermoderationApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -29,6 +29,7 @@ import io.github.vrchatapi.model.Error; import io.github.vrchatapi.model.ModerateUserRequest; import io.github.vrchatapi.model.PlayerModeration; +import io.github.vrchatapi.model.PlayerModerationType; import io.github.vrchatapi.model.Success; import java.lang.reflect.Type; @@ -39,6 +40,8 @@ public class PlayermoderationApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public PlayermoderationApi() { this(Configuration.getDefaultApiClient()); @@ -56,19 +59,49 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + /** * Build call for clearAllPlayerModerations * @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 Success response after e.g. clearing all player moderations. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ public okhttp3.Call clearAllPlayerModerationsCall(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 @@ -89,21 +122,19 @@ public okhttp3.Call clearAllPlayerModerationsCall(final ApiCallback _callback) t } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call clearAllPlayerModerationsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = clearAllPlayerModerationsCall(_callback); - return localVarCall; + return clearAllPlayerModerationsCall(_callback); } @@ -113,10 +144,11 @@ 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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ public Success clearAllPlayerModerations() throws ApiException { @@ -130,10 +162,11 @@ 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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ public ApiResponse clearAllPlayerModerationsWithHttpInfo() throws ApiException { @@ -149,10 +182,11 @@ 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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ public okhttp3.Call clearAllPlayerModerationsAsync(final ApiCallback _callback) throws ApiException { @@ -162,261 +196,35 @@ public okhttp3.Call clearAllPlayerModerationsAsync(final ApiCallback _c localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for deletePlayerModeration - * @param playerModerationId (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 - - - - - -
Status Code Description Response Headers
200 Success response after removing a PlayerModeration by ID. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to delete someone else's player moderation. -
- */ - public okhttp3.Call deletePlayerModerationCall(String playerModerationId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/auth/user/playermoderations/{playerModerationId}" - .replaceAll("\\{" + "playerModerationId" + "\\}", localVarApiClient.escapeString(playerModerationId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePlayerModerationValidateBeforeCall(String playerModerationId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'playerModerationId' is set - if (playerModerationId == null) { - throw new ApiException("Missing the required parameter 'playerModerationId' when calling deletePlayerModeration(Async)"); - } - - - okhttp3.Call localVarCall = deletePlayerModerationCall(playerModerationId, _callback); - return localVarCall; - - } - - /** - * Delete Player Moderation - * Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully. - * @param playerModerationId (required) - * @return Success - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Success response after removing a PlayerModeration by ID. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to delete someone else's player moderation. -
- */ - public Success deletePlayerModeration(String playerModerationId) throws ApiException { - ApiResponse localVarResp = deletePlayerModerationWithHttpInfo(playerModerationId); - return localVarResp.getData(); - } - - /** - * Delete Player Moderation - * Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully. - * @param playerModerationId (required) - * @return ApiResponse<Success> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Success response after removing a PlayerModeration by ID. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to delete someone else's player moderation. -
- */ - public ApiResponse deletePlayerModerationWithHttpInfo(String playerModerationId) throws ApiException { - okhttp3.Call localVarCall = deletePlayerModerationValidateBeforeCall(playerModerationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Delete Player Moderation (asynchronously) - * Deletes a specific player moderation based on it's `pmod_` ID. The website uses `unmoderateUser` instead. You can delete the same player moderation multiple times successfully. - * @param playerModerationId (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 - - - - - -
Status Code Description Response Headers
200 Success response after removing a PlayerModeration by ID. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to delete someone else's player moderation. -
- */ - public okhttp3.Call deletePlayerModerationAsync(String playerModerationId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deletePlayerModerationValidateBeforeCall(playerModerationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getPlayerModeration - * @param playerModerationId (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 - - - - - -
Status Code Description Response Headers
200 Returns a single PlayerModeration object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent player moderation. -
- */ - public okhttp3.Call getPlayerModerationCall(String playerModerationId, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/auth/user/playermoderations/{playerModerationId}" - .replaceAll("\\{" + "playerModerationId" + "\\}", localVarApiClient.escapeString(playerModerationId.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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPlayerModerationValidateBeforeCall(String playerModerationId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'playerModerationId' is set - if (playerModerationId == null) { - throw new ApiException("Missing the required parameter 'playerModerationId' when calling getPlayerModeration(Async)"); - } - - - okhttp3.Call localVarCall = getPlayerModerationCall(playerModerationId, _callback); - return localVarCall; - - } - - /** - * Get Player Moderation - * Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. - * @param playerModerationId (required) - * @return PlayerModeration - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Returns a single PlayerModeration object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent player moderation. -
- */ - public PlayerModeration getPlayerModeration(String playerModerationId) throws ApiException { - ApiResponse localVarResp = getPlayerModerationWithHttpInfo(playerModerationId); - return localVarResp.getData(); - } - - /** - * Get Player Moderation - * Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. - * @param playerModerationId (required) - * @return ApiResponse<PlayerModeration> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Returns a single PlayerModeration object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent player moderation. -
- */ - public ApiResponse getPlayerModerationWithHttpInfo(String playerModerationId) throws ApiException { - okhttp3.Call localVarCall = getPlayerModerationValidateBeforeCall(playerModerationId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Player Moderation (asynchronously) - * Returns a single Player Moderation. This returns the exact same amount of information as the more generalised `getPlayerModerations`. - * @param playerModerationId (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 - - - - - -
Status Code Description Response Headers
200 Returns a single PlayerModeration object. -
401 Error response due to missing apiKey or auth cookie. -
404 Error response when trying to show information about a non-existent player moderation. -
- */ - public okhttp3.Call getPlayerModerationAsync(String playerModerationId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPlayerModerationValidateBeforeCall(playerModerationId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getPlayerModerations - * @param type Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) + * @param type Must be one of PlayerModerationType. (optional, default to unmute) * @param targetUserId Must be valid 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 PlayerModeration objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPlayerModerationsCall(String 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[] { }; + + // 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 @@ -445,39 +253,38 @@ public okhttp3.Call getPlayerModerationsCall(String type, String targetUserId, f } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getPlayerModerationsValidateBeforeCall(String type, String targetUserId, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getPlayerModerationsCall(type, targetUserId, _callback); - return localVarCall; + private okhttp3.Call getPlayerModerationsValidateBeforeCall(@javax.annotation.Nullable PlayerModerationType type, @javax.annotation.Nullable String targetUserId, final ApiCallback _callback) throws ApiException { + return getPlayerModerationsCall(type, targetUserId, _callback); } /** * Search Player Moderations * Returns a list of all player moderations made by **you**. This endpoint does not have pagination, and will return *all* results. Use query parameters to limit your query if needed. - * @param type Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) + * @param type Must be one of PlayerModerationType. (optional, default to unmute) * @param targetUserId Must be valid UserID. (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public List getPlayerModerations(String 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(); } @@ -485,18 +292,19 @@ public List getPlayerModerations(String type, String targetUse /** * Search Player Moderations * Returns a list of all player moderations made by **you**. This endpoint does not have pagination, and will return *all* results. Use query parameters to limit your query if needed. - * @param type Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) + * @param type Must be one of PlayerModerationType. (optional, default to unmute) * @param targetUserId Must be valid UserID. (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getPlayerModerationsWithHttpInfo(String 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); @@ -505,19 +313,20 @@ public ApiResponse> getPlayerModerationsWithHttpInfo(Stri /** * Search Player Moderations (asynchronously) * Returns a list of all player moderations made by **you**. This endpoint does not have pagination, and will return *all* results. Use query parameters to limit your query if needed. - * @param type Must be one of PlayerModerationType, except unblock. Unblocking simply removes a block. (optional) + * @param type Must be one of PlayerModerationType. (optional, default to unmute) * @param targetUserId Must be valid 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 PlayerModeration objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getPlayerModerationsAsync(String 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(); @@ -526,18 +335,32 @@ public okhttp3.Call getPlayerModerationsAsync(String type, String targetUserId, } /** * Build call for moderateUser - * @param moderateUserRequest (optional) + * @param moderateUserRequest (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 single PlayerModeration object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = moderateUserRequest; // create path and map variables @@ -561,53 +384,59 @@ public okhttp3.Call moderateUserCall(ModerateUserRequest moderateUserRequest, fi "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); + } - okhttp3.Call localVarCall = moderateUserCall(moderateUserRequest, _callback); - return localVarCall; + return moderateUserCall(moderateUserRequest, _callback); } /** * Moderate User - * Moderate a user, e.g. unmute them or show their avatar. - * @param moderateUserRequest (optional) + * Moderate a user, e.g. unmute them or show their avatar. Please see the [Player Moderation docs](https://vrchatapi.github.io/docs/api/#tag--playermoderation) on what playerModerations are, and how they differ from staff moderations. + * @param moderateUserRequest (required) * @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 apiKey or auth cookie. -
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(); } /** * Moderate User - * Moderate a user, e.g. unmute them or show their avatar. - * @param moderateUserRequest (optional) + * Moderate a user, e.g. unmute them or show their avatar. Please see the [Player Moderation docs](https://vrchatapi.github.io/docs/api/#tag--playermoderation) on what playerModerations are, and how they differ from staff moderations. + * @param moderateUserRequest (required) * @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 apiKey or auth cookie. -
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); @@ -615,19 +444,20 @@ public ApiResponse moderateUserWithHttpInfo(ModerateUserReques /** * Moderate User (asynchronously) - * Moderate a user, e.g. unmute them or show their avatar. - * @param moderateUserRequest (optional) + * Moderate a user, e.g. unmute them or show their avatar. Please see the [Player Moderation docs](https://vrchatapi.github.io/docs/api/#tag--playermoderation) on what playerModerations are, and how they differ from staff moderations. + * @param moderateUserRequest (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 single PlayerModeration object. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -636,18 +466,32 @@ public okhttp3.Call moderateUserAsync(ModerateUserRequest moderateUserRequest, f } /** * Build call for unmoderateUser - * @param moderateUserRequest (optional) + * @param moderateUserRequest (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 Success response after unmoderating a player moderation. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = moderateUserRequest; // create path and map variables @@ -671,35 +515,40 @@ public okhttp3.Call unmoderateUserCall(ModerateUserRequest moderateUserRequest, "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); + } - okhttp3.Call localVarCall = unmoderateUserCall(moderateUserRequest, _callback); - return localVarCall; + return unmoderateUserCall(moderateUserRequest, _callback); } /** * Unmoderate User * Removes a player moderation previously added through `moderateUser`. E.g if you previously have shown their avatar, but now want to reset it to default. - * @param moderateUserRequest (optional) + * @param moderateUserRequest (required) * @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 apiKey or auth cookie. -
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(); } @@ -707,17 +556,18 @@ public Success unmoderateUser(ModerateUserRequest moderateUserRequest) throws Ap /** * Unmoderate User * Removes a player moderation previously added through `moderateUser`. E.g if you previously have shown their avatar, but now want to reset it to default. - * @param moderateUserRequest (optional) + * @param moderateUserRequest (required) * @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 apiKey or auth cookie. -
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); @@ -726,18 +576,19 @@ public ApiResponse unmoderateUserWithHttpInfo(ModerateUserRequest moder /** * Unmoderate User (asynchronously) * Removes a player moderation previously added through `moderateUser`. E.g if you previously have shown their avatar, but now want to reset it to default. - * @param moderateUserRequest (optional) + * @param moderateUserRequest (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 Success response after unmoderating a player moderation. -
401 Error response due to missing apiKey or auth cookie. -
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 new file mode 100644 index 00000000..e5c39305 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/api/PrintsApi.java @@ -0,0 +1,795 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.api; + +import io.github.vrchatapi.ApiCallback; +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.ApiResponse; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ProgressRequestBody; +import io.github.vrchatapi.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.github.vrchatapi.model.Error; +import java.io.File; +import java.time.OffsetDateTime; +import io.github.vrchatapi.model.Print; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PrintsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public PrintsApi() { + this(Configuration.getDefaultApiClient()); + } + + public PrintsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for deletePrint + * @param printId Print 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 Empty response if successful -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deletePrintCall(@javax.annotation.Nonnull String printId, 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 = "/prints/{printId}" + .replace("{" + "printId" + "}", localVarApiClient.escapeString(printId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deletePrintCall(printId, _callback); + + } + + /** + * Delete Print + * Returns a print. + * @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(@javax.annotation.Nonnull String printId) throws ApiException { + deletePrintWithHttpInfo(printId); + } + + /** + * Delete Print + * Returns a print. + * @param printId Print ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Empty response if successful -
401 Error response due to missing auth cookie. -
+ */ + public ApiResponse deletePrintWithHttpInfo(@javax.annotation.Nonnull String printId) throws ApiException { + okhttp3.Call localVarCall = deletePrintValidateBeforeCall(printId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete Print (asynchronously) + * Returns a print. + * @param printId Print 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 Empty response if successful -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deletePrintAsync(@javax.annotation.Nonnull String printId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deletePrintValidateBeforeCall(printId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for editPrint + * @param printId Print ID. (required) + * @param image The binary blob of the png file. (required) + * @param note The caption for the image. (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 single Print object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/prints/{printId}" + .replace("{" + "printId" + "}", localVarApiClient.escapeString(printId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (image != null) { + localVarFormParams.put("image", image); + } + + if (note != null) { + localVarFormParams.put("note", note); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'image' is set + if (image == null) { + throw new ApiException("Missing the required parameter 'image' when calling editPrint(Async)"); + } + + return editPrintCall(printId, image, note, _callback); + + } + + /** + * Edit Print + * Edits a print. + * @param printId Print ID. (required) + * @param image The binary blob of the png file. (required) + * @param note The caption for the image. (optional) + * @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(@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(); + } + + /** + * Edit Print + * Edits a print. + * @param printId Print ID. (required) + * @param image The binary blob of the png file. (required) + * @param note The caption for the image. (optional) + * @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(@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); + } + + /** + * Edit Print (asynchronously) + * Edits a print. + * @param printId Print ID. (required) + * @param image The binary blob of the png file. (required) + * @param note The caption for the image. (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 single Print object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getPrint + * @param printId Print 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 single Print object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getPrintCall(@javax.annotation.Nonnull String printId, 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 = "/prints/{printId}" + .replace("{" + "printId" + "}", localVarApiClient.escapeString(printId.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 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)"); + } + + return getPrintCall(printId, _callback); + + } + + /** + * Get Print + * Returns a print. + * @param printId Print ID. (required) + * @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(@javax.annotation.Nonnull String printId) throws ApiException { + ApiResponse localVarResp = getPrintWithHttpInfo(printId); + return localVarResp.getData(); + } + + /** + * Get Print + * Returns a print. + * @param printId Print ID. (required) + * @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(@javax.annotation.Nonnull String printId) throws ApiException { + okhttp3.Call localVarCall = getPrintValidateBeforeCall(printId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Print (asynchronously) + * Returns a print. + * @param printId Print 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 single Print object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserPrints + * @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 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(@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 = "/prints/user/{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 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)"); + } + + return getUserPrintsCall(userId, _callback); + + } + + /** + * Get Own Prints + * Returns a list of all prints of the user. User id has to be your own userId, as you can't request other user's prints. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse> localVarResp = getUserPrintsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get Own Prints + * Returns a list of all prints of the user. User id has to be your own userId, as you can't request other user's prints. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserPrintsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Own Prints (asynchronously) + * Returns a list of all prints of the user. User id has to be your own userId, as you can't request other user's prints. + * @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 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(@javax.annotation.Nonnull String userId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserPrintsValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for uploadPrint + * @param image The binary blob of the png file. (required) + * @param timestamp The time the image was captured. (required) + * @param note The caption for the image. (optional) + * @param worldId The id of the world in which the image was captured. (optional) + * @param worldName The name of the world in which the image was captured. (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 single Print object. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/prints"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (image != null) { + localVarFormParams.put("image", image); + } + + if (note != null) { + localVarFormParams.put("note", note); + } + + if (timestamp != null) { + localVarFormParams.put("timestamp", timestamp); + } + + if (worldId != null) { + localVarFormParams.put("worldId", worldId); + } + + if (worldName != null) { + localVarFormParams.put("worldName", worldName); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'timestamp' is set + if (timestamp == null) { + throw new ApiException("Missing the required parameter 'timestamp' when calling uploadPrint(Async)"); + } + + return uploadPrintCall(image, timestamp, note, worldId, worldName, _callback); + + } + + /** + * Upload Print + * Uploads and creates a print. + * @param image The binary blob of the png file. (required) + * @param timestamp The time the image was captured. (required) + * @param note The caption for the image. (optional) + * @param worldId The id of the world in which the image was captured. (optional) + * @param worldName The name of the world in which the image was captured. (optional) + * @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(@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(); + } + + /** + * Upload Print + * Uploads and creates a print. + * @param image The binary blob of the png file. (required) + * @param timestamp The time the image was captured. (required) + * @param note The caption for the image. (optional) + * @param worldId The id of the world in which the image was captured. (optional) + * @param worldName The name of the world in which the image was captured. (optional) + * @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(@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); + } + + /** + * Upload Print (asynchronously) + * Uploads and creates a print. + * @param image The binary blob of the png file. (required) + * @param timestamp The time the image was captured. (required) + * @param note The caption for the image. (optional) + * @param worldId The id of the world in which the image was captured. (optional) + * @param worldName The name of the world in which the image was captured. (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 single Print object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/io/github/vrchatapi/api/PropsApi.java b/src/main/java/io/github/vrchatapi/api/PropsApi.java new file mode 100644 index 00000000..420fb373 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/api/PropsApi.java @@ -0,0 +1,1203 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.api; + +import io.github.vrchatapi.ApiCallback; +import io.github.vrchatapi.ApiClient; +import io.github.vrchatapi.ApiException; +import io.github.vrchatapi.ApiResponse; +import io.github.vrchatapi.Configuration; +import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ProgressRequestBody; +import io.github.vrchatapi.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.github.vrchatapi.model.CreatePropRequest; +import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.Prop; +import io.github.vrchatapi.model.PropPublishStatus; +import io.github.vrchatapi.model.UpdatePropRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PropsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public PropsApi() { + this(Configuration.getDefaultApiClient()); + } + + public PropsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createProp + * @param createPropRequest (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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
+ */ + public okhttp3.Call createPropCall(@javax.annotation.Nonnull CreatePropRequest createPropRequest, 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 = createPropRequest; + + // create path and map variables + String localVarPath = "/props"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return createPropCall(createPropRequest, _callback); + + } + + /** + * Create Prop + * Create a Prop and return the new Prop object. + * @param createPropRequest (required) + * @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(@javax.annotation.Nonnull CreatePropRequest createPropRequest) throws ApiException { + ApiResponse localVarResp = createPropWithHttpInfo(createPropRequest); + return localVarResp.getData(); + } + + /** + * Create Prop + * Create a Prop and return the new Prop object. + * @param createPropRequest (required) + * @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(@javax.annotation.Nonnull CreatePropRequest createPropRequest) throws ApiException { + okhttp3.Call localVarCall = createPropValidateBeforeCall(createPropRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Prop (asynchronously) + * Create a Prop and return the new Prop object. + * @param createPropRequest (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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteProp + * @param propId Prop 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 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public okhttp3.Call deletePropCall(@javax.annotation.Nonnull String propId, 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 = "/props/{propId}" + .replace("{" + "propId" + "}", localVarApiClient.escapeString(propId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deletePropCall(propId, _callback); + + } + + /** + * Delete Prop + * Delete a Prop. + * @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 + + + + + + + +
Response Details
Status Code Description Response Headers
200 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public void deleteProp(@javax.annotation.Nonnull String propId) throws ApiException { + deletePropWithHttpInfo(propId); + } + + /** + * Delete Prop + * Delete a Prop. + * @param propId Prop ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public ApiResponse deletePropWithHttpInfo(@javax.annotation.Nonnull String propId) throws ApiException { + okhttp3.Call localVarCall = deletePropValidateBeforeCall(propId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete Prop (asynchronously) + * Delete a Prop. + * @param propId Prop 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 The Prop is successfully deleted. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public okhttp3.Call deletePropAsync(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deletePropValidateBeforeCall(propId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getProp + * @param propId Prop 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 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(@javax.annotation.Nonnull String propId, 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 = "/props/{propId}" + .replace("{" + "propId" + "}", localVarApiClient.escapeString(propId.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 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)"); + } + + return getPropCall(propId, _callback); + + } + + /** + * Get Prop + * Returns a Prop object. + * @param propId Prop ID. (required) + * @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(@javax.annotation.Nonnull String propId) throws ApiException { + ApiResponse localVarResp = getPropWithHttpInfo(propId); + return localVarResp.getData(); + } + + /** + * Get Prop + * Returns a Prop object. + * @param propId Prop ID. (required) + * @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(@javax.annotation.Nonnull String propId) throws ApiException { + okhttp3.Call localVarCall = getPropValidateBeforeCall(propId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Prop (asynchronously) + * Returns a Prop object. + * @param propId Prop 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 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(@javax.annotation.Nonnull String propId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getPropValidateBeforeCall(propId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getPropPublishStatus + * @param propId Prop 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 single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public okhttp3.Call getPropPublishStatusCall(@javax.annotation.Nonnull String propId, 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 = "/props/{propId}/publish" + .replace("{" + "propId" + "}", localVarApiClient.escapeString(propId.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 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)"); + } + + return getPropPublishStatusCall(propId, _callback); + + } + + /** + * Get Prop Publish Status + * Returns a PropPublishStatus object. + * @param propId Prop ID. (required) + * @return PropPublishStatus + * @throws ApiException If fail to call the 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 PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public PropPublishStatus getPropPublishStatus(@javax.annotation.Nonnull String propId) throws ApiException { + ApiResponse localVarResp = getPropPublishStatusWithHttpInfo(propId); + return localVarResp.getData(); + } + + /** + * Get Prop Publish Status + * Returns a PropPublishStatus object. + * @param propId Prop ID. (required) + * @return ApiResponse<PropPublishStatus> + * @throws ApiException If fail to call the 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 PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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); + } + + /** + * Get Prop Publish Status (asynchronously) + * Returns a PropPublishStatus object. + * @param propId Prop 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 single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listProps + * @param authorId Must be a valid user ID. (required) + * @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 _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 Prop objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
+ */ + 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[] { }; + + // 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 = "/props"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (authorId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("authorId", authorId)); + } + + 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 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)"); + } + + return listPropsCall(authorId, n, offset, _callback); + + } + + /** + * List Props + * Returns a list Prop objects. + * @param authorId Must be a valid user ID. (required) + * @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) + * @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(@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(); + } + + /** + * List Props + * Returns a list Prop objects. + * @param authorId Must be a valid user ID. (required) + * @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) + * @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(@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); + } + + /** + * List Props (asynchronously) + * Returns a list Prop objects. + * @param authorId Must be a valid user ID. (required) + * @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 _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 Prop objects. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for publishProp + * @param propId Prop 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 single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public okhttp3.Call publishPropCall(@javax.annotation.Nonnull String propId, 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 = "/props/{propId}/publish" + .replace("{" + "propId" + "}", localVarApiClient.escapeString(propId.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return publishPropCall(propId, _callback); + + } + + /** + * Publish Prop + * Publish a Prop and return the updated PropPublishStatus object. + * @param propId Prop ID. (required) + * @return PropPublishStatus + * @throws ApiException If fail to call the 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 PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public PropPublishStatus publishProp(@javax.annotation.Nonnull String propId) throws ApiException { + ApiResponse localVarResp = publishPropWithHttpInfo(propId); + return localVarResp.getData(); + } + + /** + * Publish Prop + * Publish a Prop and return the updated PropPublishStatus object. + * @param propId Prop ID. (required) + * @return ApiResponse<PropPublishStatus> + * @throws ApiException If fail to call the 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 PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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); + } + + /** + * Publish Prop (asynchronously) + * Publish a Prop and return the updated PropPublishStatus object. + * @param propId Prop 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 single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unpublishProp + * @param propId Prop 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 single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public okhttp3.Call unpublishPropCall(@javax.annotation.Nonnull String propId, 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 = "/props/{propId}/publish" + .replace("{" + "propId" + "}", localVarApiClient.escapeString(propId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return unpublishPropCall(propId, _callback); + + } + + /** + * Unpublish Prop + * Unpublish a Prop and return the updated PropPublishStatus object. + * @param propId Prop ID. (required) + * @return PropPublishStatus + * @throws ApiException If fail to call the 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 PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public PropPublishStatus unpublishProp(@javax.annotation.Nonnull String propId) throws ApiException { + ApiResponse localVarResp = unpublishPropWithHttpInfo(propId); + return localVarResp.getData(); + } + + /** + * Unpublish Prop + * Unpublish a Prop and return the updated PropPublishStatus object. + * @param propId Prop ID. (required) + * @return ApiResponse<PropPublishStatus> + * @throws ApiException If fail to call the 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 PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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); + } + + /** + * Unpublish Prop (asynchronously) + * Unpublish a Prop and return the updated PropPublishStatus object. + * @param propId Prop 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 single PropPublishStatus object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateProp + * @param propId Prop ID. (required) + * @param updatePropRequest (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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updatePropRequest; + + // create path and map variables + String localVarPath = "/props/{propId}" + .replace("{" + "propId" + "}", localVarApiClient.escapeString(propId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'updatePropRequest' is set + if (updatePropRequest == null) { + throw new ApiException("Missing the required parameter 'updatePropRequest' when calling updateProp(Async)"); + } + + return updatePropCall(propId, updatePropRequest, _callback); + + } + + /** + * Update Prop + * Updates a Prop and returns the updated Prop object. When updating the asset bundle, all of `name`, `assetUrl`, `platform`, `unityVersion`, `assetVersion`, `spawnType`, and `worldPlacementMask` must be present, as well as `propSignature` if this value is not blank. + * @param propId Prop ID. (required) + * @param updatePropRequest (required) + * @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. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + public Prop updateProp(@javax.annotation.Nonnull String propId, @javax.annotation.Nonnull UpdatePropRequest updatePropRequest) throws ApiException { + ApiResponse localVarResp = updatePropWithHttpInfo(propId, updatePropRequest); + return localVarResp.getData(); + } + + /** + * Update Prop + * Updates a Prop and returns the updated Prop object. When updating the asset bundle, all of `name`, `assetUrl`, `platform`, `unityVersion`, `assetVersion`, `spawnType`, and `worldPlacementMask` must be present, as well as `propSignature` if this value is not blank. + * @param propId Prop ID. (required) + * @param updatePropRequest (required) + * @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. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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); + } + + /** + * Update Prop (asynchronously) + * Updates a Prop and returns the updated Prop object. When updating the asset bundle, all of `name`, `assetUrl`, `platform`, `unityVersion`, `assetVersion`, `spawnType`, and `worldPlacementMask` must be present, as well as `propSignature` if this value is not blank. + * @param propId Prop ID. (required) + * @param updatePropRequest (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 single Prop object. -
401 Error response due to missing auth cookie. -
403 Error response due to missing permissions. -
404 Error response when trying to perform operations on a non-existing prop. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/io/github/vrchatapi/api/UsersApi.java b/src/main/java/io/github/vrchatapi/api/UsersApi.java index 297e4579..1755c8c1 100644 --- a/src/main/java/io/github/vrchatapi/api/UsersApi.java +++ b/src/main/java/io/github/vrchatapi/api/UsersApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,11 +26,26 @@ import java.io.IOException; +import io.github.vrchatapi.model.ChangeUserTagsRequest; import io.github.vrchatapi.model.CurrentUser; import io.github.vrchatapi.model.Error; -import io.github.vrchatapi.model.LimitedUser; +import io.github.vrchatapi.model.Feedback; +import io.github.vrchatapi.model.GetUserGroupInstances200Response; +import io.github.vrchatapi.model.Group; +import io.github.vrchatapi.model.GroupPermissions; +import io.github.vrchatapi.model.LimitedUserGroups; +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; +import io.github.vrchatapi.model.UpdateUserNoteRequest; import io.github.vrchatapi.model.UpdateUserRequest; import io.github.vrchatapi.model.User; +import io.github.vrchatapi.model.UserNote; import java.lang.reflect.Type; import java.util.ArrayList; @@ -40,6 +55,8 @@ public class UsersApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public UsersApi() { this(Configuration.getDefaultApiClient()); @@ -57,25 +74,3073 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for addTags + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (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 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest, 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 = changeUserTagsRequest; + + // create path and map variables + String localVarPath = "/users/{userId}/addTags" + .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 = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'changeUserTagsRequest' is set + if (changeUserTagsRequest == null) { + throw new ApiException("Missing the required parameter 'changeUserTagsRequest' when calling addTags(Async)"); + } + + return addTagsCall(userId, changeUserTagsRequest, _callback); + + } + + /** + * Add User Tags + * Adds tags to the user's profile + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (required) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { + ApiResponse localVarResp = addTagsWithHttpInfo(userId, changeUserTagsRequest); + return localVarResp.getData(); + } + + /** + * Add User Tags + * Adds tags to the user's profile + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (required) + * @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(@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); + } + + /** + * Add User Tags (asynchronously) + * Adds tags to the user's profile + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for checkUserPersistenceExists + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 = "/users/{userId}/{worldId}/persist/exists" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.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 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)"); + } + + // verify the required parameter 'worldId' is set + if (worldId == null) { + throw new ApiException("Missing the required parameter 'worldId' when calling checkUserPersistenceExists(Async)"); + } + + return checkUserPersistenceExistsCall(userId, worldId, _callback); + + } + + /** + * Check User Persistence Exists + * Checks whether the user has persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + checkUserPersistenceExistsWithHttpInfo(userId, worldId); + } + + /** + * Check User Persistence Exists + * Checks whether the user has persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + okhttp3.Call localVarCall = checkUserPersistenceExistsValidateBeforeCall(userId, worldId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Check User Persistence Exists (asynchronously) + * Checks whether the user has persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@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); + return localVarCall; + } + /** + * Build call for deleteAllUserPersistenceData + * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteAllUserPersistenceDataCall(@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 = "/users/{userId}/persist" + .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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deleteAllUserPersistenceDataCall(userId, _callback); + + } + + /** + * Delete All User Persistence Data + * Deletes all of the user's persistence data for every world. + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + deleteAllUserPersistenceDataWithHttpInfo(userId); + } + + /** + * Delete All User Persistence Data + * Deletes all of the user's persistence data for every world. + * @param userId Must be a valid user ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
+ */ + public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete All User Persistence Data (asynchronously) + * Deletes all of the user's persistence data for every world. + * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteAllUserPersistenceDataAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteUserPersistence + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 = "/users/{userId}/{worldId}/persist" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'worldId' is set + if (worldId == null) { + throw new ApiException("Missing the required parameter 'worldId' when calling deleteUserPersistence(Async)"); + } + + return deleteUserPersistenceCall(userId, worldId, _callback); + + } + + /** + * Delete User Persistence + * Deletes the user's persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + deleteUserPersistenceWithHttpInfo(userId, worldId); + } + + /** + * Delete User Persistence + * Deletes the user's persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + okhttp3.Call localVarCall = deleteUserPersistenceValidateBeforeCall(userId, worldId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete User Persistence (asynchronously) + * Deletes the user's persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@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); + return localVarCall; + } + /** + * Build call for getBlockedGroups + * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getBlockedGroupsCall(@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 = "/users/{userId}/groups/userblocked" + .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 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)"); + } + + return getBlockedGroupsCall(userId, _callback); + + } + + /** + * Get User Group Blocks + * Returns a list of Groups the user has blocked. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse> localVarResp = getBlockedGroupsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User Group Blocks + * Returns a list of Groups the user has blocked. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getBlockedGroupsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Group Blocks (asynchronously) + * Returns a list of Groups the user has blocked. + * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getInvitedGroups + * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getInvitedGroupsCall(@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 = "/users/{userId}/groups/invited" + .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 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)"); + } + + return getInvitedGroupsCall(userId, _callback); + + } + + /** + * Get User Group Invited + * Returns a list of Groups the user has been invited to. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse> localVarResp = getInvitedGroupsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User Group Invited + * Returns a list of Groups the user has been invited to. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getInvitedGroupsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Group Invited (asynchronously) + * Returns a list of Groups the user has been invited to. + * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getMutualFriends + * @param userId Must be a valid user ID. (required) + * @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 _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 MutualFriend objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/users/{userId}/mutuals/friends" + .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(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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)"); + } + + return getMutualFriendsCall(userId, n, offset, _callback); + + } + + /** + * Get User Mutual Friends + * Gets a list of mutual friends between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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) + * @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(@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(); + } + + /** + * Get User Mutual Friends + * Gets a list of mutual friends between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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) + * @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(@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); + } + + /** + * Get User Mutual Friends (asynchronously) + * Gets a list of mutual friends between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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 _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 MutualFriend objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getMutualGroups + * @param userId Must be a valid user ID. (required) + * @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 _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 LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/users/{userId}/mutuals/groups" + .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(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 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)"); + } + + return getMutualGroupsCall(userId, n, offset, _callback); + + } + + /** + * Get User Mutual Groups + * Gets a list of mutual groups between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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) + * @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(@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(); + } + + /** + * Get User Mutual Groups + * Gets a list of mutual groups between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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) + * @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(@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); + } + + /** + * Get User Mutual Groups (asynchronously) + * Gets a list of mutual groups between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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 _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 LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getMutuals + * @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 single Mutuals object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getMutualsCall(@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 = "/users/{userId}/mutuals" + .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 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)"); + } + + return getMutualsCall(userId, _callback); + + } + + /** + * Get User Mutuals + * Gets the counts of mutuals between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getMutualsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User Mutuals + * Gets the counts of mutuals between the logged in user and the specified user + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getMutualsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Mutuals (asynchronously) + * Gets the counts of mutuals between the logged in user and the specified 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 a single Mutuals object. -
401 Error response due to missing auth cookie. -
+ */ + 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) + * @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 single User object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getUserCall(@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 = "/users/{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 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)"); + } + + return getUserCall(userId, _callback); + + } + + /** + * Get User by ID + * Get public user information about a specific user using their ID. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getUserWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User by ID + * Get public user information about a specific user using their ID. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User by ID (asynchronously) + * Get public user information about a specific user using their ID. + * @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 single User object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserAllGroupPermissions + * @param userId Must be a valid user ID. (required) + * @param groupIds Comma-separated (no spaces!) list of GroupIDs to retrieve permissions for. (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 The group permissions the user has for every joined group. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/users/{userId}/groups/permissions" + .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(); + + if (groupIds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupIds", groupIds)); + } + + 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 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)"); + } + + return getUserAllGroupPermissionsCall(userId, groupIds, _callback); + + } + + /** + * Get user's permissions for all joined groups. + * Returns a mapping of GroupIDs to arrays of GroupPermissions. + * @param userId Must be a valid user ID. (required) + * @param groupIds Comma-separated (no spaces!) list of GroupIDs to retrieve permissions for. (optional) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nullable String groupIds) throws ApiException { + ApiResponse>> localVarResp = getUserAllGroupPermissionsWithHttpInfo(userId, groupIds); + return localVarResp.getData(); + } + + /** + * Get user's permissions for all joined groups. + * Returns a mapping of GroupIDs to arrays of GroupPermissions. + * @param userId Must be a valid user ID. (required) + * @param groupIds Comma-separated (no spaces!) list of GroupIDs to retrieve permissions for. (optional) + * @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(@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); + } + + /** + * Get user's permissions for all joined groups. (asynchronously) + * Returns a mapping of GroupIDs to arrays of GroupPermissions. + * @param userId Must be a valid user ID. (required) + * @param groupIds Comma-separated (no spaces!) list of GroupIDs to retrieve permissions for. (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 The group permissions the user has for every joined group. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserByName + * @param username Username of the user (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 single User object. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + public okhttp3.Call getUserByNameCall(@javax.annotation.Nonnull String username, 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 = "/users/{username}/name" + .replace("{" + "username" + "}", localVarApiClient.escapeString(username.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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + 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)"); + } + + return getUserByNameCall(username, _callback); + + } + + /** + * Get User by Username + * ~~Get public user information about a specific user using their name.~~ **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). This endpoint now require Admin Credentials. + * @param username Username of the user (required) + * @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. -
+ * @deprecated + */ + @Deprecated + public User getUserByName(@javax.annotation.Nonnull String username) throws ApiException { + ApiResponse localVarResp = getUserByNameWithHttpInfo(username); + return localVarResp.getData(); + } + + /** + * Get User by Username + * ~~Get public user information about a specific user using their name.~~ **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). This endpoint now require Admin Credentials. + * @param username Username of the user (required) + * @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. -
+ * @deprecated + */ + @Deprecated + 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); + } + + /** + * Get User by Username (asynchronously) + * ~~Get public user information about a specific user using their name.~~ **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). This endpoint now require Admin Credentials. + * @param username Username of the user (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 single User object. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserFeedback + * @param userId Must be a valid user ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @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 _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 Feedback objects. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + 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[] { }; + + // 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 = "/users/{userId}/feedback" + .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(); + + if (contentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("contentId", contentId)); + } + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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); + } + + @Deprecated + @SuppressWarnings("rawtypes") + 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)"); + } + + return getUserFeedbackCall(userId, contentId, n, offset, _callback); + + } + + /** + * Get User Feedback + * Get user's submitted feedback + * @param userId Must be a valid user ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @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) + * @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. -
+ * @deprecated + */ + @Deprecated + 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(); + } + + /** + * Get User Feedback + * Get user's submitted feedback + * @param userId Must be a valid user ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @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) + * @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. -
+ * @deprecated + */ + @Deprecated + 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); + } + + /** + * Get User Feedback (asynchronously) + * Get user's submitted feedback + * @param userId Must be a valid user ID. (required) + * @param contentId Filter for particular content submitted, e.g., a groupId, userId, avatarId, etc. (optional) + * @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 _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 Feedback objects. -
401 Error response due to missing auth cookie. -
+ * @deprecated + */ + @Deprecated + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserGroupInstances + * @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 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(@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 = "/users/{userId}/instances/groups" + .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 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)"); + } + + return getUserGroupInstancesCall(userId, _callback); + + } + + /** + * Get User Group Instances + * Returns a list of group instances for a user + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getUserGroupInstancesWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User Group Instances + * Returns a list of group instances for a user + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserGroupInstancesValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Group Instances (asynchronously) + * Returns a list of group instances for a 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 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(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserGroupInstancesValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserGroupInstancesForGroup + * @param userId Must be a valid user ID. (required) + * @param groupId Must be a valid group 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 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupId, 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 = "/users/{userId}/instances/groups/{groupId}" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "groupId" + "}", localVarApiClient.escapeString(groupId.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 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)"); + } + + // verify the required parameter 'groupId' is set + if (groupId == null) { + throw new ApiException("Missing the required parameter 'groupId' when calling getUserGroupInstancesForGroup(Async)"); + } + + return getUserGroupInstancesForGroupCall(userId, groupId, _callback); + + } + + /** + * Get User Group Instances for a specific Group + * Returns a list of a group's instances for a user + * @param userId Must be a valid user ID. (required) + * @param groupId Must be a valid group ID. (required) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String groupId) throws ApiException { + ApiResponse localVarResp = getUserGroupInstancesForGroupWithHttpInfo(userId, groupId); + return localVarResp.getData(); + } + + /** + * Get User Group Instances for a specific Group + * Returns a list of a group's instances for a user + * @param userId Must be a valid user ID. (required) + * @param groupId Must be a valid group ID. (required) + * @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(@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); + } + + /** + * Get User Group Instances for a specific Group (asynchronously) + * Returns a list of a group's instances for a user + * @param userId Must be a valid user ID. (required) + * @param groupId Must be a valid group 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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserGroupRequests + * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getUserGroupRequestsCall(@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 = "/users/{userId}/groups/requested" + .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 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)"); + } + + return getUserGroupRequestsCall(userId, _callback); + + } + + /** + * Get User Group Requests + * Returns a list of Groups the user has requested to be invited into. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse> localVarResp = getUserGroupRequestsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User Group Requests + * Returns a list of Groups the user has requested to be invited into. + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserGroupRequestsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Group Requests (asynchronously) + * Returns a list of Groups the user has requested to be invited into. + * @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 list of Group objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserGroups + * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getUserGroupsCall(@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 = "/users/{userId}/groups" + .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 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)"); + } + + return getUserGroupsCall(userId, _callback); + + } + + /** + * Get User Groups + * Get user's public groups + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse> localVarResp = getUserGroupsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get User Groups + * Get user's public groups + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserGroupsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Groups (asynchronously) + * Get user's public groups + * @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 list of LimitedUserGroups objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserNote + * @param userNoteId Must be a valid user note 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 single UserNote object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getUserNoteCall(@javax.annotation.Nonnull String userNoteId, 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 = "/userNotes/{userNoteId}" + .replace("{" + "userNoteId" + "}", localVarApiClient.escapeString(userNoteId.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 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)"); + } + + return getUserNoteCall(userNoteId, _callback); + + } + + /** + * Get User Note + * Get a particular user note + * @param userNoteId Must be a valid user note ID. (required) + * @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(@javax.annotation.Nonnull String userNoteId) throws ApiException { + ApiResponse localVarResp = getUserNoteWithHttpInfo(userNoteId); + return localVarResp.getData(); + } + + /** + * Get User Note + * Get a particular user note + * @param userNoteId Must be a valid user note ID. (required) + * @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(@javax.annotation.Nonnull String userNoteId) throws ApiException { + okhttp3.Call localVarCall = getUserNoteValidateBeforeCall(userNoteId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get User Note (asynchronously) + * Get a particular user note + * @param userNoteId Must be a valid user note 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 single UserNote object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserNotes + * @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 _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 UserNote objects. -
401 Error response due to missing auth cookie. -
+ */ + 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[] { }; + + // 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 = "/userNotes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + 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 getUserNotesValidateBeforeCall(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset, final ApiCallback _callback) throws ApiException { + return getUserNotesCall(n, offset, _callback); + + } + + /** + * Get User Notes + * Get recently updated user notes + * @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) + * @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(@javax.annotation.Nullable Integer n, @javax.annotation.Nullable Integer offset) throws ApiException { + ApiResponse> localVarResp = getUserNotesWithHttpInfo(n, offset); + return localVarResp.getData(); + } + + /** + * Get User Notes + * Get recently updated user notes + * @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) + * @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(@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); + } + + /** + * Get User Notes (asynchronously) + * Get recently updated user notes + * @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 _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 UserNote objects. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserRepresentedGroup + * @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 OK -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call getUserRepresentedGroupCall(@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 = "/users/{userId}/groups/represented" + .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 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)"); + } + + return getUserRepresentedGroupCall(userId, _callback); + + } + /** - * Build call for getUser - * @param userId (required) + * Get user's current represented group + * Returns the current group that the user is currently representing + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getUserRepresentedGroupWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * Get user's current represented group + * Returns the current group that the user is currently representing + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = getUserRepresentedGroupValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get user's current represented group (asynchronously) + * Returns the current group that the user is currently representing + * @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 OK -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserTutorialStatus + * @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 single User object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserCall(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[] { }; + + // 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 = "/users/{userId}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + String localVarPath = "/users/{userId}/tutorial" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -92,106 +3157,123 @@ public okhttp3.Call getUserCall(String userId, final ApiCallback _callback) thro } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserValidateBeforeCall(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 getUser(Async)"); + throw new ApiException("Missing the required parameter 'userId' when calling getUserTutorialStatus(Async)"); } - - okhttp3.Call localVarCall = getUserCall(userId, _callback); - return localVarCall; + return getUserTutorialStatusCall(userId, _callback); } /** - * Get User by ID - * Get public user information about a specific user using their ID. - * @param userId (required) - * @return User + * Get User Tutorial Status + * Gets the status of completed or outstanding tutorials for the specified user. + * @param userId Must be a valid user ID. (required) + * @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 User object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public User getUser(String userId) throws ApiException { - ApiResponse localVarResp = getUserWithHttpInfo(userId); + public TutorialStatus getUserTutorialStatus(@javax.annotation.Nonnull String userId) throws ApiException { + ApiResponse localVarResp = getUserTutorialStatusWithHttpInfo(userId); return localVarResp.getData(); } /** - * Get User by ID - * Get public user information about a specific user using their ID. - * @param userId (required) - * @return ApiResponse<User> + * Get User Tutorial Status + * Gets the status of completed or outstanding tutorials for the specified user. + * @param userId Must be a valid user ID. (required) + * @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 User object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse getUserWithHttpInfo(String userId) throws ApiException { - okhttp3.Call localVarCall = getUserValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Get User by ID (asynchronously) - * Get public user information about a specific user using their ID. - * @param userId (required) + * Get User Tutorial Status (asynchronously) + * Gets the status of completed or outstanding tutorials for the specified 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 a single User object. -
401 Error response due to missing apiKey or auth cookie. -
200 Returns a single TutorialStatus object. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getUserAsync(String userId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getUserTutorialStatusAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getUserValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getUserTutorialStatusValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getUserByName - * @param username (required) + * Build call for removeTags + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (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 single User object. -
401 Error response due to missing apiKey or auth cookie. -
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 getUserByNameCall(String username, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeUserTagsRequest; // create path and map variables - String localVarPath = "/users/{username}/name" - .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); + String localVarPath = "/users/{userId}/removeTags" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -208,84 +3290,97 @@ public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callba } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getUserByNameValidateBeforeCall(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)"); + 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)"); } - - okhttp3.Call localVarCall = getUserByNameCall(username, _callback); - return localVarCall; + // verify the required parameter 'changeUserTagsRequest' is set + if (changeUserTagsRequest == null) { + throw new ApiException("Missing the required parameter 'changeUserTagsRequest' when calling removeTags(Async)"); + } + + return removeTagsCall(userId, changeUserTagsRequest, _callback); } /** - * Get User by Username - * Get public user information about a specific user using their name. - * @param username (required) - * @return User + * Remove User Tags + * Removes tags from the user's profile + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (required) + * @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 User object. -
401 Error response due to missing apiKey or auth cookie. -
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 User getUserByName(String username) throws ApiException { - ApiResponse localVarResp = getUserByNameWithHttpInfo(username); + public CurrentUser removeTags(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull ChangeUserTagsRequest changeUserTagsRequest) throws ApiException { + ApiResponse localVarResp = removeTagsWithHttpInfo(userId, changeUserTagsRequest); return localVarResp.getData(); } /** - * Get User by Username - * Get public user information about a specific user using their name. - * @param username (required) - * @return ApiResponse<User> + * Remove User Tags + * Removes tags from the user's profile + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (required) + * @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 User object. -
401 Error response due to missing apiKey or auth cookie. -
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 getUserByNameWithHttpInfo(String username) throws ApiException { - okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null); - Type localVarReturnType = new TypeToken(){}.getType(); + 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); } /** - * Get User by Username (asynchronously) - * Get public user information about a specific user using their name. - * @param username (required) + * Remove User Tags (asynchronously) + * Removes tags from the user's profile + * @param userId Must be a valid user ID. (required) + * @param changeUserTagsRequest (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 single User object. -
401 Error response due to missing apiKey or auth cookie. -
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 getUserByNameAsync(String username, 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 = getUserByNameValidateBeforeCall(username, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = removeTagsValidateBeforeCall(userId, changeUserTagsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -295,18 +3390,33 @@ public okhttp3.Call getUserByNameAsync(String username, final ApiCallback * @param developerType Active user by developer type, none for normal users and internal for moderators (optional) * @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 isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (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 LimitedUser objects. -
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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchUsersCall(String search, String developerType, Integer n, Integer offset, 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[] { }; + + // 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 @@ -334,6 +3444,10 @@ public okhttp3.Call searchUsersCall(String search, String developerType, Integer localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); } + if (isInternalVariant != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isInternalVariant", isInternalVariant)); + } + final String[] localVarAccepts = { "application/json" }; @@ -343,21 +3457,19 @@ public okhttp3.Call searchUsersCall(String search, String developerType, Integer } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchUsersValidateBeforeCall(String search, String developerType, Integer n, Integer offset, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = searchUsersCall(search, developerType, n, offset, _callback); - return localVarCall; + 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); } @@ -368,18 +3480,20 @@ private okhttp3.Call searchUsersValidateBeforeCall(String search, String develop * @param developerType Active user by developer type, none for normal users and internal for moderators (optional) * @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) - * @return List<LimitedUser> + * @param isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (optional) + * @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 LimitedUser objects. -
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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public List searchUsers(String search, String developerType, Integer n, Integer offset) throws ApiException { - ApiResponse> localVarResp = searchUsersWithHttpInfo(search, developerType, n, offset); + 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(); } @@ -390,19 +3504,21 @@ public List searchUsers(String search, String developerType, Intege * @param developerType Active user by developer type, none for normal users and internal for moderators (optional) * @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) - * @return ApiResponse<List<LimitedUser>> + * @param isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (optional) + * @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 LimitedUser objects. -
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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> searchUsersWithHttpInfo(String search, String developerType, Integer n, Integer offset) throws ApiException { - okhttp3.Call localVarCall = searchUsersValidateBeforeCall(search, developerType, n, offset, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + 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); } @@ -413,43 +3529,216 @@ public ApiResponse> searchUsersWithHttpInfo(String search, Str * @param developerType Active user by developer type, none for normal users and internal for moderators (optional) * @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 isInternalVariant Not quite sure what this actually does (exists on the website but doesn't seem to be used) (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 LimitedUser objects. -
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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchUsersAsync(String search, String developerType, Integer n, Integer offset, 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, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = searchUsersValidateBeforeCall(search, developerType, n, offset, isInternalVariant, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for updateBadge + * @param userId Must be a valid user ID. (required) + * @param badgeId Must be a valid badge ID. (required) + * @param updateUserBadgeRequest (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 The user's badge is updated. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
404 The user does not have the badge. -
+ */ + 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateUserBadgeRequest; + + // create path and map variables + String localVarPath = "/users/{userId}/badges/{badgeId}" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "badgeId" + "}", localVarApiClient.escapeString(badgeId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'badgeId' is set + if (badgeId == null) { + throw new ApiException("Missing the required parameter 'badgeId' when calling updateBadge(Async)"); + } + + // verify the required parameter 'updateUserBadgeRequest' is set + if (updateUserBadgeRequest == null) { + throw new ApiException("Missing the required parameter 'updateUserBadgeRequest' when calling updateBadge(Async)"); + } + + return updateBadgeCall(userId, badgeId, updateUserBadgeRequest, _callback); + + } + + /** + * Update User Badge + * Updates a user's badge + * @param userId Must be a valid user ID. (required) + * @param badgeId Must be a valid badge ID. (required) + * @param updateUserBadgeRequest (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 badge is updated. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
404 The user does not have the badge. -
+ */ + public void updateBadge(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String badgeId, @javax.annotation.Nonnull UpdateUserBadgeRequest updateUserBadgeRequest) throws ApiException { + updateBadgeWithHttpInfo(userId, badgeId, updateUserBadgeRequest); + } + + /** + * Update User Badge + * Updates a user's badge + * @param userId Must be a valid user ID. (required) + * @param badgeId Must be a valid badge ID. (required) + * @param updateUserBadgeRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Response Details
Status Code Description Response Headers
200 The user's badge is updated. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
404 The user does not have the badge. -
+ */ + 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); + } + + /** + * Update User Badge (asynchronously) + * Updates a user's badge + * @param userId Must be a valid user ID. (required) + * @param badgeId Must be a valid badge ID. (required) + * @param updateUserBadgeRequest (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 The user's badge is updated. -
401 Error response due to missing auth cookie. -
403 Error response when trying get group instances of another user. -
404 The user does not have the badge. -
+ */ + 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); + return localVarCall; + } /** * Build call for updateUser - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param updateUserRequest (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 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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = updateUserRequest; // create path and map variables String localVarPath = "/users/{userId}" - .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())); + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -469,40 +3758,42 @@ public okhttp3.Call updateUserCall(String userId, UpdateUserRequest updateUserRe "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = updateUserCall(userId, updateUserRequest, _callback); - return localVarCall; + return updateUserCall(userId, updateUserRequest, _callback); } /** * Update User Info * Update a users information such as the email and birthday. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param updateUserRequest (optional) * @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(); } @@ -510,17 +3801,20 @@ public CurrentUser updateUser(String userId, UpdateUserRequest updateUserRequest /** * Update User Info * Update a users information such as the email and birthday. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param updateUserRequest (optional) * @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); @@ -529,22 +3823,156 @@ public ApiResponse updateUserWithHttpInfo(String userId, UpdateUser /** * Update User Info (asynchronously) * Update a users information such as the email and birthday. - * @param userId (required) + * @param userId Must be a valid user ID. (required) * @param updateUserRequest (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 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for updateUserNote + * @param updateUserNoteRequest (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 single UserNote object. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call updateUserNoteCall(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest, 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 = updateUserNoteRequest; + + // create path and map variables + String localVarPath = "/userNotes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return updateUserNoteCall(updateUserNoteRequest, _callback); + + } + + /** + * Update User Note + * Updates the currently authenticated user's note on a user + * @param updateUserNoteRequest (required) + * @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(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest) throws ApiException { + ApiResponse localVarResp = updateUserNoteWithHttpInfo(updateUserNoteRequest); + return localVarResp.getData(); + } + + /** + * Update User Note + * Updates the currently authenticated user's note on a user + * @param updateUserNoteRequest (required) + * @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(@javax.annotation.Nonnull UpdateUserNoteRequest updateUserNoteRequest) throws ApiException { + okhttp3.Call localVarCall = updateUserNoteValidateBeforeCall(updateUserNoteRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update User Note (asynchronously) + * Updates the currently authenticated user's note on a user + * @param updateUserNoteRequest (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 single UserNote object. -
401 Error response due to missing auth cookie. -
+ */ + 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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/src/main/java/io/github/vrchatapi/api/WorldsApi.java b/src/main/java/io/github/vrchatapi/api/WorldsApi.java index 6c2d9e23..4c6b56b3 100644 --- a/src/main/java/io/github/vrchatapi/api/WorldsApi.java +++ b/src/main/java/io/github/vrchatapi/api/WorldsApi.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,10 +26,15 @@ import java.io.IOException; +import io.github.vrchatapi.model.ChangeWorldTagsRequest; import io.github.vrchatapi.model.CreateWorldRequest; import io.github.vrchatapi.model.Error; +import io.github.vrchatapi.model.FavoritedWorld; import io.github.vrchatapi.model.Instance; import io.github.vrchatapi.model.LimitedWorld; +import io.github.vrchatapi.model.OrderOption; +import io.github.vrchatapi.model.ReleaseStatus; +import io.github.vrchatapi.model.SortOption; import io.github.vrchatapi.model.UpdateWorldRequest; import io.github.vrchatapi.model.World; import io.github.vrchatapi.model.WorldMetadata; @@ -43,6 +48,8 @@ public class WorldsApi { private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; public WorldsApi() { this(Configuration.getDefaultApiClient()); @@ -60,25 +67,740 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for addWorldTags + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (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 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(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, 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 = changeWorldTagsRequest; + + // create path and map variables + String localVarPath = "/worlds/{worldId}/addTags" + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'changeWorldTagsRequest' is set + if (changeWorldTagsRequest == null) { + throw new ApiException("Missing the required parameter 'changeWorldTagsRequest' when calling addWorldTags(Async)"); + } + + return addWorldTagsCall(worldId, changeWorldTagsRequest, _callback); + + } + + /** + * Add World Tags + * Adds tags to the world's profile + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (required) + * @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(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { + ApiResponse localVarResp = addWorldTagsWithHttpInfo(worldId, changeWorldTagsRequest); + return localVarResp.getData(); + } + + /** + * Add World Tags + * Adds tags to the world's profile + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (required) + * @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(@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); + } + + /** + * Add World Tags (asynchronously) + * Adds tags to the world's profile + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for checkUserPersistenceExists + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 = "/users/{userId}/{worldId}/persist/exists" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.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 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)"); + } + + // verify the required parameter 'worldId' is set + if (worldId == null) { + throw new ApiException("Missing the required parameter 'worldId' when calling checkUserPersistenceExists(Async)"); + } + + return checkUserPersistenceExistsCall(userId, worldId, _callback); + + } + + /** + * Check User Persistence Exists + * Checks whether the user has persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + checkUserPersistenceExistsWithHttpInfo(userId, worldId); + } + + /** + * Check User Persistence Exists + * Checks whether the user has persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + okhttp3.Call localVarCall = checkUserPersistenceExistsValidateBeforeCall(userId, worldId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Check User Persistence Exists (asynchronously) + * Checks whether the user has persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@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); + return localVarCall; + } + /** + * Build call for createWorld + * @param createWorldRequest (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 single World object. -
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(@javax.annotation.Nullable CreateWorldRequest createWorldRequest, 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 = createWorldRequest; + + // create path and map variables + String localVarPath = "/worlds"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createWorldValidateBeforeCall(@javax.annotation.Nullable CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { + return createWorldCall(createWorldRequest, _callback); + + } + + /** + * Create World + * Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. + * @param createWorldRequest (optional) + * @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 necessary Trust rank yet. -
401 Error response due to missing auth cookie. -
+ */ + public World createWorld(@javax.annotation.Nullable CreateWorldRequest createWorldRequest) throws ApiException { + ApiResponse localVarResp = createWorldWithHttpInfo(createWorldRequest); + return localVarResp.getData(); + } + + /** + * Create World + * Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. + * @param createWorldRequest (optional) + * @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 necessary Trust rank yet. -
401 Error response due to missing auth cookie. -
+ */ + 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); + } + + /** + * Create World (asynchronously) + * Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. + * @param createWorldRequest (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 single World object. -
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(@javax.annotation.Nullable CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createWorldValidateBeforeCall(createWorldRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAllUserPersistenceData + * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteAllUserPersistenceDataCall(@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 = "/users/{userId}/persist" + .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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + return deleteAllUserPersistenceDataCall(userId, _callback); + + } + + /** + * Delete All User Persistence Data + * Deletes all of the user's persistence data for every world. + * @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(@javax.annotation.Nonnull String userId) throws ApiException { + deleteAllUserPersistenceDataWithHttpInfo(userId); + } + + /** + * Delete All User Persistence Data + * Deletes all of the user's persistence data for every world. + * @param userId Must be a valid user ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
+ */ + public ApiResponse deleteAllUserPersistenceDataWithHttpInfo(@javax.annotation.Nonnull String userId) throws ApiException { + okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete All User Persistence Data (asynchronously) + * Deletes all of the user's persistence data for every world. + * @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 The user's persistence data for all worlds is deleted. -
401 Error response due to missing auth cookie. -
+ */ + public okhttp3.Call deleteAllUserPersistenceDataAsync(@javax.annotation.Nonnull String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAllUserPersistenceDataValidateBeforeCall(userId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteUserPersistence + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId, 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 = "/users/{userId}/{worldId}/persist" + .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.toString())) + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'worldId' is set + if (worldId == null) { + throw new ApiException("Missing the required parameter 'worldId' when calling deleteUserPersistence(Async)"); + } + + return deleteUserPersistenceCall(userId, worldId, _callback); + + } + + /** + * Delete User Persistence + * Deletes the user's persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + deleteUserPersistenceWithHttpInfo(userId, worldId); + } + + /** + * Delete User Persistence + * Deletes the user's persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Response Details
Status Code Description Response Headers
200 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(@javax.annotation.Nonnull String userId, @javax.annotation.Nonnull String worldId) throws ApiException { + okhttp3.Call localVarCall = deleteUserPersistenceValidateBeforeCall(userId, worldId, null); + return localVarApiClient.execute(localVarCall); + } + /** - * Build call for createWorld - * @param createWorldRequest (optional) + * Delete User Persistence (asynchronously) + * Deletes the user's persistence data for a given world + * @param userId Must be a valid user ID. (required) + * @param worldId Must be a valid world 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 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(@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); + return localVarCall; + } + /** + * Build call for deleteWorld + * @param worldId Must be a valid world 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 single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
401 Error response due to missing apiKey or auth cookie. -
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 createWorldCall(CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = createWorldRequest; + public okhttp3.Call deleteWorldCall(@javax.annotation.Nonnull String worldId, 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 = "/worlds"; + String localVarPath = "/worlds/{worldId}" + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -95,105 +817,123 @@ public okhttp3.Call createWorldCall(CreateWorldRequest createWorldRequest, final } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createWorldValidateBeforeCall(CreateWorldRequest createWorldRequest, 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)"); + } - okhttp3.Call localVarCall = createWorldCall(createWorldRequest, _callback); - return localVarCall; + return deleteWorldCall(worldId, _callback); } /** - * Create World - * Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. - * @param createWorldRequest (optional) - * @return World + * Delete World + * Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved. + * @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 Returns a single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
401 Error response due to missing apiKey or auth cookie. -
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 World createWorld(CreateWorldRequest createWorldRequest) throws ApiException { - ApiResponse localVarResp = createWorldWithHttpInfo(createWorldRequest); - return localVarResp.getData(); + public void deleteWorld(@javax.annotation.Nonnull String worldId) throws ApiException { + deleteWorldWithHttpInfo(worldId); } /** - * Create World - * Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. - * @param createWorldRequest (optional) - * @return ApiResponse<World> + * Delete World + * Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved. + * @param worldId Must be a valid world ID. (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - - - + + +
Response Details
Status Code Description Response Headers
200 Returns a single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
401 Error response due to missing apiKey or auth cookie. -
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 createWorldWithHttpInfo(CreateWorldRequest createWorldRequest) throws ApiException { - okhttp3.Call localVarCall = createWorldValidateBeforeCall(createWorldRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse deleteWorldWithHttpInfo(@javax.annotation.Nonnull String worldId) throws ApiException { + okhttp3.Call localVarCall = deleteWorldValidateBeforeCall(worldId, null); + return localVarApiClient.execute(localVarCall); } /** - * Create World (asynchronously) - * Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension. - * @param createWorldRequest (optional) + * Delete World (asynchronously) + * Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved. + * @param worldId Must be a valid world 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 single World object. -
400 Error response when trying create a world without having the neccesary Trust rank yet. -
401 Error response due to missing apiKey or auth cookie. -
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 createWorldAsync(CreateWorldRequest createWorldRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWorldAsync(@javax.annotation.Nonnull String worldId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createWorldValidateBeforeCall(createWorldRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = deleteWorldValidateBeforeCall(worldId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for deleteWorld - * @param worldId (required) + * Build call for deleteWorldPlatform + * @param worldId Must be a valid world ID. (required) + * @param publishedPlatform A platform the world supports. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
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 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[] { }; + + // 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 = "/worlds/{worldId}" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())); + String localVarPath = "/worlds/{worldId}/platform/{publishedPlatform}" + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())) + .replace("{" + "publishedPlatform" + "}", localVarApiClient.escapeString(publishedPlatform.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -210,92 +950,101 @@ public okhttp3.Call deleteWorldCall(String worldId, final ApiCallback _callback) } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWorldValidateBeforeCall(String worldId, 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 deleteWorld(Async)"); + throw new ApiException("Missing the required parameter 'worldId' when calling deleteWorldPlatform(Async)"); } - - okhttp3.Call localVarCall = deleteWorldCall(worldId, _callback); - return localVarCall; + // verify the required parameter 'publishedPlatform' is set + if (publishedPlatform == null) { + throw new ApiException("Missing the required parameter 'publishedPlatform' when calling deleteWorldPlatform(Async)"); + } + + return deleteWorldPlatformCall(worldId, publishedPlatform, _callback); } /** - * Delete World - * Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved. - * @param worldId (required) + * Delete World Platform + * Deletes a world platform. + * @param worldId Must be a valid world ID. (required) + * @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 apiKey or auth cookie. -
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 { - deleteWorldWithHttpInfo(worldId); + public void deleteWorldPlatform(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String publishedPlatform) throws ApiException { + deleteWorldPlatformWithHttpInfo(worldId, publishedPlatform); } /** - * Delete World - * Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved. - * @param worldId (required) + * Delete World Platform + * Deletes a world platform. + * @param worldId Must be a valid world ID. (required) + * @param publishedPlatform A platform the world supports. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
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 { - okhttp3.Call localVarCall = deleteWorldValidateBeforeCall(worldId, null); + 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); } /** - * Delete World (asynchronously) - * Delete a world. Notice a world is never fully \"deleted\", only its ReleaseStatus is set to \"hidden\" and the linked Files are deleted. The WorldID is permanently reserved. - * @param worldId (required) + * Delete World Platform (asynchronously) + * Deletes a world platform. + * @param worldId Must be a valid world ID. (required) + * @param publishedPlatform A platform the world supports. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
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 deleteWorldPlatformAsync(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull String publishedPlatform, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteWorldValidateBeforeCall(worldId, _callback); + okhttp3.Call localVarCall = deleteWorldPlatformValidateBeforeCall(worldId, publishedPlatform, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getActiveWorlds * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -304,17 +1053,32 @@ public okhttp3.Call deleteWorldAsync(String worldId, final ApiCallback _ca * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (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 LimitedWorld objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getActiveWorldsCall(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, 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[] { }; + + // 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 @@ -374,6 +1138,10 @@ public okhttp3.Call getActiveWorldsCall(String featured, String sort, Integer n, localVarQueryParams.addAll(localVarApiClient.parameterToPair("platform", platform)); } + if (noplatform != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("noplatform", noplatform)); + } + final String[] localVarAccepts = { "application/json" }; @@ -383,21 +1151,19 @@ public okhttp3.Call getActiveWorldsCall(String featured, String sort, Integer n, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getActiveWorldsValidateBeforeCall(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getActiveWorldsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, _callback); - return localVarCall; + 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); } @@ -405,9 +1171,9 @@ private okhttp3.Call getActiveWorldsValidateBeforeCall(String featured, String s * List Active Worlds * Search and list currently Active worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -416,17 +1182,19 @@ private okhttp3.Call getActiveWorldsValidateBeforeCall(String featured, String s * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public List getActiveWorlds(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform) throws ApiException { - ApiResponse> localVarResp = getActiveWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); + 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(); } @@ -434,9 +1202,9 @@ public List getActiveWorlds(String featured, String sort, Integer * List Active Worlds * Search and list currently Active worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -445,17 +1213,19 @@ public List getActiveWorlds(String featured, String sort, Integer * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> getActiveWorldsWithHttpInfo(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform) throws ApiException { - okhttp3.Call localVarCall = getActiveWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, null); + 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); } @@ -464,9 +1234,9 @@ public ApiResponse> getActiveWorldsWithHttpInfo(String featur * List Active Worlds (asynchronously) * Search and list currently Active worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -475,19 +1245,21 @@ public ApiResponse> getActiveWorldsWithHttpInfo(String featur * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (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 LimitedWorld objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call getActiveWorldsAsync(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, 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, _callback); + okhttp3.Call localVarCall = getActiveWorldsValidateBeforeCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, noplatform, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -495,9 +1267,9 @@ public okhttp3.Call getActiveWorldsAsync(String featured, String sort, Integer n /** * Build call for getFavoritedWorlds * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -511,14 +1283,28 @@ public okhttp3.Call getActiveWorldsAsync(String featured, String sort, Integer n * @return 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 apiKey or auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
200 Returns a list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedWorldsCall(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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[] { }; + + // 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 @@ -591,21 +1377,19 @@ public okhttp3.Call getFavoritedWorldsCall(String featured, String sort, Integer } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getFavoritedWorldsValidateBeforeCall(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getFavoritedWorldsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); - return localVarCall; + 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); } @@ -613,9 +1397,9 @@ private okhttp3.Call getFavoritedWorldsValidateBeforeCall(String featured, Strin * List Favorited Worlds * Search and list favorited worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -625,18 +1409,19 @@ private okhttp3.Call getFavoritedWorldsValidateBeforeCall(String featured, Strin * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) * @param userId Target user to see information on, admin-only. (optional) - * @return List<LimitedWorld> + * @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 LimitedWorld objects. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
200 Returns a list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public List getFavoritedWorlds(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId) throws ApiException { - ApiResponse> localVarResp = getFavoritedWorldsWithHttpInfo(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId); + 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(); } @@ -644,9 +1429,9 @@ public List getFavoritedWorlds(String featured, String sort, Integ * List Favorited Worlds * Search and list favorited worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -656,19 +1441,20 @@ public List getFavoritedWorlds(String featured, String sort, Integ * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) * @param userId Target user to see information on, admin-only. (optional) - * @return ApiResponse<List<LimitedWorld>> + * @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 LimitedWorld objects. -
401 Error response due to missing apiKey or auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
200 Returns a list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public ApiResponse> getFavoritedWorldsWithHttpInfo(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -676,9 +1462,9 @@ public ApiResponse> getFavoritedWorldsWithHttpInfo(String fea * List Favorited Worlds (asynchronously) * Search and list favorited worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -692,26 +1478,27 @@ public ApiResponse> getFavoritedWorldsWithHttpInfo(String fea * @return The request call * @throws ApiException If 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 apiKey or auth cookie. -
403 Error response when trying to see favourited worlds of another user without sufficient admin permissions. -
200 Returns a list of FavoritedWorld objects. -
401 Error response due to missing auth cookie. -
403 Error response when trying to see favorited worlds of another user without sufficient admin permissions. -
*/ - public okhttp3.Call getFavoritedWorldsAsync(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getRecentWorlds * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -725,14 +1512,28 @@ public okhttp3.Call getFavoritedWorldsAsync(String featured, String sort, 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 LimitedWorld objects. -
401 Error response due to missing apiKey or auth cookie. -
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(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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[] { }; + + // 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 @@ -805,21 +1606,19 @@ public okhttp3.Call getRecentWorldsCall(String featured, String sort, Integer n, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRecentWorldsValidateBeforeCall(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, String userId, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getRecentWorldsCall(featured, sort, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, userId, _callback); - return localVarCall; + 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); } @@ -827,9 +1626,9 @@ private okhttp3.Call getRecentWorldsValidateBeforeCall(String featured, String s * List Recent Worlds * Search and list recently visited worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -842,14 +1641,15 @@ private okhttp3.Call getRecentWorldsValidateBeforeCall(String featured, String s * @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 apiKey or auth cookie. -
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(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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(); } @@ -858,9 +1658,9 @@ public List getRecentWorlds(String featured, String sort, Integer * List Recent Worlds * Search and list recently visited worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -873,14 +1673,15 @@ public List getRecentWorlds(String featured, String sort, Integer * @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 apiKey or auth cookie. -
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(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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); @@ -890,9 +1691,9 @@ public ApiResponse> getRecentWorldsWithHttpInfo(String featur * List Recent Worlds (asynchronously) * Search and list recently visited worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -906,14 +1707,15 @@ public ApiResponse> getRecentWorldsWithHttpInfo(String featur * @return The request call * @throws ApiException If 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 apiKey or auth cookie. -
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(String featured, String sort, Integer n, String order, Integer offset, String search, String tag, String notag, String 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(); @@ -922,23 +1724,37 @@ public okhttp3.Call getRecentWorldsAsync(String featured, String sort, Integer n } /** * Build call for getWorld - * @param worldId (required) + * @param worldId Must be a valid world 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 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[] { }; + + // 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 = "/worlds/{worldId}" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -955,61 +1771,61 @@ public okhttp3.Call getWorldCall(String worldId, final ApiCallback _callback) th } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); } - - okhttp3.Call localVarCall = getWorldCall(worldId, _callback); - return localVarCall; + return getWorldCall(worldId, _callback); } /** * Get World by ID - * Get information about a specific World. - * @param worldId (required) + * Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. + * @param worldId Must be a valid world ID. (required) * @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(); } /** * Get World by ID - * Get information about a specific World. - * @param worldId (required) + * Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. + * @param worldId Must be a valid world ID. (required) * @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); @@ -1017,19 +1833,20 @@ public ApiResponse getWorldWithHttpInfo(String worldId) throws ApiExcepti /** * Get World by ID (asynchronously) - * Get information about a specific World. - * @param worldId (required) + * Get information about a specific World. Works unauthenticated but when so will always return `0` for certain fields. + * @param worldId Must be a valid world 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 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(); @@ -1038,25 +1855,39 @@ public okhttp3.Call getWorldAsync(String worldId, final ApiCallback _call } /** * Build call for getWorldInstance - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 single Instance object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/worlds/{worldId}/{instanceId}" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())) - .replaceAll("\\{" + "instanceId" + "\\}", localVarApiClient.escapeString(instanceId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())) + .replace("{" + "instanceId" + "}", localVarApiClient.escapeString(instanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1073,49 +1904,48 @@ public okhttp3.Call getWorldInstanceCall(String worldId, String instanceId, fina } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - + // verify the required parameter 'instanceId' is set if (instanceId == null) { throw new ApiException("Missing the required parameter 'instanceId' when calling getWorldInstance(Async)"); } - - okhttp3.Call localVarCall = getWorldInstanceCall(worldId, instanceId, _callback); - return localVarCall; + return getWorldInstanceCall(worldId, instanceId, _callback); } /** * Get World Instance * Returns a worlds instance. - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -1123,18 +1953,19 @@ public Instance getWorldInstance(String worldId, String instanceId) throws ApiEx /** * Get World Instance * Returns a worlds instance. - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance ID. (required) * @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 apiKey or auth cookie. -
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); @@ -1143,19 +1974,20 @@ public ApiResponse getWorldInstanceWithHttpInfo(String worldId, String /** * Get World Instance (asynchronously) * Returns a worlds instance. - * @param worldId (required) - * @param instanceId (required) + * @param worldId Must be a valid world ID. (required) + * @param instanceId Must be a valid instance 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 single Instance object. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -1164,12 +1996,13 @@ public okhttp3.Call getWorldInstanceAsync(String worldId, String instanceId, fin } /** * Build call for getWorldMetadata - * @param worldId (required) + * @param worldId Must be a valid world 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 - +
+ @@ -1177,12 +2010,25 @@ 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[] { }; + + // 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 = "/worlds/{worldId}/metadata" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1199,38 +2045,37 @@ public okhttp3.Call getWorldMetadataCall(String worldId, final ApiCallback _call } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = getWorldMetadataCall(worldId, _callback); - return localVarCall; + return getWorldMetadataCall(worldId, _callback); } /** * Get World Metadata * Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @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`. -
+
+ @@ -1238,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(); } @@ -1246,11 +2091,12 @@ public WorldMetadata getWorldMetadata(String worldId) throws ApiException { /** * Get World Metadata * Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @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`. -
+
+ @@ -1258,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); @@ -1267,12 +2113,13 @@ public ApiResponse getWorldMetadataWithHttpInfo(String worldId) t /** * Get World Metadata (asynchronously) * Return a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details -
Response Details
Status Code Description Response Headers
200 OK -
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`. -
+
+ @@ -1280,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(); @@ -1289,24 +2136,38 @@ 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 apiKey or auth cookie. -
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[] { }; + + // 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 = "/worlds/{worldId}/publish" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1323,44 +2184,43 @@ public okhttp3.Call getWorldPublishStatusCall(String worldId, final ApiCallback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = getWorldPublishStatusCall(worldId, _callback); - return localVarCall; + return getWorldPublishStatusCall(worldId, _callback); } /** * Get World Publish Status * Returns a worlds publish status. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @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 apiKey or auth cookie. -
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(); } @@ -1368,18 +2228,19 @@ public WorldPublishStatus getWorldPublishStatus(String worldId) throws ApiExcept /** * Get World Publish Status * Returns a worlds publish status. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @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 apiKey or auth cookie. -
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); @@ -1388,19 +2249,20 @@ public ApiResponse getWorldPublishStatusWithHttpInfo(String /** * Get World Publish Status (asynchronously) * Returns a worlds publish status. - * @param worldId (required) + * @param worldId Must be a valid world 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 single WorldPublishStatus object. -
401 Error response due to missing apiKey or auth cookie. -
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(); @@ -1409,24 +2271,38 @@ public okhttp3.Call getWorldPublishStatusAsync(String worldId, final ApiCallback } /** * Build call for publishWorld - * @param worldId (required) + * @param worldId Must be a valid world 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 TODO -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/worlds/{worldId}/publish" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1443,61 +2319,61 @@ public okhttp3.Call publishWorldCall(String worldId, final ApiCallback _callback } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _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)"); } - - okhttp3.Call localVarCall = publishWorldCall(worldId, _callback); - return localVarCall; + return publishWorldCall(worldId, _callback); } /** * Publish World * Publish a world. You can only publish one world per week. - * @param worldId (required) + * @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 apiKey or auth cookie. -
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); } /** * Publish World * Publish a world. You can only publish one world per week. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 TODO -
401 Error response due to missing apiKey or auth cookie. -
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); } @@ -1505,32 +2381,178 @@ public ApiResponse publishWorldWithHttpInfo(String worldId) throws ApiExce /** * Publish World (asynchronously) * Publish a world. You can only publish one world per week. - * @param worldId (required) + * @param worldId Must be a valid world 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 TODO -
401 Error response due to missing apiKey or auth cookie. -
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); return localVarCall; } + /** + * Build call for removeWorldTags + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (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 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(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest, 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 = changeWorldTagsRequest; + + // create path and map variables + String localVarPath = "/worlds/{worldId}/removeTags" + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + 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)"); + } + + // verify the required parameter 'changeWorldTagsRequest' is set + if (changeWorldTagsRequest == null) { + throw new ApiException("Missing the required parameter 'changeWorldTagsRequest' when calling removeWorldTags(Async)"); + } + + return removeWorldTagsCall(worldId, changeWorldTagsRequest, _callback); + + } + + /** + * Remove World Tags + * Removes tags from the world's profile + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (required) + * @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(@javax.annotation.Nonnull String worldId, @javax.annotation.Nonnull ChangeWorldTagsRequest changeWorldTagsRequest) throws ApiException { + ApiResponse localVarResp = removeWorldTagsWithHttpInfo(worldId, changeWorldTagsRequest); + return localVarResp.getData(); + } + + /** + * Remove World Tags + * Removes tags from the world's profile + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (required) + * @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(@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); + } + + /** + * Remove World Tags (asynchronously) + * Removes tags from the world's profile + * @param worldId Must be a valid world ID. (required) + * @param changeWorldTagsRequest (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 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(@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(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for searchWorlds * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own worlds. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -1539,17 +2561,34 @@ public okhttp3.Call publishWorldAsync(String worldId, final ApiCallback _c * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (optional) + * @param fuzzy (optional) + * @param avatarSpecific Only search for avatar worlds. (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 LimitedWorld objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchWorldsCall(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, 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[] { }; + + // 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 @@ -1617,6 +2656,18 @@ public okhttp3.Call searchWorldsCall(String featured, String sort, String user, localVarQueryParams.addAll(localVarApiClient.parameterToPair("platform", platform)); } + if (noplatform != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("noplatform", noplatform)); + } + + if (fuzzy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fuzzy", fuzzy)); + } + + if (avatarSpecific != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("avatarSpecific", avatarSpecific)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1626,21 +2677,19 @@ public okhttp3.Call searchWorldsCall(String featured, String sort, String user, } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call searchWorldsValidateBeforeCall(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = searchWorldsCall(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, _callback); - return localVarCall; + 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); } @@ -1648,11 +2697,11 @@ private okhttp3.Call searchWorldsValidateBeforeCall(String featured, String sort * Search All Worlds * Search and list any worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own worlds. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -1661,17 +2710,21 @@ private okhttp3.Call searchWorldsValidateBeforeCall(String featured, String sort * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (optional) + * @param fuzzy (optional) + * @param avatarSpecific Only search for avatar worlds. (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public List searchWorlds(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform) throws ApiException { - ApiResponse> localVarResp = searchWorldsWithHttpInfo(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform); + 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(); } @@ -1679,11 +2732,11 @@ public List searchWorlds(String featured, String sort, String user * Search All Worlds * Search and list any worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own worlds. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -1692,17 +2745,21 @@ public List searchWorlds(String featured, String sort, String user * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (optional) + * @param fuzzy (optional) + * @param avatarSpecific Only search for avatar worlds. (optional) * @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 apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public ApiResponse> searchWorldsWithHttpInfo(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform) throws ApiException { - okhttp3.Call localVarCall = searchWorldsValidateBeforeCall(featured, sort, user, userId, n, order, offset, search, tag, notag, releaseStatus, maxUnityVersion, minUnityVersion, platform, null); + 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); } @@ -1711,11 +2768,11 @@ public ApiResponse> searchWorldsWithHttpInfo(String featured, * Search All Worlds (asynchronously) * Search and list any worlds by query filters. * @param featured Filters on featured results. (optional) - * @param sort (optional, default to popularity) + * @param sort The sort order of the results. (optional, default to popularity) * @param user Set to `me` for searching own worlds. (optional) * @param userId Filter by UserID. (optional) * @param n The number of objects to return. (optional, default to 60) - * @param order (optional, default to descending) + * @param order Result ordering (optional, default to descending) * @param offset A zero-based offset from the default object sorting from where search results start. (optional) * @param search Filters by world name. (optional) * @param tag Tags to include (comma-separated). Any of the tags needs to be present. (optional) @@ -1724,43 +2781,61 @@ public ApiResponse> searchWorldsWithHttpInfo(String featured, * @param maxUnityVersion The maximum Unity version supported by the asset. (optional) * @param minUnityVersion The minimum Unity version supported by the asset. (optional) * @param platform The platform the asset supports. (optional) + * @param noplatform The platform the asset does not support. (optional) + * @param fuzzy (optional) + * @param avatarSpecific Only search for avatar worlds. (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 LimitedWorld objects. -
401 Error response due to missing apiKey or auth cookie. -
401 Error response due to missing auth cookie. -
*/ - public okhttp3.Call searchWorldsAsync(String featured, String sort, String user, String userId, Integer n, String order, Integer offset, String search, String tag, String notag, String releaseStatus, String maxUnityVersion, String minUnityVersion, String platform, 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, _callback); + 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(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for unpublishWorld - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // 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 = "/worlds/{worldId}/publish" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1777,61 +2852,61 @@ public okhttp3.Call unpublishWorldCall(String worldId, final ApiCallback _callba } final String[] localVarContentTypes = { - }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = unpublishWorldCall(worldId, _callback); - return localVarCall; + return unpublishWorldCall(worldId, _callback); } /** * Unpublish World * Unpublish a world. - * @param worldId (required) + * @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 apiKey or auth cookie. -
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); } /** * Unpublish World * Unpublish a world. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
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); } @@ -1839,19 +2914,20 @@ public ApiResponse unpublishWorldWithHttpInfo(String worldId) throws ApiEx /** * Unpublish World (asynchronously) * Unpublish a world. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
+ - +
Response Details
Status Code Description Response Headers
200 OK -
401 Error response due to missing apiKey or auth cookie. -
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); @@ -1859,25 +2935,39 @@ public okhttp3.Call unpublishWorldAsync(String worldId, final ApiCallback } /** * Build call for updateWorld - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @param updateWorldRequest (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 single World object. -
401 Error response due to missing apiKey or auth cookie. -
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[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + Object localVarPostBody = updateWorldRequest; // create path and map variables String localVarPath = "/worlds/{worldId}" - .replaceAll("\\{" + "worldId" + "\\}", localVarApiClient.escapeString(worldId.toString())); + .replace("{" + "worldId" + "}", localVarApiClient.escapeString(worldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1897,42 +2987,42 @@ public okhttp3.Call updateWorldCall(String worldId, UpdateWorldRequest updateWor "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } - String[] localVarAuthNames = new String[] { "apiKeyCookie", "authCookie" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + String[] localVarAuthNames = new String[] { "authCookie" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @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)"); } - - okhttp3.Call localVarCall = updateWorldCall(worldId, updateWorldRequest, _callback); - return localVarCall; + return updateWorldCall(worldId, updateWorldRequest, _callback); } /** * Update World * Update information about a specific World. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @param updateWorldRequest (optional) * @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 apiKey or auth cookie. -
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(); } @@ -1940,19 +3030,20 @@ public World updateWorld(String worldId, UpdateWorldRequest updateWorldRequest) /** * Update World * Update information about a specific World. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @param updateWorldRequest (optional) * @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 apiKey or auth cookie. -
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); @@ -1961,20 +3052,21 @@ public ApiResponse updateWorldWithHttpInfo(String worldId, UpdateWorldReq /** * Update World (asynchronously) * Update information about a specific World. - * @param worldId (required) + * @param worldId Must be a valid world ID. (required) * @param updateWorldRequest (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 single World object. -
401 Error response due to missing apiKey or auth cookie. -
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 1fe4d647..5dc12a08 100644 --- a/src/main/java/io/github/vrchatapi/auth/ApiKeyAuth.java +++ b/src/main/java/io/github/vrchatapi/auth/ApiKeyAuth.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,12 +12,14 @@ package io.github.vrchatapi.auth; +import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Pair; +import java.net.URI; 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; @@ -55,7 +57,8 @@ public void setApiKeyPrefix(String apiKeyPrefix) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { if (apiKey == null) { return; } diff --git a/src/main/java/io/github/vrchatapi/auth/Authentication.java b/src/main/java/io/github/vrchatapi/auth/Authentication.java index 05dafe71..ed59213d 100644 --- a/src/main/java/io/github/vrchatapi/auth/Authentication.java +++ b/src/main/java/io/github/vrchatapi/auth/Authentication.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,10 +13,13 @@ package io.github.vrchatapi.auth; import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ApiException; +import java.net.URI; 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. @@ -24,6 +27,10 @@ public interface Authentication { * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws ApiException if failed to update the parameters */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams); + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; } diff --git a/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java b/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java index 518b5b86..20818b10 100644 --- a/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java +++ b/src/main/java/io/github/vrchatapi/auth/HttpBasicAuth.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,14 +13,14 @@ package io.github.vrchatapi.auth; import io.github.vrchatapi.Pair; +import io.github.vrchatapi.ApiException; import okhttp3.Credentials; +import java.net.URI; import java.util.Map; import java.util.List; -import java.io.UnsupportedEncodingException; - public class HttpBasicAuth implements Authentication { private String username; private String password; @@ -42,7 +42,8 @@ public void setPassword(String password) { } @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { if (username == null && password == null) { return; } diff --git a/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java b/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java index 870c0979..96c2a684 100644 --- a/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java +++ b/src/main/java/io/github/vrchatapi/auth/HttpBearerAuth.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,15 +12,19 @@ package io.github.vrchatapi.auth; +import io.github.vrchatapi.ApiException; import io.github.vrchatapi.Pair; -import java.util.Map; +import java.net.URI; 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; @@ -32,7 +36,7 @@ public HttpBearerAuth(String scheme) { * @return The bearer token */ public String getBearerToken() { - return bearerToken; + return tokenSupplier.get(); } /** @@ -41,12 +45,23 @@ 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) { - if(bearerToken == null) { + 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 8a2889e4..87e4a0a5 100644 --- a/src/main/java/io/github/vrchatapi/model/APIConfig.java +++ b/src/main/java/io/github/vrchatapi/model/APIConfig.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,2238 +13,3225 @@ package io.github.vrchatapi.model; import 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.APIEventConfig; -import io.github.vrchatapi.model.DeploymentGroup; -import io.github.vrchatapi.model.DownloadURLList; +import io.github.vrchatapi.model.APIConfigAccessLogsUrls; +import io.github.vrchatapi.model.APIConfigAnnouncement; +import io.github.vrchatapi.model.APIConfigAudioConfig; +import io.github.vrchatapi.model.APIConfigAvatarPerfLimiter; +import io.github.vrchatapi.model.APIConfigConstants; +import io.github.vrchatapi.model.APIConfigDownloadURLList; +import io.github.vrchatapi.model.APIConfigEvents; +import io.github.vrchatapi.model.APIConfigIosVersion; +import io.github.vrchatapi.model.APIConfigMinSupportedClientBuildNumber; +import io.github.vrchatapi.model.APIConfigOfflineAnalysis; import io.github.vrchatapi.model.DynamicContentRow; -import io.github.vrchatapi.model.PublicAnnouncement; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.github.vrchatapi.model.ReportCategory; +import io.github.vrchatapi.model.ReportReason; 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; +import java.util.Map; +import java.util.Set; + +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 org.threeten.bp.OffsetDateTime; + +import io.github.vrchatapi.JSON; /** - * APIConfig + * 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) - private Set announcements = new LinkedHashSet(); + @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_API_KEY = "apiKey"; - @SerializedName(SERIALIZED_NAME_API_KEY) - private String apiKey; + 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_APP_NAME = "appName"; - @SerializedName(SERIALIZED_NAME_APP_NAME) - private String appName = "VrChat"; + 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_BUILD_VERSION_TAG = "buildVersionTag"; - @SerializedName(SERIALIZED_NAME_BUILD_VERSION_TAG) - private String buildVersionTag; + 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_DEPLOYMENT_GROUP = "deploymentGroup"; - @SerializedName(SERIALIZED_NAME_DEPLOYMENT_GROUP) - private DeploymentGroup deploymentGroup = DeploymentGroup.BLUE; - - public static final String SERIALIZED_NAME_DEV_APP_VERSION_STANDALONE = "devAppVersionStandalone"; - @SerializedName(SERIALIZED_NAME_DEV_APP_VERSION_STANDALONE) - private String devAppVersionStandalone; + 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_DOWNLOAD_LINK_WINDOWS = "devDownloadLinkWindows"; - @SerializedName(SERIALIZED_NAME_DEV_DOWNLOAD_LINK_WINDOWS) - private String devDownloadLinkWindows; + public static final String SERIALIZED_NAME_DEV_LANGUAGE_CODES = "devLanguageCodes"; + @SerializedName(SERIALIZED_NAME_DEV_LANGUAGE_CODES) + @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_DEV_SERVER_VERSION_STANDALONE = "devServerVersionStandalone"; - @SerializedName(SERIALIZED_NAME_DEV_SERVER_VERSION_STANDALONE) - private String devServerVersionStandalone; - 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) - private DownloadURLList downloadUrls; + @javax.annotation.Nonnull + private APIConfigDownloadURLList downloadUrls; public static final String SERIALIZED_NAME_DYNAMIC_WORLD_ROWS = "dynamicWorldRows"; @SerializedName(SERIALIZED_NAME_DYNAMIC_WORLD_ROWS) - private Set dynamicWorldRows = new LinkedHashSet(); + @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) - private APIEventConfig 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_GEAR_DEMO_ROOM_ID = "gearDemoRoomId"; - @SerializedName(SERIALIZED_NAME_GEAR_DEMO_ROOM_ID) - private String gearDemoRoomId; + 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_MESSAGE_OF_THE_DAY = "messageOfTheDay"; - @SerializedName(SERIALIZED_NAME_MESSAGE_OF_THE_DAY) - private String messageOfTheDay; + 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_MODERATION_QUERY_PERIOD = "moderationQueryPeriod"; - @SerializedName(SERIALIZED_NAME_MODERATION_QUERY_PERIOD) - private Integer moderationQueryPeriod; - 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_PLUGIN = "plugin"; - @SerializedName(SERIALIZED_NAME_PLUGIN) - private String plugin; + 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_RELEASE_APP_VERSION_STANDALONE = "releaseAppVersionStandalone"; - @SerializedName(SERIALIZED_NAME_RELEASE_APP_VERSION_STANDALONE) - private String releaseAppVersionStandalone; + 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_RELEASE_SDK_URL = "releaseSdkUrl"; - @SerializedName(SERIALIZED_NAME_RELEASE_SDK_URL) - private String releaseSdkUrl; + 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_RELEASE_SDK_VERSION = "releaseSdkVersion"; - @SerializedName(SERIALIZED_NAME_RELEASE_SDK_VERSION) - private String releaseSdkVersion; + 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_RELEASE_SERVER_VERSION_STANDALONE = "releaseServerVersionStandalone"; - @SerializedName(SERIALIZED_NAME_RELEASE_SERVER_VERSION_STANDALONE) - private String releaseServerVersionStandalone; + 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_SERVER_NAME = "serverName"; - @SerializedName(SERIALIZED_NAME_SERVER_NAME) - private String serverName; + 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) - private List urlList = new ArrayList(); + @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_USER_UPDATE_PERIOD = "userUpdatePeriod"; - @SerializedName(SERIALIZED_NAME_USER_UPDATE_PERIOD) - private Integer userUpdatePeriod; - - public static final String SERIALIZED_NAME_USER_VERIFICATION_DELAY = "userVerificationDelay"; - @SerializedName(SERIALIZED_NAME_USER_VERIFICATION_DELAY) - private Integer userVerificationDelay; - - public static final String SERIALIZED_NAME_USER_VERIFICATION_RETRY = "userVerificationRetry"; - @SerializedName(SERIALIZED_NAME_USER_VERIFICATION_RETRY) - private Integer userVerificationRetry; - - public static final String SERIALIZED_NAME_USER_VERIFICATION_TIMEOUT = "userVerificationTimeout"; - @SerializedName(SERIALIZED_NAME_USER_VERIFICATION_TIMEOUT) - private Integer userVerificationTimeout; - 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) - private List whiteListedAssetUrls = new ArrayList(); + @javax.annotation.Nonnull + private List whiteListedAssetUrls = new ArrayList<>(); + + public APIConfig() { + } + + 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 + public String getCampaignStatus() { + return campaignStatus; + } + + public void setCampaignStatus(@javax.annotation.Nonnull String campaignStatus) { + this.campaignStatus = campaignStatus; + } + + + 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 + public Boolean getDisableBackgroundPreloads() { + return disableBackgroundPreloads; + } + + public void setDisableBackgroundPreloads(@javax.annotation.Nonnull Boolean disableBackgroundPreloads) { + this.disableBackgroundPreloads = disableBackgroundPreloads; + } + - public static final String SERIALIZED_NAME_WORLD_UPDATE_PERIOD = "worldUpdatePeriod"; - @SerializedName(SERIALIZED_NAME_WORLD_UPDATE_PERIOD) - private Integer worldUpdatePeriod; + public APIConfig locationGiftingNonSubPrioEnabled(@javax.annotation.Nonnull Boolean locationGiftingNonSubPrioEnabled) { + this.locationGiftingNonSubPrioEnabled = locationGiftingNonSubPrioEnabled; + return this; + } - public static final String SERIALIZED_NAME_YOUTUBEDL_HASH = "youtubedl-hash"; - @SerializedName(SERIALIZED_NAME_YOUTUBEDL_HASH) - private String youtubedlHash; + /** + * Toggles whether users without a current VRC+ subscription are priority recipients for gift drops + * @return locationGiftingNonSubPrioEnabled + */ + @javax.annotation.Nonnull + public Boolean getLocationGiftingNonSubPrioEnabled() { + return locationGiftingNonSubPrioEnabled; + } - public static final String SERIALIZED_NAME_YOUTUBEDL_VERSION = "youtubedl-version"; - @SerializedName(SERIALIZED_NAME_YOUTUBEDL_VERSION) - private String youtubedlVersion; + 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 address(String address) { - + public APIConfig accessLogsUrls(@javax.annotation.Nonnull APIConfigAccessLogsUrls accessLogsUrls) { + this.accessLogsUrls = accessLogsUrls; + return this; + } + + /** + * Get accessLogsUrls + * @return accessLogsUrls + */ + @javax.annotation.Nonnull + public APIConfigAccessLogsUrls getAccessLogsUrls() { + return accessLogsUrls; + } + + public void setAccessLogsUrls(@javax.annotation.Nonnull APIConfigAccessLogsUrls accessLogsUrls) { + this.accessLogsUrls = accessLogsUrls; + } + + + 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 announcements(Set announcements) { - - this.announcements = announcements; - return this; - } - - public APIConfig addAnnouncementsItem(PublicAnnouncement announcementsItem) { - this.announcements.add(announcementsItem); + public APIConfig ageVerificationInviteVisible(@javax.annotation.Nonnull Boolean ageVerificationInviteVisible) { + this.ageVerificationInviteVisible = ageVerificationInviteVisible; return this; } - /** - * Public Announcements - * @return announcements - **/ + /** + * Get ageVerificationInviteVisible + * @return ageVerificationInviteVisible + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Public Announcements") - - public Set getAnnouncements() { - return announcements; + public Boolean getAgeVerificationInviteVisible() { + return ageVerificationInviteVisible; } - - public void setAnnouncements(Set announcements) { - this.announcements = announcements; + public void setAgeVerificationInviteVisible(@javax.annotation.Nonnull Boolean ageVerificationInviteVisible) { + this.ageVerificationInviteVisible = ageVerificationInviteVisible; } - public APIConfig apiKey(String apiKey) { - - this.apiKey = apiKey; + public APIConfig ageVerificationP(@javax.annotation.Nonnull Boolean ageVerificationP) { + this.ageVerificationP = ageVerificationP; return this; } - /** - * apiKey to be used for all other requests - * @return apiKey - **/ + /** + * Get ageVerificationP + * @return ageVerificationP + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "apiKey to be used for all other requests") - - public String getApiKey() { - return apiKey; + public Boolean getAgeVerificationP() { + return ageVerificationP; } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; + public void setAgeVerificationP(@javax.annotation.Nonnull Boolean ageVerificationP) { + this.ageVerificationP = ageVerificationP; } - public APIConfig appName(String appName) { - - this.appName = appName; + public APIConfig ageVerificationStatusVisible(@javax.annotation.Nonnull Boolean ageVerificationStatusVisible) { + this.ageVerificationStatusVisible = ageVerificationStatusVisible; return this; } - /** - * Game name - * @return appName - * @deprecated - **/ - @Deprecated + /** + * Get ageVerificationStatusVisible + * @return ageVerificationStatusVisible + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Game name") - - public String getAppName() { - return appName; + public Boolean getAgeVerificationStatusVisible() { + return ageVerificationStatusVisible; } - - public void setAppName(String appName) { - this.appName = appName; + public void setAgeVerificationStatusVisible(@javax.annotation.Nonnull Boolean ageVerificationStatusVisible) { + this.ageVerificationStatusVisible = ageVerificationStatusVisible; } - public APIConfig buildVersionTag(String buildVersionTag) { - - this.buildVersionTag = buildVersionTag; + public APIConfig analysisMaxRetries(@javax.annotation.Nonnull Integer analysisMaxRetries) { + this.analysisMaxRetries = analysisMaxRetries; return this; } - /** - * Build tag of the API server - * @return buildVersionTag - **/ + /** + * Max retries for avatar analysis requests + * @return analysisMaxRetries + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Build tag of the API server") - - public String getBuildVersionTag() { - return buildVersionTag; + public Integer getAnalysisMaxRetries() { + return analysisMaxRetries; } - - public void setBuildVersionTag(String buildVersionTag) { - this.buildVersionTag = buildVersionTag; + public void setAnalysisMaxRetries(@javax.annotation.Nonnull Integer analysisMaxRetries) { + this.analysisMaxRetries = analysisMaxRetries; } - public APIConfig clientApiKey(String clientApiKey) { - - this.clientApiKey = clientApiKey; + public APIConfig analysisRetryInterval(@javax.annotation.Nonnull Integer analysisRetryInterval) { + this.analysisRetryInterval = analysisRetryInterval; return this; } - /** - * apiKey to be used for all other requests - * @return clientApiKey - **/ + /** + * Interval between retries for avatar analysis requests + * @return analysisRetryInterval + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "apiKey to be used for all other requests") - - public String getClientApiKey() { - return clientApiKey; + public Integer getAnalysisRetryInterval() { + return analysisRetryInterval; } - - public void setClientApiKey(String clientApiKey) { - this.clientApiKey = clientApiKey; + public void setAnalysisRetryInterval(@javax.annotation.Nonnull Integer analysisRetryInterval) { + this.analysisRetryInterval = analysisRetryInterval; } - public APIConfig clientBPSCeiling(Integer clientBPSCeiling) { - - this.clientBPSCeiling = clientBPSCeiling; + public APIConfig analyticsSegmentNewUIPctOfUsers(@javax.annotation.Nonnull Integer analyticsSegmentNewUIPctOfUsers) { + this.analyticsSegmentNewUIPctOfUsers = analyticsSegmentNewUIPctOfUsers; return this; } - /** + /** * Unknown - * @return clientBPSCeiling - **/ + * @return analyticsSegmentNewUIPctOfUsers + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getClientBPSCeiling() { - return clientBPSCeiling; + public Integer getAnalyticsSegmentNewUIPctOfUsers() { + return analyticsSegmentNewUIPctOfUsers; } - - public void setClientBPSCeiling(Integer clientBPSCeiling) { - this.clientBPSCeiling = clientBPSCeiling; + public void setAnalyticsSegmentNewUIPctOfUsers(@javax.annotation.Nonnull Integer analyticsSegmentNewUIPctOfUsers) { + this.analyticsSegmentNewUIPctOfUsers = analyticsSegmentNewUIPctOfUsers; } - public APIConfig clientDisconnectTimeout(Integer clientDisconnectTimeout) { - - this.clientDisconnectTimeout = clientDisconnectTimeout; + public APIConfig analyticsSegmentNewUISalt(@javax.annotation.Nonnull String analyticsSegmentNewUISalt) { + this.analyticsSegmentNewUISalt = analyticsSegmentNewUISalt; return this; } - /** + /** * Unknown - * @return clientDisconnectTimeout - **/ + * @return analyticsSegmentNewUISalt + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") + public String getAnalyticsSegmentNewUISalt() { + return analyticsSegmentNewUISalt; + } - public Integer getClientDisconnectTimeout() { - return clientDisconnectTimeout; + public void setAnalyticsSegmentNewUISalt(@javax.annotation.Nonnull String analyticsSegmentNewUISalt) { + this.analyticsSegmentNewUISalt = analyticsSegmentNewUISalt; } - public void setClientDisconnectTimeout(Integer clientDisconnectTimeout) { - this.clientDisconnectTimeout = clientDisconnectTimeout; + public APIConfig announcements(@javax.annotation.Nonnull Set announcements) { + this.announcements = announcements; + return this; } - - public APIConfig clientReservedPlayerBPS(Integer clientReservedPlayerBPS) { - - this.clientReservedPlayerBPS = clientReservedPlayerBPS; + public APIConfig addAnnouncementsItem(APIConfigAnnouncement announcementsItem) { + if (this.announcements == null) { + this.announcements = new LinkedHashSet<>(); + } + this.announcements.add(announcementsItem); return this; } - /** - * Unknown - * @return clientReservedPlayerBPS - **/ + /** + * Public Announcements + * @return announcements + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getClientReservedPlayerBPS() { - return clientReservedPlayerBPS; + public Set getAnnouncements() { + return announcements; } - - public void setClientReservedPlayerBPS(Integer clientReservedPlayerBPS) { - this.clientReservedPlayerBPS = clientReservedPlayerBPS; + public void setAnnouncements(@javax.annotation.Nonnull Set announcements) { + this.announcements = announcements; } - public APIConfig clientSentCountAllowance(Integer clientSentCountAllowance) { - - this.clientSentCountAllowance = clientSentCountAllowance; + public APIConfig audioConfig(@javax.annotation.Nullable APIConfigAudioConfig audioConfig) { + this.audioConfig = audioConfig; return this; } - /** - * Unknown - * @return clientSentCountAllowance - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") + /** + * Get audioConfig + * @return audioConfig + */ + @javax.annotation.Nullable + public APIConfigAudioConfig getAudioConfig() { + return audioConfig; + } - public Integer getClientSentCountAllowance() { - return clientSentCountAllowance; + public void setAudioConfig(@javax.annotation.Nullable APIConfigAudioConfig audioConfig) { + this.audioConfig = audioConfig; } - public void setClientSentCountAllowance(Integer clientSentCountAllowance) { - this.clientSentCountAllowance = clientSentCountAllowance; + public APIConfig availableLanguageCodes(@javax.annotation.Nonnull List availableLanguageCodes) { + this.availableLanguageCodes = availableLanguageCodes; + return this; } - - public APIConfig contactEmail(String contactEmail) { - - this.contactEmail = contactEmail; + public APIConfig addAvailableLanguageCodesItem(String availableLanguageCodesItem) { + if (this.availableLanguageCodes == null) { + this.availableLanguageCodes = new ArrayList<>(); + } + this.availableLanguageCodes.add(availableLanguageCodesItem); return this; } - /** - * VRChat's contact email - * @return contactEmail - **/ + /** + * List of supported Languages + * @return availableLanguageCodes + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's contact email") + public List getAvailableLanguageCodes() { + return availableLanguageCodes; + } - public String getContactEmail() { - return contactEmail; + public void setAvailableLanguageCodes(@javax.annotation.Nonnull List availableLanguageCodes) { + this.availableLanguageCodes = availableLanguageCodes; } - public void setContactEmail(String contactEmail) { - this.contactEmail = contactEmail; + public APIConfig availableLanguages(@javax.annotation.Nonnull List availableLanguages) { + this.availableLanguages = availableLanguages; + return this; } - - public APIConfig copyrightEmail(String copyrightEmail) { - - this.copyrightEmail = copyrightEmail; + public APIConfig addAvailableLanguagesItem(String availableLanguagesItem) { + if (this.availableLanguages == null) { + this.availableLanguages = new ArrayList<>(); + } + this.availableLanguages.add(availableLanguagesItem); return this; } - /** - * VRChat's copyright-issues-related email - * @return copyrightEmail - **/ + /** + * List of supported Languages + * @return availableLanguages + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's copyright-issues-related email") - - public String getCopyrightEmail() { - return copyrightEmail; + public List getAvailableLanguages() { + return availableLanguages; } - - public void setCopyrightEmail(String copyrightEmail) { - this.copyrightEmail = copyrightEmail; + public void setAvailableLanguages(@javax.annotation.Nonnull List availableLanguages) { + this.availableLanguages = availableLanguages; } - public APIConfig currentTOSVersion(Integer currentTOSVersion) { - - this.currentTOSVersion = currentTOSVersion; + public APIConfig avatarPerfLimiter(@javax.annotation.Nonnull APIConfigAvatarPerfLimiter avatarPerfLimiter) { + this.avatarPerfLimiter = avatarPerfLimiter; return this; } - /** - * Current version number of the Terms of Service - * minimum: 0 - * @return currentTOSVersion - **/ + /** + * Get avatarPerfLimiter + * @return avatarPerfLimiter + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "7", required = true, value = "Current version number of the Terms of Service") - - public Integer getCurrentTOSVersion() { - return currentTOSVersion; + public APIConfigAvatarPerfLimiter getAvatarPerfLimiter() { + return avatarPerfLimiter; } - - public void setCurrentTOSVersion(Integer currentTOSVersion) { - this.currentTOSVersion = currentTOSVersion; + public void setAvatarPerfLimiter(@javax.annotation.Nonnull APIConfigAvatarPerfLimiter avatarPerfLimiter) { + this.avatarPerfLimiter = avatarPerfLimiter; } - public APIConfig defaultAvatar(String defaultAvatar) { - - this.defaultAvatar = defaultAvatar; + public APIConfig chatboxLogBufferSeconds(@javax.annotation.Nonnull Integer chatboxLogBufferSeconds) { + this.chatboxLogBufferSeconds = chatboxLogBufferSeconds; return this; } - /** - * Get defaultAvatar - * @return defaultAvatar - **/ + /** + * Unknown + * @return chatboxLogBufferSeconds + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - - public String getDefaultAvatar() { - return defaultAvatar; + public Integer getChatboxLogBufferSeconds() { + return chatboxLogBufferSeconds; } - - public void setDefaultAvatar(String defaultAvatar) { - this.defaultAvatar = defaultAvatar; + public void setChatboxLogBufferSeconds(@javax.annotation.Nonnull Integer chatboxLogBufferSeconds) { + this.chatboxLogBufferSeconds = chatboxLogBufferSeconds; } - public APIConfig deploymentGroup(DeploymentGroup deploymentGroup) { - - this.deploymentGroup = deploymentGroup; + public APIConfig clientApiKey(@javax.annotation.Nonnull String clientApiKey) { + this.clientApiKey = clientApiKey; return this; } - /** - * Get deploymentGroup - * @return deploymentGroup - **/ + /** + * apiKey to be used for all other requests + * @return clientApiKey + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public DeploymentGroup getDeploymentGroup() { - return deploymentGroup; + public String getClientApiKey() { + return clientApiKey; } - - public void setDeploymentGroup(DeploymentGroup deploymentGroup) { - this.deploymentGroup = deploymentGroup; + public void setClientApiKey(@javax.annotation.Nonnull String clientApiKey) { + this.clientApiKey = clientApiKey; } - public APIConfig devAppVersionStandalone(String devAppVersionStandalone) { - - this.devAppVersionStandalone = devAppVersionStandalone; + public APIConfig clientBPSCeiling(@javax.annotation.Nonnull Integer clientBPSCeiling) { + this.clientBPSCeiling = clientBPSCeiling; return this; } - /** - * Version number for game development build - * @return devAppVersionStandalone - * @deprecated - **/ - @Deprecated + /** + * Unknown + * @return clientBPSCeiling + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Version number for game development build") - - public String getDevAppVersionStandalone() { - return devAppVersionStandalone; + public Integer getClientBPSCeiling() { + return clientBPSCeiling; } - - public void setDevAppVersionStandalone(String devAppVersionStandalone) { - this.devAppVersionStandalone = devAppVersionStandalone; + public void setClientBPSCeiling(@javax.annotation.Nonnull Integer clientBPSCeiling) { + this.clientBPSCeiling = clientBPSCeiling; } - public APIConfig devDownloadLinkWindows(String devDownloadLinkWindows) { - - this.devDownloadLinkWindows = devDownloadLinkWindows; + public APIConfig clientDisconnectTimeout(@javax.annotation.Nonnull Integer clientDisconnectTimeout) { + this.clientDisconnectTimeout = clientDisconnectTimeout; return this; } - /** - * Developer Download link - * @return devDownloadLinkWindows - * @deprecated - **/ - @Deprecated + /** + * Unknown + * @return clientDisconnectTimeout + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Developer Download link") - - public String getDevDownloadLinkWindows() { - return devDownloadLinkWindows; + public Integer getClientDisconnectTimeout() { + return clientDisconnectTimeout; } - - public void setDevDownloadLinkWindows(String devDownloadLinkWindows) { - this.devDownloadLinkWindows = devDownloadLinkWindows; + public void setClientDisconnectTimeout(@javax.annotation.Nonnull Integer clientDisconnectTimeout) { + this.clientDisconnectTimeout = clientDisconnectTimeout; } - public APIConfig devSdkUrl(String devSdkUrl) { - - this.devSdkUrl = devSdkUrl; + public APIConfig clientNetDispatchThread(@javax.annotation.Nullable Boolean clientNetDispatchThread) { + this.clientNetDispatchThread = clientNetDispatchThread; 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; + /** + * Unknown + * @return clientNetDispatchThread + */ + @javax.annotation.Nullable + public Boolean getClientNetDispatchThread() { + return clientNetDispatchThread; } - - public void setDevSdkUrl(String devSdkUrl) { - this.devSdkUrl = devSdkUrl; + public void setClientNetDispatchThread(@javax.annotation.Nullable Boolean clientNetDispatchThread) { + this.clientNetDispatchThread = clientNetDispatchThread; } - public APIConfig devSdkVersion(String devSdkVersion) { - - this.devSdkVersion = devSdkVersion; + public APIConfig clientNetDispatchThreadMobile(@javax.annotation.Nonnull Boolean clientNetDispatchThreadMobile) { + this.clientNetDispatchThreadMobile = clientNetDispatchThreadMobile; return this; } - /** - * Version of the development SDK - * @return devSdkVersion - * @deprecated - **/ - @Deprecated + /** + * Unknown + * @return clientNetDispatchThreadMobile + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Version of the development SDK") - - public String getDevSdkVersion() { - return devSdkVersion; + public Boolean getClientNetDispatchThreadMobile() { + return clientNetDispatchThreadMobile; } - - public void setDevSdkVersion(String devSdkVersion) { - this.devSdkVersion = devSdkVersion; + public void setClientNetDispatchThreadMobile(@javax.annotation.Nonnull Boolean clientNetDispatchThreadMobile) { + this.clientNetDispatchThreadMobile = clientNetDispatchThreadMobile; } - public APIConfig devServerVersionStandalone(String devServerVersionStandalone) { - - this.devServerVersionStandalone = devServerVersionStandalone; + public APIConfig clientNetInThread(@javax.annotation.Nullable Boolean clientNetInThread) { + this.clientNetInThread = clientNetInThread; return this; } - /** - * Version number for server development build - * @return devServerVersionStandalone - * @deprecated - **/ - @Deprecated - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Version number for server development build") - - public String getDevServerVersionStandalone() { - return devServerVersionStandalone; + /** + * Unknown + * @return clientNetInThread + */ + @javax.annotation.Nullable + public Boolean getClientNetInThread() { + return clientNetInThread; } - - public void setDevServerVersionStandalone(String devServerVersionStandalone) { - this.devServerVersionStandalone = devServerVersionStandalone; + public void setClientNetInThread(@javax.annotation.Nullable Boolean clientNetInThread) { + this.clientNetInThread = clientNetInThread; } - public APIConfig disCountdown(OffsetDateTime disCountdown) { - - this.disCountdown = disCountdown; + public APIConfig clientNetInThread2(@javax.annotation.Nullable Boolean clientNetInThread2) { + this.clientNetInThread2 = clientNetInThread2; 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; + /** + * Unknown + * @return clientNetInThread2 + */ + @javax.annotation.Nullable + public Boolean getClientNetInThread2() { + return clientNetInThread2; } - - public void setDisCountdown(OffsetDateTime disCountdown) { - this.disCountdown = disCountdown; + public void setClientNetInThread2(@javax.annotation.Nullable Boolean clientNetInThread2) { + this.clientNetInThread2 = clientNetInThread2; } - public APIConfig disableAvatarCopying(Boolean disableAvatarCopying) { - - this.disableAvatarCopying = disableAvatarCopying; + public APIConfig clientNetInThreadMobile(@javax.annotation.Nullable Boolean clientNetInThreadMobile) { + this.clientNetInThreadMobile = clientNetInThreadMobile; 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; + /** + * Unknown + * @return clientNetInThreadMobile + */ + @javax.annotation.Nullable + public Boolean getClientNetInThreadMobile() { + return clientNetInThreadMobile; } - - public void setDisableAvatarCopying(Boolean disableAvatarCopying) { - this.disableAvatarCopying = disableAvatarCopying; + public void setClientNetInThreadMobile(@javax.annotation.Nullable Boolean clientNetInThreadMobile) { + this.clientNetInThreadMobile = clientNetInThreadMobile; } - public APIConfig disableAvatarGating(Boolean disableAvatarGating) { - - this.disableAvatarGating = disableAvatarGating; + public APIConfig clientNetInThreadMobile2(@javax.annotation.Nullable Boolean clientNetInThreadMobile2) { + this.clientNetInThreadMobile2 = clientNetInThreadMobile2; 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; + /** + * Unknown + * @return clientNetInThreadMobile2 + */ + @javax.annotation.Nullable + public Boolean getClientNetInThreadMobile2() { + return clientNetInThreadMobile2; } - - public void setDisableAvatarGating(Boolean disableAvatarGating) { - this.disableAvatarGating = disableAvatarGating; + public void setClientNetInThreadMobile2(@javax.annotation.Nullable Boolean clientNetInThreadMobile2) { + this.clientNetInThreadMobile2 = clientNetInThreadMobile2; } - public APIConfig disableCommunityLabs(Boolean disableCommunityLabs) { - - this.disableCommunityLabs = disableCommunityLabs; + public APIConfig clientNetOutThread(@javax.annotation.Nullable Boolean clientNetOutThread) { + this.clientNetOutThread = clientNetOutThread; 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; + /** + * Unknown + * @return clientNetOutThread + */ + @javax.annotation.Nullable + public Boolean getClientNetOutThread() { + return clientNetOutThread; } - - public void setDisableCommunityLabs(Boolean disableCommunityLabs) { - this.disableCommunityLabs = disableCommunityLabs; + public void setClientNetOutThread(@javax.annotation.Nullable Boolean clientNetOutThread) { + this.clientNetOutThread = clientNetOutThread; } - public APIConfig disableCommunityLabsPromotion(Boolean disableCommunityLabsPromotion) { - - this.disableCommunityLabsPromotion = disableCommunityLabsPromotion; + public APIConfig clientNetOutThread2(@javax.annotation.Nullable Boolean clientNetOutThread2) { + this.clientNetOutThread2 = clientNetOutThread2; 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; + /** + * Unknown + * @return clientNetOutThread2 + */ + @javax.annotation.Nullable + public Boolean getClientNetOutThread2() { + return clientNetOutThread2; } - - public void setDisableCommunityLabsPromotion(Boolean disableCommunityLabsPromotion) { - this.disableCommunityLabsPromotion = disableCommunityLabsPromotion; + public void setClientNetOutThread2(@javax.annotation.Nullable Boolean clientNetOutThread2) { + this.clientNetOutThread2 = clientNetOutThread2; } - public APIConfig disableEmail(Boolean disableEmail) { - - this.disableEmail = disableEmail; + public APIConfig clientNetOutThreadMobile(@javax.annotation.Nullable Boolean clientNetOutThreadMobile) { + this.clientNetOutThreadMobile = clientNetOutThreadMobile; return this; } - /** + /** * Unknown - * @return disableEmail - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Boolean getDisableEmail() { - return disableEmail; + * @return clientNetOutThreadMobile + */ + @javax.annotation.Nullable + public Boolean getClientNetOutThreadMobile() { + return clientNetOutThreadMobile; } - - public void setDisableEmail(Boolean disableEmail) { - this.disableEmail = disableEmail; + public void setClientNetOutThreadMobile(@javax.annotation.Nullable Boolean clientNetOutThreadMobile) { + this.clientNetOutThreadMobile = clientNetOutThreadMobile; } - public APIConfig disableEventStream(Boolean disableEventStream) { - - this.disableEventStream = disableEventStream; + public APIConfig clientNetOutThreadMobile2(@javax.annotation.Nullable Boolean clientNetOutThreadMobile2) { + this.clientNetOutThreadMobile2 = clientNetOutThreadMobile2; return this; } - /** - * Toggles if Analytics should be disabled. - * @return disableEventStream - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if Analytics should be disabled.") + /** + * Unknown + * @return clientNetOutThreadMobile2 + */ + @javax.annotation.Nullable + public Boolean getClientNetOutThreadMobile2() { + return clientNetOutThreadMobile2; + } - public Boolean getDisableEventStream() { - return disableEventStream; + public void setClientNetOutThreadMobile2(@javax.annotation.Nullable Boolean clientNetOutThreadMobile2) { + this.clientNetOutThreadMobile2 = clientNetOutThreadMobile2; } - public void setDisableEventStream(Boolean disableEventStream) { + public APIConfig clientQR(@javax.annotation.Nullable Integer clientQR) { + this.clientQR = clientQR; + return this; + } + + /** + * Unknown + * @return clientQR + */ + @javax.annotation.Nullable + public Integer getClientQR() { + return clientQR; + } + + public void setClientQR(@javax.annotation.Nullable Integer clientQR) { + this.clientQR = clientQR; + } + + + public APIConfig clientReservedPlayerBPS(@javax.annotation.Nonnull Integer clientReservedPlayerBPS) { + this.clientReservedPlayerBPS = clientReservedPlayerBPS; + return this; + } + + /** + * Unknown + * @return clientReservedPlayerBPS + */ + @javax.annotation.Nonnull + public Integer getClientReservedPlayerBPS() { + return clientReservedPlayerBPS; + } + + public void setClientReservedPlayerBPS(@javax.annotation.Nonnull Integer clientReservedPlayerBPS) { + this.clientReservedPlayerBPS = clientReservedPlayerBPS; + } + + + public APIConfig clientSentCountAllowance(@javax.annotation.Nonnull Integer clientSentCountAllowance) { + this.clientSentCountAllowance = clientSentCountAllowance; + return this; + } + + /** + * Unknown + * @return clientSentCountAllowance + */ + @javax.annotation.Nonnull + public Integer getClientSentCountAllowance() { + return clientSentCountAllowance; + } + + public void setClientSentCountAllowance(@javax.annotation.Nonnull Integer clientSentCountAllowance) { + this.clientSentCountAllowance = clientSentCountAllowance; + } + + + public APIConfig constants(@javax.annotation.Nonnull APIConfigConstants constants) { + this.constants = constants; + return this; + } + + /** + * Get constants + * @return constants + */ + @javax.annotation.Nonnull + public APIConfigConstants getConstants() { + return constants; + } + + public void setConstants(@javax.annotation.Nonnull APIConfigConstants constants) { + this.constants = constants; + } + + + public APIConfig contactEmail(@javax.annotation.Nonnull String contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * VRChat's contact email + * @return contactEmail + */ + @javax.annotation.Nonnull + public String getContactEmail() { + return contactEmail; + } + + public void setContactEmail(@javax.annotation.Nonnull String contactEmail) { + this.contactEmail = contactEmail; + } + + + public APIConfig copyrightEmail(@javax.annotation.Nonnull String copyrightEmail) { + this.copyrightEmail = copyrightEmail; + return this; + } + + /** + * VRChat's copyright-issues-related email + * @return copyrightEmail + */ + @javax.annotation.Nonnull + public String getCopyrightEmail() { + return copyrightEmail; + } + + public void setCopyrightEmail(@javax.annotation.Nonnull String copyrightEmail) { + this.copyrightEmail = copyrightEmail; + } + + + public APIConfig copyrightFormUrl(@javax.annotation.Nonnull String copyrightFormUrl) { + this.copyrightFormUrl = copyrightFormUrl; + return this; + } + + /** + * VRChat's DMCA claim webform url + * @return copyrightFormUrl + */ + @javax.annotation.Nonnull + public String getCopyrightFormUrl() { + return copyrightFormUrl; + } + + public void setCopyrightFormUrl(@javax.annotation.Nonnull String copyrightFormUrl) { + this.copyrightFormUrl = copyrightFormUrl; + } + + + 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 + public Integer getCurrentPrivacyVersion() { + return currentPrivacyVersion; + } + + public void setCurrentPrivacyVersion(@javax.annotation.Nonnull Integer currentPrivacyVersion) { + this.currentPrivacyVersion = currentPrivacyVersion; + } + + + 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 + public Integer getCurrentTOSVersion() { + return currentTOSVersion; + } + + public void setCurrentTOSVersion(@javax.annotation.Nonnull Integer currentTOSVersion) { + this.currentTOSVersion = currentTOSVersion; + } + + + public APIConfig defaultAvatar(@javax.annotation.Nonnull String defaultAvatar) { + this.defaultAvatar = defaultAvatar; + return this; + } + + /** + * Get defaultAvatar + * @return defaultAvatar + */ + @javax.annotation.Nonnull + public String getDefaultAvatar() { + return defaultAvatar; + } + + public void setDefaultAvatar(@javax.annotation.Nonnull String defaultAvatar) { + this.defaultAvatar = defaultAvatar; + } + + + public APIConfig defaultStickerSet(@javax.annotation.Nonnull String defaultStickerSet) { + this.defaultStickerSet = defaultStickerSet; + return this; + } + + /** + * Get defaultStickerSet + * @return defaultStickerSet + */ + @javax.annotation.Nonnull + public String getDefaultStickerSet() { + return defaultStickerSet; + } + + public void setDefaultStickerSet(@javax.annotation.Nonnull String defaultStickerSet) { + this.defaultStickerSet = defaultStickerSet; + } + + + public APIConfig devLanguageCodes(@javax.annotation.Nullable List devLanguageCodes) { + this.devLanguageCodes = devLanguageCodes; + return this; + } + + public APIConfig addDevLanguageCodesItem(String devLanguageCodesItem) { + if (this.devLanguageCodes == null) { + this.devLanguageCodes = new ArrayList<>(); + } + this.devLanguageCodes.add(devLanguageCodesItem); + return this; + } + + /** + * Unknown + * @return devLanguageCodes + */ + @javax.annotation.Nullable + public List getDevLanguageCodes() { + return devLanguageCodes; + } + + public void setDevLanguageCodes(@javax.annotation.Nullable List devLanguageCodes) { + this.devLanguageCodes = devLanguageCodes; + } + + + @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 + public String getDevSdkUrl() { + return devSdkUrl; + } + + @Deprecated + public void setDevSdkUrl(@javax.annotation.Nonnull String devSdkUrl) { + this.devSdkUrl = devSdkUrl; + } + + + @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 + public String getDevSdkVersion() { + return devSdkVersion; + } + + @Deprecated + public void setDevSdkVersion(@javax.annotation.Nonnull String devSdkVersion) { + this.devSdkVersion = devSdkVersion; + } + + + public APIConfig disCountdown(@javax.annotation.Nonnull OffsetDateTime disCountdown) { + this.disCountdown = disCountdown; + return this; + } + + /** + * Unknown, \"dis\" maybe for disconnect? + * @return disCountdown + */ + @javax.annotation.Nonnull + public OffsetDateTime getDisCountdown() { + return disCountdown; + } + + public void setDisCountdown(@javax.annotation.Nonnull OffsetDateTime disCountdown) { + this.disCountdown = disCountdown; + } + + + public APIConfig disableAVProInProton(@javax.annotation.Nullable Boolean disableAVProInProton) { + this.disableAVProInProton = disableAVProInProton; + return this; + } + + /** + * Unknown + * @return disableAVProInProton + */ + @javax.annotation.Nullable + public Boolean getDisableAVProInProton() { + return disableAVProInProton; + } + + public void setDisableAVProInProton(@javax.annotation.Nullable Boolean disableAVProInProton) { + this.disableAVProInProton = disableAVProInProton; + } + + + 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 + public Boolean getDisableAvatarCopying() { + return disableAvatarCopying; + } + + public void setDisableAvatarCopying(@javax.annotation.Nonnull Boolean disableAvatarCopying) { + this.disableAvatarCopying = disableAvatarCopying; + } + + + 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 + public Boolean getDisableAvatarGating() { + return disableAvatarGating; + } + + public void setDisableAvatarGating(@javax.annotation.Nonnull Boolean disableAvatarGating) { + this.disableAvatarGating = disableAvatarGating; + } + + + public APIConfig disableCaptcha(@javax.annotation.Nullable Boolean disableCaptcha) { + this.disableCaptcha = disableCaptcha; + return this; + } + + /** + * Unknown + * @return disableCaptcha + */ + @javax.annotation.Nullable + public Boolean getDisableCaptcha() { + return disableCaptcha; + } + + public void setDisableCaptcha(@javax.annotation.Nullable Boolean disableCaptcha) { + this.disableCaptcha = disableCaptcha; + } + + + 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 + public Boolean getDisableCommunityLabs() { + return disableCommunityLabs; + } + + public void setDisableCommunityLabs(@javax.annotation.Nonnull Boolean disableCommunityLabs) { + this.disableCommunityLabs = disableCommunityLabs; + } + + + 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 + public Boolean getDisableCommunityLabsPromotion() { + return disableCommunityLabsPromotion; + } + + public void setDisableCommunityLabsPromotion(@javax.annotation.Nonnull Boolean disableCommunityLabsPromotion) { + this.disableCommunityLabsPromotion = disableCommunityLabsPromotion; + } + + + public APIConfig disableEmail(@javax.annotation.Nonnull Boolean disableEmail) { + this.disableEmail = disableEmail; + return this; + } + + /** + * Unknown + * @return disableEmail + */ + @javax.annotation.Nonnull + public Boolean getDisableEmail() { + return disableEmail; + } + + public void setDisableEmail(@javax.annotation.Nonnull Boolean disableEmail) { + this.disableEmail = disableEmail; + } + + + public APIConfig disableEventStream(@javax.annotation.Nonnull Boolean disableEventStream) { this.disableEventStream = disableEventStream; + return this; + } + + /** + * Toggles if Analytics should be disabled. + * @return disableEventStream + */ + @javax.annotation.Nonnull + public Boolean getDisableEventStream() { + return disableEventStream; + } + + public void setDisableEventStream(@javax.annotation.Nonnull Boolean disableEventStream) { + this.disableEventStream = disableEventStream; + } + + + 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 + public Boolean getDisableFeedbackGating() { + return disableFeedbackGating; + } + + public void setDisableFeedbackGating(@javax.annotation.Nonnull Boolean disableFeedbackGating) { + this.disableFeedbackGating = disableFeedbackGating; + } + + + 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 + public Boolean getDisableFrontendBuilds() { + return disableFrontendBuilds; + } + + public void setDisableFrontendBuilds(@javax.annotation.Nonnull Boolean disableFrontendBuilds) { + this.disableFrontendBuilds = disableFrontendBuilds; + } + + + 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 + public Boolean getDisableGiftDrops() { + return disableGiftDrops; + } + + public void setDisableGiftDrops(@javax.annotation.Nonnull Boolean disableGiftDrops) { + this.disableGiftDrops = disableGiftDrops; + } + + + public APIConfig disableHello(@javax.annotation.Nonnull Boolean disableHello) { + this.disableHello = disableHello; + return this; + } + + /** + * Unknown + * @return disableHello + */ + @javax.annotation.Nonnull + public Boolean getDisableHello() { + return disableHello; + } + + public void setDisableHello(@javax.annotation.Nonnull Boolean disableHello) { + this.disableHello = disableHello; + } + + + 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 + public Boolean getDisableOculusSubs() { + return disableOculusSubs; + } + + public void setDisableOculusSubs(@javax.annotation.Nonnull Boolean disableOculusSubs) { + this.disableOculusSubs = disableOculusSubs; + } + + + 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 + public Boolean getDisableRegistration() { + return disableRegistration; + } + + public void setDisableRegistration(@javax.annotation.Nonnull Boolean disableRegistration) { + this.disableRegistration = disableRegistration; + } + + + 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 + public Boolean getDisableSteamNetworking() { + return disableSteamNetworking; + } + + public void setDisableSteamNetworking(@javax.annotation.Nonnull Boolean disableSteamNetworking) { + this.disableSteamNetworking = disableSteamNetworking; + } + + + @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 + public Boolean getDisableTwoFactorAuth() { + return disableTwoFactorAuth; + } + + @Deprecated + public void setDisableTwoFactorAuth(@javax.annotation.Nonnull Boolean disableTwoFactorAuth) { + this.disableTwoFactorAuth = disableTwoFactorAuth; + } + + + 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 + public Boolean getDisableUdon() { + return disableUdon; + } + + public void setDisableUdon(@javax.annotation.Nonnull Boolean disableUdon) { + this.disableUdon = disableUdon; + } + + + 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 + public Boolean getDisableUpgradeAccount() { + return disableUpgradeAccount; + } + + public void setDisableUpgradeAccount(@javax.annotation.Nonnull Boolean disableUpgradeAccount) { + this.disableUpgradeAccount = disableUpgradeAccount; + } + + + 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 + public String getDownloadLinkWindows() { + return downloadLinkWindows; + } + + public void setDownloadLinkWindows(@javax.annotation.Nonnull String downloadLinkWindows) { + this.downloadLinkWindows = downloadLinkWindows; + } + + + public APIConfig downloadUrls(@javax.annotation.Nonnull APIConfigDownloadURLList downloadUrls) { + this.downloadUrls = downloadUrls; + return this; + } + + /** + * Get downloadUrls + * @return downloadUrls + */ + @javax.annotation.Nonnull + public APIConfigDownloadURLList getDownloadUrls() { + return downloadUrls; + } + + public void setDownloadUrls(@javax.annotation.Nonnull APIConfigDownloadURLList downloadUrls) { + this.downloadUrls = downloadUrls; + } + + + 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 + public Set getDynamicWorldRows() { + return dynamicWorldRows; + } + + public void setDynamicWorldRows(@javax.annotation.Nonnull Set dynamicWorldRows) { + this.dynamicWorldRows = dynamicWorldRows; + } + + + public APIConfig economyLedgerBackfill(@javax.annotation.Nonnull Boolean economyLedgerBackfill) { + this.economyLedgerBackfill = economyLedgerBackfill; + return this; + } + + /** + * Unknown + * @return economyLedgerBackfill + */ + @javax.annotation.Nonnull + public Boolean getEconomyLedgerBackfill() { + return economyLedgerBackfill; + } + + public void setEconomyLedgerBackfill(@javax.annotation.Nonnull Boolean economyLedgerBackfill) { + this.economyLedgerBackfill = economyLedgerBackfill; + } + + + public APIConfig economyLedgerMigrationStop(@javax.annotation.Nonnull String economyLedgerMigrationStop) { + this.economyLedgerMigrationStop = economyLedgerMigrationStop; + return this; + } + + /** + * Unknown + * @return economyLedgerMigrationStop + */ + @javax.annotation.Nonnull + public String getEconomyLedgerMigrationStop() { + return economyLedgerMigrationStop; + } + + public void setEconomyLedgerMigrationStop(@javax.annotation.Nonnull String economyLedgerMigrationStop) { + this.economyLedgerMigrationStop = economyLedgerMigrationStop; + } + + + public APIConfig economyLedgerMode(@javax.annotation.Nonnull String economyLedgerMode) { + this.economyLedgerMode = economyLedgerMode; + return this; + } + + /** + * Unknown + * @return economyLedgerMode + */ + @javax.annotation.Nonnull + public String getEconomyLedgerMode() { + return economyLedgerMode; + } + + public void setEconomyLedgerMode(@javax.annotation.Nonnull String economyLedgerMode) { + this.economyLedgerMode = economyLedgerMode; + } + + + public APIConfig economyPauseEnd(@javax.annotation.Nonnull OffsetDateTime economyPauseEnd) { + this.economyPauseEnd = economyPauseEnd; + return this; + } + + /** + * Unknown + * @return economyPauseEnd + */ + @javax.annotation.Nonnull + public OffsetDateTime getEconomyPauseEnd() { + return economyPauseEnd; + } + + public void setEconomyPauseEnd(@javax.annotation.Nonnull OffsetDateTime economyPauseEnd) { + this.economyPauseEnd = economyPauseEnd; } - public APIConfig disableFeedbackGating(Boolean disableFeedbackGating) { - - this.disableFeedbackGating = disableFeedbackGating; + public APIConfig economyPauseStart(@javax.annotation.Nonnull OffsetDateTime economyPauseStart) { + this.economyPauseStart = economyPauseStart; 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 - **/ + /** + * Unknown + * @return economyPauseStart + */ @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 OffsetDateTime getEconomyPauseStart() { + return economyPauseStart; } - - public void setDisableFeedbackGating(Boolean disableFeedbackGating) { - this.disableFeedbackGating = disableFeedbackGating; + public void setEconomyPauseStart(@javax.annotation.Nonnull OffsetDateTime economyPauseStart) { + this.economyPauseStart = economyPauseStart; } - public APIConfig disableFrontendBuilds(Boolean disableFrontendBuilds) { - - this.disableFrontendBuilds = disableFrontendBuilds; + public APIConfig economyPurchaseRepairEnabled(@javax.annotation.Nonnull Boolean economyPurchaseRepairEnabled) { + this.economyPurchaseRepairEnabled = economyPurchaseRepairEnabled; return this; } - /** - * Unknown, probably toggles compilation of frontend web builds? So internal flag? - * @return disableFrontendBuilds - **/ + /** + * Unknown + * @return economyPurchaseRepairEnabled + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown, probably toggles compilation of frontend web builds? So internal flag?") - - public Boolean getDisableFrontendBuilds() { - return disableFrontendBuilds; + public Boolean getEconomyPurchaseRepairEnabled() { + return economyPurchaseRepairEnabled; } - - public void setDisableFrontendBuilds(Boolean disableFrontendBuilds) { - this.disableFrontendBuilds = disableFrontendBuilds; + public void setEconomyPurchaseRepairEnabled(@javax.annotation.Nonnull Boolean economyPurchaseRepairEnabled) { + this.economyPurchaseRepairEnabled = economyPurchaseRepairEnabled; } - public APIConfig disableHello(Boolean disableHello) { - - this.disableHello = disableHello; + public APIConfig economyState(@javax.annotation.Nonnull Integer economyState) { + this.economyState = economyState; return this; } - /** + /** * Unknown - * @return disableHello - **/ + * @return economyState + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Boolean getDisableHello() { - return disableHello; + public Integer getEconomyState() { + return economyState; } - - public void setDisableHello(Boolean disableHello) { - this.disableHello = disableHello; + public void setEconomyState(@javax.annotation.Nonnull Integer economyState) { + this.economyState = economyState; } - public APIConfig disableOculusSubs(Boolean disableOculusSubs) { - - this.disableOculusSubs = disableOculusSubs; + public APIConfig events(@javax.annotation.Nonnull APIConfigEvents events) { + this.events = events; return this; } - /** - * Toggles if signing up for Subscriptions in Oculus is disabled or not. - * @return disableOculusSubs - **/ + /** + * Get events + * @return events + */ @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 APIConfigEvents getEvents() { + return events; } - - public void setDisableOculusSubs(Boolean disableOculusSubs) { - this.disableOculusSubs = disableOculusSubs; + public void setEvents(@javax.annotation.Nonnull APIConfigEvents events) { + this.events = events; } - public APIConfig disableRegistration(Boolean disableRegistration) { - - this.disableRegistration = disableRegistration; + public APIConfig forceUseLatestWorld(@javax.annotation.Nonnull Boolean forceUseLatestWorld) { + this.forceUseLatestWorld = forceUseLatestWorld; return this; } - /** - * Toggles if new user account registration should be disabled. - * @return disableRegistration - **/ + /** + * Unknown + * @return forceUseLatestWorld + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if new user account registration should be disabled.") - - public Boolean getDisableRegistration() { - return disableRegistration; + public Boolean getForceUseLatestWorld() { + return forceUseLatestWorld; } - - public void setDisableRegistration(Boolean disableRegistration) { - this.disableRegistration = disableRegistration; + public void setForceUseLatestWorld(@javax.annotation.Nonnull Boolean forceUseLatestWorld) { + this.forceUseLatestWorld = forceUseLatestWorld; } - public APIConfig disableSteamNetworking(Boolean disableSteamNetworking) { - - this.disableSteamNetworking = disableSteamNetworking; + public APIConfig giftDisplayType(@javax.annotation.Nonnull String giftDisplayType) { + this.giftDisplayType = giftDisplayType; return this; } - /** - * Toggles if Steam Networking should be disabled. VRChat these days uses Photon Unity Networking (PUN) instead. - * @return disableSteamNetworking - **/ + /** + * Display type of gifts + * @return giftDisplayType + */ @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 String getGiftDisplayType() { + return giftDisplayType; } - - public void setDisableSteamNetworking(Boolean disableSteamNetworking) { - this.disableSteamNetworking = disableSteamNetworking; + public void setGiftDisplayType(@javax.annotation.Nonnull String giftDisplayType) { + this.giftDisplayType = giftDisplayType; } - public APIConfig disableTwoFactorAuth(Boolean disableTwoFactorAuth) { - - this.disableTwoFactorAuth = disableTwoFactorAuth; + public APIConfig googleApiClientId(@javax.annotation.Nonnull String googleApiClientId) { + this.googleApiClientId = googleApiClientId; return this; } - /** - * Toggles if 2FA should be disabled. - * @return disableTwoFactorAuth - * @deprecated - **/ - @Deprecated + /** + * Unknown + * @return googleApiClientId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if 2FA should be disabled.") - - public Boolean getDisableTwoFactorAuth() { - return disableTwoFactorAuth; + public String getGoogleApiClientId() { + return googleApiClientId; } - - public void setDisableTwoFactorAuth(Boolean disableTwoFactorAuth) { - this.disableTwoFactorAuth = disableTwoFactorAuth; + public void setGoogleApiClientId(@javax.annotation.Nonnull String googleApiClientId) { + this.googleApiClientId = googleApiClientId; } - public APIConfig disableUdon(Boolean disableUdon) { - - this.disableUdon = disableUdon; + public APIConfig homeWorldId(@javax.annotation.Nonnull String homeWorldId) { + this.homeWorldId = homeWorldId; return this; } - /** - * Toggles if Udon should be universally disabled in-game. - * @return disableUdon - **/ + /** + * WorldID be \"offline\" on User profiles if you are not friends with that user. + * @return homeWorldId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if Udon should be universally disabled in-game.") - - public Boolean getDisableUdon() { - return disableUdon; + public String getHomeWorldId() { + return homeWorldId; } - - public void setDisableUdon(Boolean disableUdon) { - this.disableUdon = disableUdon; + public void setHomeWorldId(@javax.annotation.Nonnull String homeWorldId) { + this.homeWorldId = homeWorldId; } - public APIConfig disableUpgradeAccount(Boolean disableUpgradeAccount) { - - this.disableUpgradeAccount = disableUpgradeAccount; + public APIConfig homepageRedirectTarget(@javax.annotation.Nonnull String homepageRedirectTarget) { + this.homepageRedirectTarget = homepageRedirectTarget; return this; } - /** - * Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled. - * @return disableUpgradeAccount - **/ + /** + * Redirect target if you try to open the base API domain in your browser + * @return homepageRedirectTarget + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Toggles if account upgrading \"linking with Steam/Oculus\" should be disabled.") - - public Boolean getDisableUpgradeAccount() { - return disableUpgradeAccount; + public String getHomepageRedirectTarget() { + return homepageRedirectTarget; } - - public void setDisableUpgradeAccount(Boolean disableUpgradeAccount) { - this.disableUpgradeAccount = disableUpgradeAccount; + public void setHomepageRedirectTarget(@javax.annotation.Nonnull String homepageRedirectTarget) { + this.homepageRedirectTarget = homepageRedirectTarget; } - public APIConfig downloadLinkWindows(String downloadLinkWindows) { - - this.downloadLinkWindows = downloadLinkWindows; + public APIConfig hubWorldId(@javax.annotation.Nonnull String hubWorldId) { + this.hubWorldId = hubWorldId; return this; } - /** - * Download link for game on the Oculus Rift website. - * @return downloadLinkWindows - **/ + /** + * WorldID be \"offline\" on User profiles if you are not friends with that user. + * @return hubWorldId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for game on the Oculus Rift website.") + public String getHubWorldId() { + return hubWorldId; + } - public String getDownloadLinkWindows() { - return downloadLinkWindows; + public void setHubWorldId(@javax.annotation.Nonnull String hubWorldId) { + this.hubWorldId = hubWorldId; } - public void setDownloadLinkWindows(String downloadLinkWindows) { - this.downloadLinkWindows = downloadLinkWindows; + public APIConfig imageHostUrlList(@javax.annotation.Nonnull List imageHostUrlList) { + this.imageHostUrlList = imageHostUrlList; + return this; } - - public APIConfig downloadUrls(DownloadURLList downloadUrls) { - - this.downloadUrls = downloadUrls; + public APIConfig addImageHostUrlListItem(String imageHostUrlListItem) { + if (this.imageHostUrlList == null) { + this.imageHostUrlList = new ArrayList<>(); + } + this.imageHostUrlList.add(imageHostUrlListItem); return this; } - /** - * Get downloadUrls - * @return downloadUrls - **/ + /** + * 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 = "") - - public DownloadURLList getDownloadUrls() { - return downloadUrls; + public List getImageHostUrlList() { + return imageHostUrlList; } - - public void setDownloadUrls(DownloadURLList downloadUrls) { - this.downloadUrls = downloadUrls; + public void setImageHostUrlList(@javax.annotation.Nonnull List imageHostUrlList) { + this.imageHostUrlList = imageHostUrlList; } - public APIConfig dynamicWorldRows(Set dynamicWorldRows) { - - this.dynamicWorldRows = dynamicWorldRows; + public APIConfig iosAppVersion(@javax.annotation.Nonnull List iosAppVersion) { + this.iosAppVersion = iosAppVersion; return this; } - public APIConfig addDynamicWorldRowsItem(DynamicContentRow dynamicWorldRowsItem) { - this.dynamicWorldRows.add(dynamicWorldRowsItem); + public APIConfig addIosAppVersionItem(String iosAppVersionItem) { + if (this.iosAppVersion == null) { + this.iosAppVersion = new ArrayList<>(); + } + this.iosAppVersion.add(iosAppVersionItem); return this; } - /** - * Array of DynamicWorldRow objects, used by the game to display the list of world rows - * @return dynamicWorldRows - **/ + /** + * Current app version for iOS + * @return iosAppVersion + */ @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 List getIosAppVersion() { + return iosAppVersion; } - - public void setDynamicWorldRows(Set dynamicWorldRows) { - this.dynamicWorldRows = dynamicWorldRows; + public void setIosAppVersion(@javax.annotation.Nonnull List iosAppVersion) { + this.iosAppVersion = iosAppVersion; } - public APIConfig events(APIEventConfig events) { - - this.events = events; + public APIConfig iosVersion(@javax.annotation.Nonnull APIConfigIosVersion iosVersion) { + this.iosVersion = iosVersion; return this; } - /** - * Get events - * @return events - **/ + /** + * Get iosVersion + * @return iosVersion + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public APIConfigIosVersion getIosVersion() { + return iosVersion; + } - public APIEventConfig getEvents() { - return events; + public void setIosVersion(@javax.annotation.Nonnull APIConfigIosVersion iosVersion) { + this.iosVersion = iosVersion; } - public void setEvents(APIEventConfig events) { - this.events = events; + public APIConfig jobsEmail(@javax.annotation.Nonnull String jobsEmail) { + this.jobsEmail = jobsEmail; + return this; + } + + /** + * VRChat's job application email + * @return jobsEmail + */ + @javax.annotation.Nonnull + public String getJobsEmail() { + return jobsEmail; + } + + public void setJobsEmail(@javax.annotation.Nonnull String jobsEmail) { + this.jobsEmail = jobsEmail; } - public APIConfig gearDemoRoomId(String gearDemoRoomId) { - - this.gearDemoRoomId = gearDemoRoomId; + public APIConfig maxUserEmoji(@javax.annotation.Nonnull Integer maxUserEmoji) { + this.maxUserEmoji = maxUserEmoji; return this; } - /** - * Unknown - * @return gearDemoRoomId - * @deprecated - **/ - @Deprecated + /** + * The maximum number of custom emoji each user may have at a given time. + * @return maxUserEmoji + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") + public Integer getMaxUserEmoji() { + return maxUserEmoji; + } + + public void setMaxUserEmoji(@javax.annotation.Nonnull Integer maxUserEmoji) { + this.maxUserEmoji = maxUserEmoji; + } + - public String getGearDemoRoomId() { - return gearDemoRoomId; + 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 + public Integer getMaxUserStickers() { + return maxUserStickers; + } - public void setGearDemoRoomId(String gearDemoRoomId) { - this.gearDemoRoomId = gearDemoRoomId; + public void setMaxUserStickers(@javax.annotation.Nonnull Integer maxUserStickers) { + this.maxUserStickers = maxUserStickers; } - public APIConfig homeWorldId(String homeWorldId) { - - this.homeWorldId = homeWorldId; + public APIConfig minSupportedClientBuildNumber(@javax.annotation.Nonnull APIConfigMinSupportedClientBuildNumber minSupportedClientBuildNumber) { + this.minSupportedClientBuildNumber = minSupportedClientBuildNumber; return this; } - /** - * WorldID be \"offline\" on User profiles if you are not friends with that user. - * @return homeWorldId - **/ + /** + * Get minSupportedClientBuildNumber + * @return minSupportedClientBuildNumber + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_ba913a96-fac4-4048-a062-9aa5db092812", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") + public APIConfigMinSupportedClientBuildNumber getMinSupportedClientBuildNumber() { + return minSupportedClientBuildNumber; + } - public String getHomeWorldId() { - return homeWorldId; + public void setMinSupportedClientBuildNumber(@javax.annotation.Nonnull APIConfigMinSupportedClientBuildNumber minSupportedClientBuildNumber) { + this.minSupportedClientBuildNumber = minSupportedClientBuildNumber; } - public void setHomeWorldId(String homeWorldId) { - this.homeWorldId = homeWorldId; + 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 + public String getMinimumUnityVersionForUploads() { + return minimumUnityVersionForUploads; } + public void setMinimumUnityVersionForUploads(@javax.annotation.Nonnull String minimumUnityVersionForUploads) { + this.minimumUnityVersionForUploads = minimumUnityVersionForUploads; + } - public APIConfig homepageRedirectTarget(String homepageRedirectTarget) { - - this.homepageRedirectTarget = homepageRedirectTarget; + + public APIConfig moderationEmail(@javax.annotation.Nonnull String moderationEmail) { + this.moderationEmail = moderationEmail; return this; } - /** - * Redirect target if you try to open the base API domain in your browser - * @return homepageRedirectTarget - **/ + /** + * VRChat's moderation related email + * @return moderationEmail + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Redirect target if you try to open the base API domain in your browser") + public String getModerationEmail() { + return moderationEmail; + } - public String getHomepageRedirectTarget() { - return homepageRedirectTarget; + public void setModerationEmail(@javax.annotation.Nonnull String moderationEmail) { + this.moderationEmail = moderationEmail; } - public void setHomepageRedirectTarget(String homepageRedirectTarget) { - this.homepageRedirectTarget = homepageRedirectTarget; + 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 + public String getNotAllowedToSelectAvatarInPrivateWorldMessage() { + return notAllowedToSelectAvatarInPrivateWorldMessage; + } + + public void setNotAllowedToSelectAvatarInPrivateWorldMessage(@javax.annotation.Nonnull String notAllowedToSelectAvatarInPrivateWorldMessage) { + this.notAllowedToSelectAvatarInPrivateWorldMessage = notAllowedToSelectAvatarInPrivateWorldMessage; } - public APIConfig hubWorldId(String hubWorldId) { - - this.hubWorldId = hubWorldId; + public APIConfig offlineAnalysis(@javax.annotation.Nonnull APIConfigOfflineAnalysis offlineAnalysis) { + this.offlineAnalysis = offlineAnalysis; return this; } - /** - * WorldID be \"offline\" on User profiles if you are not friends with that user. - * @return hubWorldId - **/ + /** + * Get offlineAnalysis + * @return offlineAnalysis + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_ba913a96-fac4-4048-a062-9aa5db092812", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") + public APIConfigOfflineAnalysis getOfflineAnalysis() { + return offlineAnalysis; + } - public String getHubWorldId() { - return hubWorldId; + public void setOfflineAnalysis(@javax.annotation.Nonnull APIConfigOfflineAnalysis offlineAnalysis) { + this.offlineAnalysis = offlineAnalysis; } - public void setHubWorldId(String hubWorldId) { - this.hubWorldId = hubWorldId; + public APIConfig photonNameserverOverrides(@javax.annotation.Nonnull List photonNameserverOverrides) { + this.photonNameserverOverrides = photonNameserverOverrides; + return this; } - - public APIConfig jobsEmail(String jobsEmail) { - - this.jobsEmail = jobsEmail; + public APIConfig addPhotonNameserverOverridesItem(String photonNameserverOverridesItem) { + if (this.photonNameserverOverrides == null) { + this.photonNameserverOverrides = new ArrayList<>(); + } + this.photonNameserverOverrides.add(photonNameserverOverridesItem); return this; } - /** - * VRChat's job application email - * @return jobsEmail - **/ + /** + * Unknown + * @return photonNameserverOverrides + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's job application email") + public List getPhotonNameserverOverrides() { + return photonNameserverOverrides; + } - public String getJobsEmail() { - return jobsEmail; + public void setPhotonNameserverOverrides(@javax.annotation.Nonnull List photonNameserverOverrides) { + this.photonNameserverOverrides = photonNameserverOverrides; } - public void setJobsEmail(String jobsEmail) { - this.jobsEmail = jobsEmail; + public APIConfig photonPublicKeys(@javax.annotation.Nonnull List photonPublicKeys) { + this.photonPublicKeys = photonPublicKeys; + return this; } - - public APIConfig messageOfTheDay(String messageOfTheDay) { - - this.messageOfTheDay = messageOfTheDay; + public APIConfig addPhotonPublicKeysItem(String photonPublicKeysItem) { + if (this.photonPublicKeys == null) { + this.photonPublicKeys = new ArrayList<>(); + } + this.photonPublicKeys.add(photonPublicKeysItem); return this; } - /** - * MOTD - * @return messageOfTheDay - * @deprecated - **/ - @Deprecated + /** + * Unknown + * @return photonPublicKeys + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "MOTD") - - public String getMessageOfTheDay() { - return messageOfTheDay; + public List getPhotonPublicKeys() { + return photonPublicKeys; } - - public void setMessageOfTheDay(String messageOfTheDay) { - this.messageOfTheDay = messageOfTheDay; + public void setPhotonPublicKeys(@javax.annotation.Nonnull List photonPublicKeys) { + this.photonPublicKeys = photonPublicKeys; } - public APIConfig moderationEmail(String moderationEmail) { - - this.moderationEmail = moderationEmail; + public APIConfig playerUrlResolverSha1(@javax.annotation.Nonnull String playerUrlResolverSha1) { + this.playerUrlResolverSha1 = playerUrlResolverSha1; return this; } - /** - * VRChat's moderation related email - * @return moderationEmail - **/ + /** + * Currently used youtube-dl.exe hash in SHA1-delimited format + * @return playerUrlResolverSha1 + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "VRChat's moderation related email") - - public String getModerationEmail() { - return moderationEmail; + public String getPlayerUrlResolverSha1() { + return playerUrlResolverSha1; } - - public void setModerationEmail(String moderationEmail) { - this.moderationEmail = moderationEmail; + public void setPlayerUrlResolverSha1(@javax.annotation.Nonnull String playerUrlResolverSha1) { + this.playerUrlResolverSha1 = playerUrlResolverSha1; } - public APIConfig moderationQueryPeriod(Integer moderationQueryPeriod) { - - this.moderationQueryPeriod = moderationQueryPeriod; + public APIConfig playerUrlResolverVersion(@javax.annotation.Nonnull String playerUrlResolverVersion) { + this.playerUrlResolverVersion = playerUrlResolverVersion; return this; } - /** - * Unknown - * @return moderationQueryPeriod - **/ + /** + * Currently used youtube-dl.exe version + * @return playerUrlResolverVersion + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getModerationQueryPeriod() { - return moderationQueryPeriod; + public String getPlayerUrlResolverVersion() { + return playerUrlResolverVersion; } - - public void setModerationQueryPeriod(Integer moderationQueryPeriod) { - this.moderationQueryPeriod = moderationQueryPeriod; + public void setPlayerUrlResolverVersion(@javax.annotation.Nonnull String playerUrlResolverVersion) { + this.playerUrlResolverVersion = playerUrlResolverVersion; } - public APIConfig notAllowedToSelectAvatarInPrivateWorldMessage(String notAllowedToSelectAvatarInPrivateWorldMessage) { - - this.notAllowedToSelectAvatarInPrivateWorldMessage = notAllowedToSelectAvatarInPrivateWorldMessage; + public APIConfig publicKey(@javax.annotation.Nonnull String publicKey) { + this.publicKey = publicKey; return this; } - /** - * Used in-game to notify a user they aren't allowed to select avatars in private worlds - * @return notAllowedToSelectAvatarInPrivateWorldMessage - **/ + /** + * Public key, hex encoded + * @return publicKey + */ @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 getPublicKey() { + return publicKey; + } - public String getNotAllowedToSelectAvatarInPrivateWorldMessage() { - return notAllowedToSelectAvatarInPrivateWorldMessage; + public void setPublicKey(@javax.annotation.Nonnull String publicKey) { + this.publicKey = publicKey; } - public void setNotAllowedToSelectAvatarInPrivateWorldMessage(String notAllowedToSelectAvatarInPrivateWorldMessage) { - this.notAllowedToSelectAvatarInPrivateWorldMessage = notAllowedToSelectAvatarInPrivateWorldMessage; + public APIConfig reportCategories(@javax.annotation.Nonnull Map reportCategories) { + this.reportCategories = reportCategories; + return this; } - - public APIConfig plugin(String plugin) { - - this.plugin = plugin; + public APIConfig putReportCategoriesItem(String key, ReportCategory reportCategoriesItem) { + if (this.reportCategories == null) { + this.reportCategories = new HashMap<>(); + } + this.reportCategories.put(key, reportCategoriesItem); return this; } - /** - * Extra [plugin](https://doc.photonengine.com/en-us/server/current/plugins/manual) to run in each instance - * @return plugin - **/ + /** + * Categories available for reporting objectionable content + * @return reportCategories + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Extra [plugin](https://doc.photonengine.com/en-us/server/current/plugins/manual) to run in each instance") - - public String getPlugin() { - return plugin; + public Map getReportCategories() { + return reportCategories; } - - public void setPlugin(String plugin) { - this.plugin = plugin; + public void setReportCategories(@javax.annotation.Nonnull Map reportCategories) { + this.reportCategories = reportCategories; } - public APIConfig releaseAppVersionStandalone(String releaseAppVersionStandalone) { - - this.releaseAppVersionStandalone = releaseAppVersionStandalone; + public APIConfig reportFormUrl(@javax.annotation.Nonnull String reportFormUrl) { + this.reportFormUrl = reportFormUrl; return this; } - /** - * Version number for game release build - * @return releaseAppVersionStandalone - * @deprecated - **/ - @Deprecated + /** + * URL to the report form + * @return reportFormUrl + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Version number for game release build") + public String getReportFormUrl() { + return reportFormUrl; + } - public String getReleaseAppVersionStandalone() { - return releaseAppVersionStandalone; + public void setReportFormUrl(@javax.annotation.Nonnull String reportFormUrl) { + this.reportFormUrl = reportFormUrl; } - public void setReleaseAppVersionStandalone(String releaseAppVersionStandalone) { - this.releaseAppVersionStandalone = releaseAppVersionStandalone; + public APIConfig reportOptions(@javax.annotation.Nonnull Map>> reportOptions) { + this.reportOptions = reportOptions; + return this; } - - public APIConfig releaseSdkUrl(String releaseSdkUrl) { - - this.releaseSdkUrl = releaseSdkUrl; + public APIConfig putReportOptionsItem(String key, Map> reportOptionsItem) { + if (this.reportOptions == null) { + this.reportOptions = new HashMap<>(); + } + this.reportOptions.put(key, reportOptionsItem); return this; } - /** - * Link to download the release SDK - * @return releaseSdkUrl - * @deprecated - **/ - @Deprecated + /** + * 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 = "Link to download the release SDK") + public Map>> getReportOptions() { + return reportOptions; + } - public String getReleaseSdkUrl() { - return releaseSdkUrl; + public void setReportOptions(@javax.annotation.Nonnull Map>> reportOptions) { + this.reportOptions = reportOptions; } - public void setReleaseSdkUrl(String releaseSdkUrl) { - this.releaseSdkUrl = releaseSdkUrl; + public APIConfig reportReasons(@javax.annotation.Nonnull Map reportReasons) { + this.reportReasons = reportReasons; + return this; } - - public APIConfig releaseSdkVersion(String releaseSdkVersion) { - - this.releaseSdkVersion = releaseSdkVersion; + public APIConfig putReportReasonsItem(String key, ReportReason reportReasonsItem) { + if (this.reportReasons == null) { + this.reportReasons = new HashMap<>(); + } + this.reportReasons.put(key, reportReasonsItem); return this; } - /** - * Version of the release SDK - * @return releaseSdkVersion - * @deprecated - **/ - @Deprecated + /** + * Reasons available for submitting a report + * @return reportReasons + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Version of the release SDK") - - public String getReleaseSdkVersion() { - return releaseSdkVersion; + public Map getReportReasons() { + return reportReasons; } - - public void setReleaseSdkVersion(String releaseSdkVersion) { - this.releaseSdkVersion = releaseSdkVersion; + public void setReportReasons(@javax.annotation.Nonnull Map reportReasons) { + this.reportReasons = reportReasons; } - public APIConfig releaseServerVersionStandalone(String releaseServerVersionStandalone) { - - this.releaseServerVersionStandalone = releaseServerVersionStandalone; + public APIConfig requireAgeVerificationBetaTag(@javax.annotation.Nonnull Boolean requireAgeVerificationBetaTag) { + this.requireAgeVerificationBetaTag = requireAgeVerificationBetaTag; return this; } - /** - * Version number for server release build - * @return releaseServerVersionStandalone - * @deprecated - **/ - @Deprecated + /** + * Get requireAgeVerificationBetaTag + * @return requireAgeVerificationBetaTag + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Version number for server release build") - - public String getReleaseServerVersionStandalone() { - return releaseServerVersionStandalone; + public Boolean getRequireAgeVerificationBetaTag() { + return requireAgeVerificationBetaTag; } - - public void setReleaseServerVersionStandalone(String releaseServerVersionStandalone) { - this.releaseServerVersionStandalone = releaseServerVersionStandalone; + 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 serverName(String serverName) { - - this.serverName = serverName; + public APIConfig stringHostUrlList(@javax.annotation.Nonnull List stringHostUrlList) { + this.stringHostUrlList = stringHostUrlList; return this; } - /** - * Server name of the API server currently responding - * @return serverName - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Server name of the API server currently responding") - - public String getServerName() { - return serverName; + 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 + public List getStringHostUrlList() { + return stringHostUrlList; + } - public void setServerName(String serverName) { - this.serverName = serverName; + 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 timeOutWorldId(String timeOutWorldId) { - + public APIConfig supportFormUrl(@javax.annotation.Nonnull String supportFormUrl) { + this.supportFormUrl = supportFormUrl; + return this; + } + + /** + * VRChat's support form + * @return supportFormUrl + */ + @javax.annotation.Nonnull + public String getSupportFormUrl() { + return supportFormUrl; + } + + public void setSupportFormUrl(@javax.annotation.Nonnull String supportFormUrl) { + this.supportFormUrl = supportFormUrl; + } + + + 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_ba913a96-fac4-4048-a062-9aa5db092812", 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 tutorialWorldId(String tutorialWorldId) { - + public APIConfig timekeeping(@javax.annotation.Nonnull Boolean timekeeping) { + this.timekeeping = timekeeping; + return this; + } + + /** + * Unknown + * @return timekeeping + */ + @javax.annotation.Nonnull + public Boolean getTimekeeping() { + return timekeeping; + } + + public void setTimekeeping(@javax.annotation.Nonnull Boolean timekeeping) { + this.timekeeping = timekeeping; + } + + + 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_ba913a96-fac4-4048-a062-9aa5db092812", 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 userUpdatePeriod(Integer userUpdatePeriod) { - - this.userUpdatePeriod = userUpdatePeriod; + public APIConfig viveWindowsUrl(@javax.annotation.Nonnull String viveWindowsUrl) { + this.viveWindowsUrl = viveWindowsUrl; return this; } - /** - * Unknown - * @return userUpdatePeriod - **/ + /** + * Download link for game on the Steam website. + * @return viveWindowsUrl + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getUserUpdatePeriod() { - return userUpdatePeriod; + public String getViveWindowsUrl() { + return viveWindowsUrl; } - - public void setUserUpdatePeriod(Integer userUpdatePeriod) { - this.userUpdatePeriod = userUpdatePeriod; + public void setViveWindowsUrl(@javax.annotation.Nonnull String viveWindowsUrl) { + this.viveWindowsUrl = viveWindowsUrl; } - public APIConfig userVerificationDelay(Integer userVerificationDelay) { - - this.userVerificationDelay = userVerificationDelay; + public APIConfig websocketMaxFriendsRefreshDelay(@javax.annotation.Nonnull Integer websocketMaxFriendsRefreshDelay) { + this.websocketMaxFriendsRefreshDelay = websocketMaxFriendsRefreshDelay; return this; } - /** + /** * Unknown - * @return userVerificationDelay - **/ + * @return websocketMaxFriendsRefreshDelay + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getUserVerificationDelay() { - return userVerificationDelay; + public Integer getWebsocketMaxFriendsRefreshDelay() { + return websocketMaxFriendsRefreshDelay; } - - public void setUserVerificationDelay(Integer userVerificationDelay) { - this.userVerificationDelay = userVerificationDelay; + public void setWebsocketMaxFriendsRefreshDelay(@javax.annotation.Nonnull Integer websocketMaxFriendsRefreshDelay) { + this.websocketMaxFriendsRefreshDelay = websocketMaxFriendsRefreshDelay; } - public APIConfig userVerificationRetry(Integer userVerificationRetry) { - - this.userVerificationRetry = userVerificationRetry; + public APIConfig websocketQuickReconnectTime(@javax.annotation.Nonnull Integer websocketQuickReconnectTime) { + this.websocketQuickReconnectTime = websocketQuickReconnectTime; return this; } - /** + /** * Unknown - * @return userVerificationRetry - **/ + * @return websocketQuickReconnectTime + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getUserVerificationRetry() { - return userVerificationRetry; + public Integer getWebsocketQuickReconnectTime() { + return websocketQuickReconnectTime; } - - public void setUserVerificationRetry(Integer userVerificationRetry) { - this.userVerificationRetry = userVerificationRetry; + public void setWebsocketQuickReconnectTime(@javax.annotation.Nonnull Integer websocketQuickReconnectTime) { + this.websocketQuickReconnectTime = websocketQuickReconnectTime; } - public APIConfig userVerificationTimeout(Integer userVerificationTimeout) { - - this.userVerificationTimeout = userVerificationTimeout; + public APIConfig websocketReconnectMaxDelay(@javax.annotation.Nonnull Integer websocketReconnectMaxDelay) { + this.websocketReconnectMaxDelay = websocketReconnectMaxDelay; return this; } - /** + /** * Unknown - * @return userVerificationTimeout - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getUserVerificationTimeout() { - return userVerificationTimeout; - } - - - public void setUserVerificationTimeout(Integer userVerificationTimeout) { - this.userVerificationTimeout = userVerificationTimeout; - } - - - public APIConfig viveWindowsUrl(String viveWindowsUrl) { - - this.viveWindowsUrl = viveWindowsUrl; - return this; - } - - /** - * Download link for game on the Steam website. - * @return viveWindowsUrl - **/ + * @return websocketReconnectMaxDelay + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Download link for game on the Steam website.") - - public String getViveWindowsUrl() { - return viveWindowsUrl; + public Integer getWebsocketReconnectMaxDelay() { + return websocketReconnectMaxDelay; } - - public void setViveWindowsUrl(String viveWindowsUrl) { - this.viveWindowsUrl = viveWindowsUrl; + 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; } - public APIConfig worldUpdatePeriod(Integer worldUpdatePeriod) { - - this.worldUpdatePeriod = worldUpdatePeriod; - return this; - } - - /** - * Unknown - * @return worldUpdatePeriod - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public Integer getWorldUpdatePeriod() { - return worldUpdatePeriod; - } - - - public void setWorldUpdatePeriod(Integer worldUpdatePeriod) { - this.worldUpdatePeriod = worldUpdatePeriod; - } - - - public APIConfig youtubedlHash(String youtubedlHash) { - - this.youtubedlHash = youtubedlHash; - return this; - } - - /** - * Currently used youtube-dl.exe hash in SHA-256-delimited format - * @return youtubedlHash - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Currently used youtube-dl.exe hash in SHA-256-delimited format") - - public String getYoutubedlHash() { - return youtubedlHash; - } - - - public void setYoutubedlHash(String youtubedlHash) { - this.youtubedlHash = youtubedlHash; - } - - - public APIConfig youtubedlVersion(String youtubedlVersion) { - - this.youtubedlVersion = youtubedlVersion; - return this; - } - - /** - * Currently used youtube-dl.exe version - * @return youtubedlVersion - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Currently used youtube-dl.exe version") - - public String getYoutubedlVersion() { - return youtubedlVersion; - } - - - public void setYoutubedlVersion(String youtubedlVersion) { - this.youtubedlVersion = youtubedlVersion; - } - @Override public boolean equals(Object o) { @@ -2255,37 +3242,65 @@ public boolean equals(Object o) { return false; } APIConfig apIConfig = (APIConfig) o; - return Objects.equals(this.voiceEnableDegradation, apIConfig.voiceEnableDegradation) && + return Objects.equals(this.campaignStatus, apIConfig.campaignStatus) && + Objects.equals(this.disableBackgroundPreloads, apIConfig.disableBackgroundPreloads) && + Objects.equals(this.locationGiftingNonSubPrioEnabled, apIConfig.locationGiftingNonSubPrioEnabled) && + Objects.equals(this.voiceEnableDegradation, apIConfig.voiceEnableDegradation) && Objects.equals(this.voiceEnableReceiverLimiting, apIConfig.voiceEnableReceiverLimiting) && + Objects.equals(this.accessLogsUrls, apIConfig.accessLogsUrls) && Objects.equals(this.address, apIConfig.address) && + Objects.equals(this.ageVerificationInviteVisible, apIConfig.ageVerificationInviteVisible) && + Objects.equals(this.ageVerificationP, apIConfig.ageVerificationP) && + Objects.equals(this.ageVerificationStatusVisible, apIConfig.ageVerificationStatusVisible) && + Objects.equals(this.analysisMaxRetries, apIConfig.analysisMaxRetries) && + Objects.equals(this.analysisRetryInterval, apIConfig.analysisRetryInterval) && + Objects.equals(this.analyticsSegmentNewUIPctOfUsers, apIConfig.analyticsSegmentNewUIPctOfUsers) && + Objects.equals(this.analyticsSegmentNewUISalt, apIConfig.analyticsSegmentNewUISalt) && Objects.equals(this.announcements, apIConfig.announcements) && - Objects.equals(this.apiKey, apIConfig.apiKey) && - Objects.equals(this.appName, apIConfig.appName) && - Objects.equals(this.buildVersionTag, apIConfig.buildVersionTag) && + Objects.equals(this.audioConfig, apIConfig.audioConfig) && + Objects.equals(this.availableLanguageCodes, apIConfig.availableLanguageCodes) && + Objects.equals(this.availableLanguages, apIConfig.availableLanguages) && + Objects.equals(this.avatarPerfLimiter, apIConfig.avatarPerfLimiter) && + Objects.equals(this.chatboxLogBufferSeconds, apIConfig.chatboxLogBufferSeconds) && Objects.equals(this.clientApiKey, apIConfig.clientApiKey) && Objects.equals(this.clientBPSCeiling, apIConfig.clientBPSCeiling) && Objects.equals(this.clientDisconnectTimeout, apIConfig.clientDisconnectTimeout) && + Objects.equals(this.clientNetDispatchThread, apIConfig.clientNetDispatchThread) && + Objects.equals(this.clientNetDispatchThreadMobile, apIConfig.clientNetDispatchThreadMobile) && + Objects.equals(this.clientNetInThread, apIConfig.clientNetInThread) && + Objects.equals(this.clientNetInThread2, apIConfig.clientNetInThread2) && + Objects.equals(this.clientNetInThreadMobile, apIConfig.clientNetInThreadMobile) && + Objects.equals(this.clientNetInThreadMobile2, apIConfig.clientNetInThreadMobile2) && + Objects.equals(this.clientNetOutThread, apIConfig.clientNetOutThread) && + Objects.equals(this.clientNetOutThread2, apIConfig.clientNetOutThread2) && + Objects.equals(this.clientNetOutThreadMobile, apIConfig.clientNetOutThreadMobile) && + Objects.equals(this.clientNetOutThreadMobile2, apIConfig.clientNetOutThreadMobile2) && + Objects.equals(this.clientQR, apIConfig.clientQR) && Objects.equals(this.clientReservedPlayerBPS, apIConfig.clientReservedPlayerBPS) && Objects.equals(this.clientSentCountAllowance, apIConfig.clientSentCountAllowance) && + Objects.equals(this.constants, apIConfig.constants) && Objects.equals(this.contactEmail, apIConfig.contactEmail) && Objects.equals(this.copyrightEmail, apIConfig.copyrightEmail) && + Objects.equals(this.copyrightFormUrl, apIConfig.copyrightFormUrl) && + Objects.equals(this.currentPrivacyVersion, apIConfig.currentPrivacyVersion) && Objects.equals(this.currentTOSVersion, apIConfig.currentTOSVersion) && Objects.equals(this.defaultAvatar, apIConfig.defaultAvatar) && - Objects.equals(this.deploymentGroup, apIConfig.deploymentGroup) && - Objects.equals(this.devAppVersionStandalone, apIConfig.devAppVersionStandalone) && - Objects.equals(this.devDownloadLinkWindows, apIConfig.devDownloadLinkWindows) && + Objects.equals(this.defaultStickerSet, apIConfig.defaultStickerSet) && + Objects.equals(this.devLanguageCodes, apIConfig.devLanguageCodes) && Objects.equals(this.devSdkUrl, apIConfig.devSdkUrl) && Objects.equals(this.devSdkVersion, apIConfig.devSdkVersion) && - Objects.equals(this.devServerVersionStandalone, apIConfig.devServerVersionStandalone) && Objects.equals(this.disCountdown, apIConfig.disCountdown) && + Objects.equals(this.disableAVProInProton, apIConfig.disableAVProInProton) && Objects.equals(this.disableAvatarCopying, apIConfig.disableAvatarCopying) && Objects.equals(this.disableAvatarGating, apIConfig.disableAvatarGating) && + Objects.equals(this.disableCaptcha, apIConfig.disableCaptcha) && Objects.equals(this.disableCommunityLabs, apIConfig.disableCommunityLabs) && Objects.equals(this.disableCommunityLabsPromotion, apIConfig.disableCommunityLabsPromotion) && Objects.equals(this.disableEmail, apIConfig.disableEmail) && Objects.equals(this.disableEventStream, apIConfig.disableEventStream) && Objects.equals(this.disableFeedbackGating, apIConfig.disableFeedbackGating) && Objects.equals(this.disableFrontendBuilds, apIConfig.disableFrontendBuilds) && + Objects.equals(this.disableGiftDrops, apIConfig.disableGiftDrops) && Objects.equals(this.disableHello, apIConfig.disableHello) && Objects.equals(this.disableOculusSubs, apIConfig.disableOculusSubs) && Objects.equals(this.disableRegistration, apIConfig.disableRegistration) && @@ -2296,28 +3311,50 @@ public boolean equals(Object o) { Objects.equals(this.downloadLinkWindows, apIConfig.downloadLinkWindows) && Objects.equals(this.downloadUrls, apIConfig.downloadUrls) && Objects.equals(this.dynamicWorldRows, apIConfig.dynamicWorldRows) && + Objects.equals(this.economyLedgerBackfill, apIConfig.economyLedgerBackfill) && + Objects.equals(this.economyLedgerMigrationStop, apIConfig.economyLedgerMigrationStop) && + Objects.equals(this.economyLedgerMode, apIConfig.economyLedgerMode) && + Objects.equals(this.economyPauseEnd, apIConfig.economyPauseEnd) && + Objects.equals(this.economyPauseStart, apIConfig.economyPauseStart) && + Objects.equals(this.economyPurchaseRepairEnabled, apIConfig.economyPurchaseRepairEnabled) && + Objects.equals(this.economyState, apIConfig.economyState) && Objects.equals(this.events, apIConfig.events) && - Objects.equals(this.gearDemoRoomId, apIConfig.gearDemoRoomId) && + Objects.equals(this.forceUseLatestWorld, apIConfig.forceUseLatestWorld) && + Objects.equals(this.giftDisplayType, apIConfig.giftDisplayType) && + Objects.equals(this.googleApiClientId, apIConfig.googleApiClientId) && Objects.equals(this.homeWorldId, apIConfig.homeWorldId) && Objects.equals(this.homepageRedirectTarget, apIConfig.homepageRedirectTarget) && Objects.equals(this.hubWorldId, apIConfig.hubWorldId) && + Objects.equals(this.imageHostUrlList, apIConfig.imageHostUrlList) && + Objects.equals(this.iosAppVersion, apIConfig.iosAppVersion) && + Objects.equals(this.iosVersion, apIConfig.iosVersion) && Objects.equals(this.jobsEmail, apIConfig.jobsEmail) && - Objects.equals(this.messageOfTheDay, apIConfig.messageOfTheDay) && + Objects.equals(this.maxUserEmoji, apIConfig.maxUserEmoji) && + Objects.equals(this.maxUserStickers, apIConfig.maxUserStickers) && + Objects.equals(this.minSupportedClientBuildNumber, apIConfig.minSupportedClientBuildNumber) && + Objects.equals(this.minimumUnityVersionForUploads, apIConfig.minimumUnityVersionForUploads) && Objects.equals(this.moderationEmail, apIConfig.moderationEmail) && - Objects.equals(this.moderationQueryPeriod, apIConfig.moderationQueryPeriod) && Objects.equals(this.notAllowedToSelectAvatarInPrivateWorldMessage, apIConfig.notAllowedToSelectAvatarInPrivateWorldMessage) && - Objects.equals(this.plugin, apIConfig.plugin) && - Objects.equals(this.releaseAppVersionStandalone, apIConfig.releaseAppVersionStandalone) && - Objects.equals(this.releaseSdkUrl, apIConfig.releaseSdkUrl) && - Objects.equals(this.releaseSdkVersion, apIConfig.releaseSdkVersion) && - Objects.equals(this.releaseServerVersionStandalone, apIConfig.releaseServerVersionStandalone) && + Objects.equals(this.offlineAnalysis, apIConfig.offlineAnalysis) && + Objects.equals(this.photonNameserverOverrides, apIConfig.photonNameserverOverrides) && + Objects.equals(this.photonPublicKeys, apIConfig.photonPublicKeys) && + Objects.equals(this.playerUrlResolverSha1, apIConfig.playerUrlResolverSha1) && + Objects.equals(this.playerUrlResolverVersion, apIConfig.playerUrlResolverVersion) && + Objects.equals(this.publicKey, apIConfig.publicKey) && + Objects.equals(this.reportCategories, apIConfig.reportCategories) && + Objects.equals(this.reportFormUrl, apIConfig.reportFormUrl) && + Objects.equals(this.reportOptions, apIConfig.reportOptions) && + Objects.equals(this.reportReasons, apIConfig.reportReasons) && + Objects.equals(this.requireAgeVerificationBetaTag, apIConfig.requireAgeVerificationBetaTag) && Objects.equals(this.sdkDeveloperFaqUrl, apIConfig.sdkDeveloperFaqUrl) && Objects.equals(this.sdkDiscordUrl, apIConfig.sdkDiscordUrl) && Objects.equals(this.sdkNotAllowedToPublishMessage, apIConfig.sdkNotAllowedToPublishMessage) && Objects.equals(this.sdkUnityVersion, apIConfig.sdkUnityVersion) && - Objects.equals(this.serverName, apIConfig.serverName) && + Objects.equals(this.stringHostUrlList, apIConfig.stringHostUrlList) && Objects.equals(this.supportEmail, apIConfig.supportEmail) && + Objects.equals(this.supportFormUrl, apIConfig.supportFormUrl) && Objects.equals(this.timeOutWorldId, apIConfig.timeOutWorldId) && + Objects.equals(this.timekeeping, apIConfig.timekeeping) && Objects.equals(this.tutorialWorldId, apIConfig.tutorialWorldId) && Objects.equals(this.updateRateMsMaximum, apIConfig.updateRateMsMaximum) && Objects.equals(this.updateRateMsMinimum, apIConfig.updateRateMsMinimum) && @@ -2326,57 +3363,81 @@ public boolean equals(Object o) { Objects.equals(this.uploadAnalysisPercent, apIConfig.uploadAnalysisPercent) && Objects.equals(this.urlList, apIConfig.urlList) && Objects.equals(this.useReliableUdpForVoice, apIConfig.useReliableUdpForVoice) && - Objects.equals(this.userUpdatePeriod, apIConfig.userUpdatePeriod) && - Objects.equals(this.userVerificationDelay, apIConfig.userVerificationDelay) && - Objects.equals(this.userVerificationRetry, apIConfig.userVerificationRetry) && - Objects.equals(this.userVerificationTimeout, apIConfig.userVerificationTimeout) && Objects.equals(this.viveWindowsUrl, apIConfig.viveWindowsUrl) && - Objects.equals(this.whiteListedAssetUrls, apIConfig.whiteListedAssetUrls) && - Objects.equals(this.worldUpdatePeriod, apIConfig.worldUpdatePeriod) && - Objects.equals(this.youtubedlHash, apIConfig.youtubedlHash) && - Objects.equals(this.youtubedlVersion, apIConfig.youtubedlVersion); + Objects.equals(this.websocketMaxFriendsRefreshDelay, apIConfig.websocketMaxFriendsRefreshDelay) && + Objects.equals(this.websocketQuickReconnectTime, apIConfig.websocketQuickReconnectTime) && + Objects.equals(this.websocketReconnectMaxDelay, apIConfig.websocketReconnectMaxDelay) && + Objects.equals(this.whiteListedAssetUrls, apIConfig.whiteListedAssetUrls); } @Override public int hashCode() { - return Objects.hash(voiceEnableDegradation, voiceEnableReceiverLimiting, address, announcements, apiKey, appName, buildVersionTag, clientApiKey, clientBPSCeiling, clientDisconnectTimeout, clientReservedPlayerBPS, clientSentCountAllowance, contactEmail, copyrightEmail, currentTOSVersion, defaultAvatar, deploymentGroup, devAppVersionStandalone, devDownloadLinkWindows, devSdkUrl, devSdkVersion, devServerVersionStandalone, disCountdown, disableAvatarCopying, disableAvatarGating, disableCommunityLabs, disableCommunityLabsPromotion, disableEmail, disableEventStream, disableFeedbackGating, disableFrontendBuilds, disableHello, disableOculusSubs, disableRegistration, disableSteamNetworking, disableTwoFactorAuth, disableUdon, disableUpgradeAccount, downloadLinkWindows, downloadUrls, dynamicWorldRows, events, gearDemoRoomId, homeWorldId, homepageRedirectTarget, hubWorldId, jobsEmail, messageOfTheDay, moderationEmail, moderationQueryPeriod, notAllowedToSelectAvatarInPrivateWorldMessage, plugin, releaseAppVersionStandalone, releaseSdkUrl, releaseSdkVersion, releaseServerVersionStandalone, sdkDeveloperFaqUrl, sdkDiscordUrl, sdkNotAllowedToPublishMessage, sdkUnityVersion, serverName, supportEmail, timeOutWorldId, tutorialWorldId, updateRateMsMaximum, updateRateMsMinimum, updateRateMsNormal, updateRateMsUdonManual, uploadAnalysisPercent, urlList, useReliableUdpForVoice, userUpdatePeriod, userVerificationDelay, userVerificationRetry, userVerificationTimeout, viveWindowsUrl, whiteListedAssetUrls, worldUpdatePeriod, youtubedlHash, youtubedlVersion); + return Objects.hash(campaignStatus, disableBackgroundPreloads, locationGiftingNonSubPrioEnabled, voiceEnableDegradation, voiceEnableReceiverLimiting, accessLogsUrls, address, ageVerificationInviteVisible, ageVerificationP, ageVerificationStatusVisible, analysisMaxRetries, analysisRetryInterval, analyticsSegmentNewUIPctOfUsers, analyticsSegmentNewUISalt, 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, disCountdown, 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, playerUrlResolverSha1, playerUrlResolverVersion, 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); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class APIConfig {\n"); + sb.append(" campaignStatus: ").append(toIndentedString(campaignStatus)).append("\n"); + sb.append(" disableBackgroundPreloads: ").append(toIndentedString(disableBackgroundPreloads)).append("\n"); + sb.append(" locationGiftingNonSubPrioEnabled: ").append(toIndentedString(locationGiftingNonSubPrioEnabled)).append("\n"); sb.append(" voiceEnableDegradation: ").append(toIndentedString(voiceEnableDegradation)).append("\n"); sb.append(" voiceEnableReceiverLimiting: ").append(toIndentedString(voiceEnableReceiverLimiting)).append("\n"); + sb.append(" accessLogsUrls: ").append(toIndentedString(accessLogsUrls)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" ageVerificationInviteVisible: ").append(toIndentedString(ageVerificationInviteVisible)).append("\n"); + sb.append(" ageVerificationP: ").append(toIndentedString(ageVerificationP)).append("\n"); + sb.append(" ageVerificationStatusVisible: ").append(toIndentedString(ageVerificationStatusVisible)).append("\n"); + sb.append(" analysisMaxRetries: ").append(toIndentedString(analysisMaxRetries)).append("\n"); + sb.append(" analysisRetryInterval: ").append(toIndentedString(analysisRetryInterval)).append("\n"); + sb.append(" analyticsSegmentNewUIPctOfUsers: ").append(toIndentedString(analyticsSegmentNewUIPctOfUsers)).append("\n"); + sb.append(" analyticsSegmentNewUISalt: ").append(toIndentedString(analyticsSegmentNewUISalt)).append("\n"); sb.append(" announcements: ").append(toIndentedString(announcements)).append("\n"); - sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); - sb.append(" appName: ").append(toIndentedString(appName)).append("\n"); - sb.append(" buildVersionTag: ").append(toIndentedString(buildVersionTag)).append("\n"); + sb.append(" audioConfig: ").append(toIndentedString(audioConfig)).append("\n"); + sb.append(" availableLanguageCodes: ").append(toIndentedString(availableLanguageCodes)).append("\n"); + sb.append(" availableLanguages: ").append(toIndentedString(availableLanguages)).append("\n"); + sb.append(" avatarPerfLimiter: ").append(toIndentedString(avatarPerfLimiter)).append("\n"); + sb.append(" chatboxLogBufferSeconds: ").append(toIndentedString(chatboxLogBufferSeconds)).append("\n"); sb.append(" clientApiKey: ").append(toIndentedString(clientApiKey)).append("\n"); sb.append(" clientBPSCeiling: ").append(toIndentedString(clientBPSCeiling)).append("\n"); sb.append(" clientDisconnectTimeout: ").append(toIndentedString(clientDisconnectTimeout)).append("\n"); + sb.append(" clientNetDispatchThread: ").append(toIndentedString(clientNetDispatchThread)).append("\n"); + sb.append(" clientNetDispatchThreadMobile: ").append(toIndentedString(clientNetDispatchThreadMobile)).append("\n"); + sb.append(" clientNetInThread: ").append(toIndentedString(clientNetInThread)).append("\n"); + sb.append(" clientNetInThread2: ").append(toIndentedString(clientNetInThread2)).append("\n"); + sb.append(" clientNetInThreadMobile: ").append(toIndentedString(clientNetInThreadMobile)).append("\n"); + sb.append(" clientNetInThreadMobile2: ").append(toIndentedString(clientNetInThreadMobile2)).append("\n"); + sb.append(" clientNetOutThread: ").append(toIndentedString(clientNetOutThread)).append("\n"); + sb.append(" clientNetOutThread2: ").append(toIndentedString(clientNetOutThread2)).append("\n"); + sb.append(" clientNetOutThreadMobile: ").append(toIndentedString(clientNetOutThreadMobile)).append("\n"); + sb.append(" clientNetOutThreadMobile2: ").append(toIndentedString(clientNetOutThreadMobile2)).append("\n"); + sb.append(" clientQR: ").append(toIndentedString(clientQR)).append("\n"); sb.append(" clientReservedPlayerBPS: ").append(toIndentedString(clientReservedPlayerBPS)).append("\n"); sb.append(" clientSentCountAllowance: ").append(toIndentedString(clientSentCountAllowance)).append("\n"); + sb.append(" constants: ").append(toIndentedString(constants)).append("\n"); sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); sb.append(" copyrightEmail: ").append(toIndentedString(copyrightEmail)).append("\n"); + sb.append(" copyrightFormUrl: ").append(toIndentedString(copyrightFormUrl)).append("\n"); + sb.append(" currentPrivacyVersion: ").append(toIndentedString(currentPrivacyVersion)).append("\n"); sb.append(" currentTOSVersion: ").append(toIndentedString(currentTOSVersion)).append("\n"); sb.append(" defaultAvatar: ").append(toIndentedString(defaultAvatar)).append("\n"); - sb.append(" deploymentGroup: ").append(toIndentedString(deploymentGroup)).append("\n"); - sb.append(" devAppVersionStandalone: ").append(toIndentedString(devAppVersionStandalone)).append("\n"); - sb.append(" devDownloadLinkWindows: ").append(toIndentedString(devDownloadLinkWindows)).append("\n"); + sb.append(" defaultStickerSet: ").append(toIndentedString(defaultStickerSet)).append("\n"); + sb.append(" devLanguageCodes: ").append(toIndentedString(devLanguageCodes)).append("\n"); sb.append(" devSdkUrl: ").append(toIndentedString(devSdkUrl)).append("\n"); sb.append(" devSdkVersion: ").append(toIndentedString(devSdkVersion)).append("\n"); - sb.append(" devServerVersionStandalone: ").append(toIndentedString(devServerVersionStandalone)).append("\n"); sb.append(" disCountdown: ").append(toIndentedString(disCountdown)).append("\n"); + sb.append(" disableAVProInProton: ").append(toIndentedString(disableAVProInProton)).append("\n"); sb.append(" disableAvatarCopying: ").append(toIndentedString(disableAvatarCopying)).append("\n"); sb.append(" disableAvatarGating: ").append(toIndentedString(disableAvatarGating)).append("\n"); + sb.append(" disableCaptcha: ").append(toIndentedString(disableCaptcha)).append("\n"); sb.append(" disableCommunityLabs: ").append(toIndentedString(disableCommunityLabs)).append("\n"); sb.append(" disableCommunityLabsPromotion: ").append(toIndentedString(disableCommunityLabsPromotion)).append("\n"); sb.append(" disableEmail: ").append(toIndentedString(disableEmail)).append("\n"); sb.append(" disableEventStream: ").append(toIndentedString(disableEventStream)).append("\n"); sb.append(" disableFeedbackGating: ").append(toIndentedString(disableFeedbackGating)).append("\n"); sb.append(" disableFrontendBuilds: ").append(toIndentedString(disableFrontendBuilds)).append("\n"); + sb.append(" disableGiftDrops: ").append(toIndentedString(disableGiftDrops)).append("\n"); sb.append(" disableHello: ").append(toIndentedString(disableHello)).append("\n"); sb.append(" disableOculusSubs: ").append(toIndentedString(disableOculusSubs)).append("\n"); sb.append(" disableRegistration: ").append(toIndentedString(disableRegistration)).append("\n"); @@ -2387,28 +3448,50 @@ public String toString() { sb.append(" downloadLinkWindows: ").append(toIndentedString(downloadLinkWindows)).append("\n"); sb.append(" downloadUrls: ").append(toIndentedString(downloadUrls)).append("\n"); sb.append(" dynamicWorldRows: ").append(toIndentedString(dynamicWorldRows)).append("\n"); + sb.append(" economyLedgerBackfill: ").append(toIndentedString(economyLedgerBackfill)).append("\n"); + sb.append(" economyLedgerMigrationStop: ").append(toIndentedString(economyLedgerMigrationStop)).append("\n"); + sb.append(" economyLedgerMode: ").append(toIndentedString(economyLedgerMode)).append("\n"); + sb.append(" economyPauseEnd: ").append(toIndentedString(economyPauseEnd)).append("\n"); + sb.append(" economyPauseStart: ").append(toIndentedString(economyPauseStart)).append("\n"); + sb.append(" economyPurchaseRepairEnabled: ").append(toIndentedString(economyPurchaseRepairEnabled)).append("\n"); + sb.append(" economyState: ").append(toIndentedString(economyState)).append("\n"); sb.append(" events: ").append(toIndentedString(events)).append("\n"); - sb.append(" gearDemoRoomId: ").append(toIndentedString(gearDemoRoomId)).append("\n"); + sb.append(" forceUseLatestWorld: ").append(toIndentedString(forceUseLatestWorld)).append("\n"); + sb.append(" giftDisplayType: ").append(toIndentedString(giftDisplayType)).append("\n"); + sb.append(" googleApiClientId: ").append(toIndentedString(googleApiClientId)).append("\n"); sb.append(" homeWorldId: ").append(toIndentedString(homeWorldId)).append("\n"); sb.append(" homepageRedirectTarget: ").append(toIndentedString(homepageRedirectTarget)).append("\n"); sb.append(" hubWorldId: ").append(toIndentedString(hubWorldId)).append("\n"); + sb.append(" imageHostUrlList: ").append(toIndentedString(imageHostUrlList)).append("\n"); + sb.append(" iosAppVersion: ").append(toIndentedString(iosAppVersion)).append("\n"); + sb.append(" iosVersion: ").append(toIndentedString(iosVersion)).append("\n"); sb.append(" jobsEmail: ").append(toIndentedString(jobsEmail)).append("\n"); - sb.append(" messageOfTheDay: ").append(toIndentedString(messageOfTheDay)).append("\n"); + sb.append(" maxUserEmoji: ").append(toIndentedString(maxUserEmoji)).append("\n"); + sb.append(" maxUserStickers: ").append(toIndentedString(maxUserStickers)).append("\n"); + sb.append(" minSupportedClientBuildNumber: ").append(toIndentedString(minSupportedClientBuildNumber)).append("\n"); + sb.append(" minimumUnityVersionForUploads: ").append(toIndentedString(minimumUnityVersionForUploads)).append("\n"); sb.append(" moderationEmail: ").append(toIndentedString(moderationEmail)).append("\n"); - sb.append(" moderationQueryPeriod: ").append(toIndentedString(moderationQueryPeriod)).append("\n"); sb.append(" notAllowedToSelectAvatarInPrivateWorldMessage: ").append(toIndentedString(notAllowedToSelectAvatarInPrivateWorldMessage)).append("\n"); - sb.append(" plugin: ").append(toIndentedString(plugin)).append("\n"); - sb.append(" releaseAppVersionStandalone: ").append(toIndentedString(releaseAppVersionStandalone)).append("\n"); - sb.append(" releaseSdkUrl: ").append(toIndentedString(releaseSdkUrl)).append("\n"); - sb.append(" releaseSdkVersion: ").append(toIndentedString(releaseSdkVersion)).append("\n"); - sb.append(" releaseServerVersionStandalone: ").append(toIndentedString(releaseServerVersionStandalone)).append("\n"); + sb.append(" offlineAnalysis: ").append(toIndentedString(offlineAnalysis)).append("\n"); + sb.append(" photonNameserverOverrides: ").append(toIndentedString(photonNameserverOverrides)).append("\n"); + sb.append(" photonPublicKeys: ").append(toIndentedString(photonPublicKeys)).append("\n"); + sb.append(" playerUrlResolverSha1: ").append(toIndentedString(playerUrlResolverSha1)).append("\n"); + sb.append(" playerUrlResolverVersion: ").append(toIndentedString(playerUrlResolverVersion)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" reportCategories: ").append(toIndentedString(reportCategories)).append("\n"); + sb.append(" reportFormUrl: ").append(toIndentedString(reportFormUrl)).append("\n"); + sb.append(" reportOptions: ").append(toIndentedString(reportOptions)).append("\n"); + sb.append(" reportReasons: ").append(toIndentedString(reportReasons)).append("\n"); + sb.append(" requireAgeVerificationBetaTag: ").append(toIndentedString(requireAgeVerificationBetaTag)).append("\n"); sb.append(" sdkDeveloperFaqUrl: ").append(toIndentedString(sdkDeveloperFaqUrl)).append("\n"); sb.append(" sdkDiscordUrl: ").append(toIndentedString(sdkDiscordUrl)).append("\n"); sb.append(" sdkNotAllowedToPublishMessage: ").append(toIndentedString(sdkNotAllowedToPublishMessage)).append("\n"); sb.append(" sdkUnityVersion: ").append(toIndentedString(sdkUnityVersion)).append("\n"); - sb.append(" serverName: ").append(toIndentedString(serverName)).append("\n"); + sb.append(" stringHostUrlList: ").append(toIndentedString(stringHostUrlList)).append("\n"); sb.append(" supportEmail: ").append(toIndentedString(supportEmail)).append("\n"); + sb.append(" supportFormUrl: ").append(toIndentedString(supportFormUrl)).append("\n"); sb.append(" timeOutWorldId: ").append(toIndentedString(timeOutWorldId)).append("\n"); + sb.append(" timekeeping: ").append(toIndentedString(timekeeping)).append("\n"); sb.append(" tutorialWorldId: ").append(toIndentedString(tutorialWorldId)).append("\n"); sb.append(" updateRateMsMaximum: ").append(toIndentedString(updateRateMsMaximum)).append("\n"); sb.append(" updateRateMsMinimum: ").append(toIndentedString(updateRateMsMinimum)).append("\n"); @@ -2417,15 +3500,11 @@ public String toString() { sb.append(" uploadAnalysisPercent: ").append(toIndentedString(uploadAnalysisPercent)).append("\n"); sb.append(" urlList: ").append(toIndentedString(urlList)).append("\n"); sb.append(" useReliableUdpForVoice: ").append(toIndentedString(useReliableUdpForVoice)).append("\n"); - sb.append(" userUpdatePeriod: ").append(toIndentedString(userUpdatePeriod)).append("\n"); - sb.append(" userVerificationDelay: ").append(toIndentedString(userVerificationDelay)).append("\n"); - sb.append(" userVerificationRetry: ").append(toIndentedString(userVerificationRetry)).append("\n"); - sb.append(" userVerificationTimeout: ").append(toIndentedString(userVerificationTimeout)).append("\n"); sb.append(" viveWindowsUrl: ").append(toIndentedString(viveWindowsUrl)).append("\n"); + sb.append(" websocketMaxFriendsRefreshDelay: ").append(toIndentedString(websocketMaxFriendsRefreshDelay)).append("\n"); + sb.append(" websocketQuickReconnectTime: ").append(toIndentedString(websocketQuickReconnectTime)).append("\n"); + sb.append(" websocketReconnectMaxDelay: ").append(toIndentedString(websocketReconnectMaxDelay)).append("\n"); sb.append(" whiteListedAssetUrls: ").append(toIndentedString(whiteListedAssetUrls)).append("\n"); - sb.append(" worldUpdatePeriod: ").append(toIndentedString(worldUpdatePeriod)).append("\n"); - sb.append(" youtubedlHash: ").append(toIndentedString(youtubedlHash)).append("\n"); - sb.append(" youtubedlVersion: ").append(toIndentedString(youtubedlVersion)).append("\n"); sb.append("}"); return sb.toString(); } @@ -2435,11 +3514,304 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfig.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 `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 (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(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.validateJsonElement(jsonObj.get("accessLogsUrls")); + if (!jsonObj.get("address").isJsonPrimitive()) { + 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(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())); + } + 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)); + } + } + // validate the optional field `audioConfig` + if (jsonObj.get("audioConfig") != null && !jsonObj.get("audioConfig").isJsonNull()) { + 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(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(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.validateJsonElement(jsonObj.get("avatarPerfLimiter")); + if (!jsonObj.get("clientApiKey").isJsonPrimitive()) { + 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.validateJsonElement(jsonObj.get("constants")); + if (!jsonObj.get("contactEmail").isJsonPrimitive()) { + 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(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(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(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(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").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(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(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(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.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)); + } + } + if (!jsonObj.get("economyLedgerMigrationStop").isJsonPrimitive()) { + 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(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.validateJsonElement(jsonObj.get("events")); + if (!jsonObj.get("giftDisplayType").isJsonPrimitive()) { + 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(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(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(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(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(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(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.validateJsonElement(jsonObj.get("iosVersion")); + if (!jsonObj.get("jobsEmail").isJsonPrimitive()) { + 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.validateJsonElement(jsonObj.get("minSupportedClientBuildNumber")); + if (!jsonObj.get("minimumUnityVersionForUploads").isJsonPrimitive()) { + 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(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(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.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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `whiteListedAssetUrls` to be an array in the JSON string but got `%s`", jsonObj.get("whiteListedAssetUrls").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfig read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..2b57214c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAccessLogsUrls.java @@ -0,0 +1,289 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.net.URI; +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; + +/** + * APIConfigAccessLogsUrls + */ +@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(@javax.annotation.Nullable URI _default) { + this._default = _default; + return this; + } + + /** + * Get _default + * @return _default + */ + @javax.annotation.Nullable + public URI getDefault() { + return _default; + } + + public void setDefault(@javax.annotation.Nullable URI _default) { + this._default = _default; + } + + + public APIConfigAccessLogsUrls pico(@javax.annotation.Nullable URI pico) { + this.pico = pico; + return this; + } + + /** + * Get pico + * @return pico + */ + @javax.annotation.Nullable + public URI getPico() { + return pico; + } + + public void setPico(@javax.annotation.Nullable URI pico) { + this.pico = pico; + } + + + public APIConfigAccessLogsUrls quest(@javax.annotation.Nullable URI quest) { + this.quest = quest; + return this; + } + + /** + * Get quest + * @return quest + */ + @javax.annotation.Nullable + public URI getQuest() { + return quest; + } + + public void setQuest(@javax.annotation.Nullable URI quest) { + this.quest = quest; + } + + + public APIConfigAccessLogsUrls xrElite(@javax.annotation.Nullable URI xrElite) { + this.xrElite = xrElite; + return this; + } + + /** + * Get xrElite + * @return xrElite + */ + @javax.annotation.Nullable + public URI getXrElite() { + return xrElite; + } + + public void setXrElite(@javax.annotation.Nullable URI xrElite) { + this.xrElite = xrElite; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigAccessLogsUrls apIConfigAccessLogsUrls = (APIConfigAccessLogsUrls) o; + return Objects.equals(this._default, apIConfigAccessLogsUrls._default) && + Objects.equals(this.pico, apIConfigAccessLogsUrls.pico) && + Objects.equals(this.quest, apIConfigAccessLogsUrls.quest) && + Objects.equals(this.xrElite, apIConfigAccessLogsUrls.xrElite); + } + + @Override + public int hashCode() { + return Objects.hash(_default, pico, quest, xrElite); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigAccessLogsUrls {\n"); + sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); + sb.append(" pico: ").append(toIndentedString(pico)).append("\n"); + sb.append(" quest: ").append(toIndentedString(quest)).append("\n"); + sb.append(" xrElite: ").append(toIndentedString(xrElite)).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("Default", "Pico", "Quest", "XRElite")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigAccessLogsUrls.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 `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(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(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(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(java.util.Locale.ROOT, "Expected the field `XRElite` to be a primitive type in the JSON string but got `%s`", jsonObj.get("XRElite").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigAccessLogsUrls.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigAccessLogsUrls' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigAccessLogsUrls.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigAccessLogsUrls value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigAccessLogsUrls read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..cbe3b86b --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAnnouncement.java @@ -0,0 +1,239 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Public Announcement + * @deprecated + */ +@Deprecated +@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(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Announcement name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public APIConfigAnnouncement text(@javax.annotation.Nonnull String text) { + this.text = text; + return this; + } + + /** + * Announcement text + * @return text + */ + @javax.annotation.Nonnull + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nonnull String text) { + this.text = text; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigAnnouncement apIConfigAnnouncement = (APIConfigAnnouncement) o; + return Objects.equals(this.name, apIConfigAnnouncement.name) && + Objects.equals(this.text, apIConfigAnnouncement.text); + } + + @Override + public int hashCode() { + return Objects.hash(name, text); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigAnnouncement {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).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("name", "text")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigAnnouncement.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigAnnouncement.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigAnnouncement' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigAnnouncement.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigAnnouncement value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigAnnouncement read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..dda8e3b4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAudioConfig.java @@ -0,0 +1,466 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.math.BigDecimal; +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; + +/** + * Global configuration for Steam Audio + */ +@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(@javax.annotation.Nonnull BigDecimal eq) { + this.eq = eq; + return this; + } + + /** + * Unknown + * @return eq + */ + @javax.annotation.Nonnull + public BigDecimal getEq() { + return eq; + } + + public void setEq(@javax.annotation.Nonnull BigDecimal eq) { + this.eq = eq; + } + + + public APIConfigAudioConfig nearFieldILDNudge(@javax.annotation.Nonnull BigDecimal nearFieldILDNudge) { + this.nearFieldILDNudge = nearFieldILDNudge; + return this; + } + + /** + * Unknown + * @return nearFieldILDNudge + */ + @javax.annotation.Nonnull + public BigDecimal getNearFieldILDNudge() { + return nearFieldILDNudge; + } + + public void setNearFieldILDNudge(@javax.annotation.Nonnull BigDecimal nearFieldILDNudge) { + this.nearFieldILDNudge = nearFieldILDNudge; + } + + + public APIConfigAudioConfig nearFieldILDNudgeDistance(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeDistance) { + this.nearFieldILDNudgeDistance = nearFieldILDNudgeDistance; + return this; + } + + /** + * Unknown + * @return nearFieldILDNudgeDistance + */ + @javax.annotation.Nonnull + public BigDecimal getNearFieldILDNudgeDistance() { + return nearFieldILDNudgeDistance; + } + + public void setNearFieldILDNudgeDistance(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeDistance) { + this.nearFieldILDNudgeDistance = nearFieldILDNudgeDistance; + } + + + public APIConfigAudioConfig nearFieldILDNudgeEarRadius(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeEarRadius) { + this.nearFieldILDNudgeEarRadius = nearFieldILDNudgeEarRadius; + return this; + } + + /** + * Unknown + * @return nearFieldILDNudgeEarRadius + */ + @javax.annotation.Nonnull + public BigDecimal getNearFieldILDNudgeEarRadius() { + return nearFieldILDNudgeEarRadius; + } + + public void setNearFieldILDNudgeEarRadius(@javax.annotation.Nonnull BigDecimal nearFieldILDNudgeEarRadius) { + this.nearFieldILDNudgeEarRadius = nearFieldILDNudgeEarRadius; + } + + + public APIConfigAudioConfig perEarDirectionalityEarRadius(@javax.annotation.Nonnull BigDecimal perEarDirectionalityEarRadius) { + this.perEarDirectionalityEarRadius = perEarDirectionalityEarRadius; + return this; + } + + /** + * Unknown + * @return perEarDirectionalityEarRadius + */ + @javax.annotation.Nonnull + public BigDecimal getPerEarDirectionalityEarRadius() { + return perEarDirectionalityEarRadius; + } + + public void setPerEarDirectionalityEarRadius(@javax.annotation.Nonnull BigDecimal perEarDirectionalityEarRadius) { + this.perEarDirectionalityEarRadius = perEarDirectionalityEarRadius; + } + + + public APIConfigAudioConfig perEarDirectionalityFadeDistance(@javax.annotation.Nonnull BigDecimal perEarDirectionalityFadeDistance) { + this.perEarDirectionalityFadeDistance = perEarDirectionalityFadeDistance; + return this; + } + + /** + * Unknown + * @return perEarDirectionalityFadeDistance + */ + @javax.annotation.Nonnull + public BigDecimal getPerEarDirectionalityFadeDistance() { + return perEarDirectionalityFadeDistance; + } + + public void setPerEarDirectionalityFadeDistance(@javax.annotation.Nonnull BigDecimal perEarDirectionalityFadeDistance) { + this.perEarDirectionalityFadeDistance = perEarDirectionalityFadeDistance; + } + + + public APIConfigAudioConfig perEarDirectionalityMaxScale(@javax.annotation.Nonnull BigDecimal perEarDirectionalityMaxScale) { + this.perEarDirectionalityMaxScale = perEarDirectionalityMaxScale; + return this; + } + + /** + * Unknown + * @return perEarDirectionalityMaxScale + */ + @javax.annotation.Nonnull + public BigDecimal getPerEarDirectionalityMaxScale() { + return perEarDirectionalityMaxScale; + } + + public void setPerEarDirectionalityMaxScale(@javax.annotation.Nonnull BigDecimal perEarDirectionalityMaxScale) { + this.perEarDirectionalityMaxScale = perEarDirectionalityMaxScale; + } + + + public APIConfigAudioConfig perEarDirectionalityPCFactor(@javax.annotation.Nonnull BigDecimal perEarDirectionalityPCFactor) { + this.perEarDirectionalityPCFactor = perEarDirectionalityPCFactor; + return this; + } + + /** + * Unknown + * @return perEarDirectionalityPCFactor + */ + @javax.annotation.Nonnull + public BigDecimal getPerEarDirectionalityPCFactor() { + return perEarDirectionalityPCFactor; + } + + public void setPerEarDirectionalityPCFactor(@javax.annotation.Nonnull BigDecimal perEarDirectionalityPCFactor) { + this.perEarDirectionalityPCFactor = perEarDirectionalityPCFactor; + } + + + public APIConfigAudioConfig trackingScaleMax(@javax.annotation.Nonnull BigDecimal trackingScaleMax) { + this.trackingScaleMax = trackingScaleMax; + return this; + } + + /** + * Unknown + * @return trackingScaleMax + */ + @javax.annotation.Nonnull + public BigDecimal getTrackingScaleMax() { + return trackingScaleMax; + } + + public void setTrackingScaleMax(@javax.annotation.Nonnull BigDecimal trackingScaleMax) { + this.trackingScaleMax = trackingScaleMax; + } + + + public APIConfigAudioConfig trackingScaleMin(@javax.annotation.Nonnull BigDecimal trackingScaleMin) { + this.trackingScaleMin = trackingScaleMin; + return this; + } + + /** + * Unknown + * @return trackingScaleMin + */ + @javax.annotation.Nonnull + public BigDecimal getTrackingScaleMin() { + return trackingScaleMin; + } + + public void setTrackingScaleMin(@javax.annotation.Nonnull BigDecimal trackingScaleMin) { + this.trackingScaleMin = trackingScaleMin; + } + + + public APIConfigAudioConfig trackingScaleMultiplier(@javax.annotation.Nonnull BigDecimal trackingScaleMultiplier) { + this.trackingScaleMultiplier = trackingScaleMultiplier; + return this; + } + + /** + * Unknown + * @return trackingScaleMultiplier + */ + @javax.annotation.Nonnull + public BigDecimal getTrackingScaleMultiplier() { + return trackingScaleMultiplier; + } + + public void setTrackingScaleMultiplier(@javax.annotation.Nonnull BigDecimal trackingScaleMultiplier) { + this.trackingScaleMultiplier = trackingScaleMultiplier; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigAudioConfig apIConfigAudioConfig = (APIConfigAudioConfig) o; + return Objects.equals(this.eq, apIConfigAudioConfig.eq) && + Objects.equals(this.nearFieldILDNudge, apIConfigAudioConfig.nearFieldILDNudge) && + Objects.equals(this.nearFieldILDNudgeDistance, apIConfigAudioConfig.nearFieldILDNudgeDistance) && + Objects.equals(this.nearFieldILDNudgeEarRadius, apIConfigAudioConfig.nearFieldILDNudgeEarRadius) && + Objects.equals(this.perEarDirectionalityEarRadius, apIConfigAudioConfig.perEarDirectionalityEarRadius) && + Objects.equals(this.perEarDirectionalityFadeDistance, apIConfigAudioConfig.perEarDirectionalityFadeDistance) && + Objects.equals(this.perEarDirectionalityMaxScale, apIConfigAudioConfig.perEarDirectionalityMaxScale) && + Objects.equals(this.perEarDirectionalityPCFactor, apIConfigAudioConfig.perEarDirectionalityPCFactor) && + Objects.equals(this.trackingScaleMax, apIConfigAudioConfig.trackingScaleMax) && + Objects.equals(this.trackingScaleMin, apIConfigAudioConfig.trackingScaleMin) && + Objects.equals(this.trackingScaleMultiplier, apIConfigAudioConfig.trackingScaleMultiplier); + } + + @Override + public int hashCode() { + return Objects.hash(eq, nearFieldILDNudge, nearFieldILDNudgeDistance, nearFieldILDNudgeEarRadius, perEarDirectionalityEarRadius, perEarDirectionalityFadeDistance, perEarDirectionalityMaxScale, perEarDirectionalityPCFactor, trackingScaleMax, trackingScaleMin, trackingScaleMultiplier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigAudioConfig {\n"); + sb.append(" eq: ").append(toIndentedString(eq)).append("\n"); + sb.append(" nearFieldILDNudge: ").append(toIndentedString(nearFieldILDNudge)).append("\n"); + sb.append(" nearFieldILDNudgeDistance: ").append(toIndentedString(nearFieldILDNudgeDistance)).append("\n"); + sb.append(" nearFieldILDNudgeEarRadius: ").append(toIndentedString(nearFieldILDNudgeEarRadius)).append("\n"); + sb.append(" perEarDirectionalityEarRadius: ").append(toIndentedString(perEarDirectionalityEarRadius)).append("\n"); + sb.append(" perEarDirectionalityFadeDistance: ").append(toIndentedString(perEarDirectionalityFadeDistance)).append("\n"); + sb.append(" perEarDirectionalityMaxScale: ").append(toIndentedString(perEarDirectionalityMaxScale)).append("\n"); + sb.append(" perEarDirectionalityPCFactor: ").append(toIndentedString(perEarDirectionalityPCFactor)).append("\n"); + sb.append(" trackingScaleMax: ").append(toIndentedString(trackingScaleMax)).append("\n"); + sb.append(" trackingScaleMin: ").append(toIndentedString(trackingScaleMin)).append("\n"); + sb.append(" trackingScaleMultiplier: ").append(toIndentedString(trackingScaleMultiplier)).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("eq", "nearFieldILDNudge", "nearFieldILDNudgeDistance", "nearFieldILDNudgeEarRadius", "perEarDirectionalityEarRadius", "perEarDirectionalityFadeDistance", "perEarDirectionalityMaxScale", "perEarDirectionalityPCFactor", "trackingScaleMax", "trackingScaleMin", "trackingScaleMultiplier")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigAudioConfig.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigAudioConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigAudioConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigAudioConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigAudioConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigAudioConfig read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..f4cc9a22 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigAvatarPerfLimiter.java @@ -0,0 +1,348 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.PerformanceLimiterInfo; +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; + +/** + * APIConfigAvatarPerfLimiter + */ +@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(@javax.annotation.Nonnull PerformanceLimiterInfo androidMobile) { + this.androidMobile = androidMobile; + return this; + } + + /** + * Get androidMobile + * @return androidMobile + */ + @javax.annotation.Nonnull + public PerformanceLimiterInfo getAndroidMobile() { + return androidMobile; + } + + public void setAndroidMobile(@javax.annotation.Nonnull PerformanceLimiterInfo androidMobile) { + this.androidMobile = androidMobile; + } + + + public APIConfigAvatarPerfLimiter PC(@javax.annotation.Nonnull PerformanceLimiterInfo PC) { + this.PC = PC; + return this; + } + + /** + * Get PC + * @return PC + */ + @javax.annotation.Nonnull + public PerformanceLimiterInfo getPC() { + return PC; + } + + public void setPC(@javax.annotation.Nonnull PerformanceLimiterInfo PC) { + this.PC = PC; + } + + + public APIConfigAvatarPerfLimiter pico(@javax.annotation.Nonnull PerformanceLimiterInfo pico) { + this.pico = pico; + return this; + } + + /** + * Get pico + * @return pico + */ + @javax.annotation.Nonnull + public PerformanceLimiterInfo getPico() { + return pico; + } + + public void setPico(@javax.annotation.Nonnull PerformanceLimiterInfo pico) { + this.pico = pico; + } + + + public APIConfigAvatarPerfLimiter quest(@javax.annotation.Nonnull PerformanceLimiterInfo quest) { + this.quest = quest; + return this; + } + + /** + * Get quest + * @return quest + */ + @javax.annotation.Nonnull + public PerformanceLimiterInfo getQuest() { + return quest; + } + + public void setQuest(@javax.annotation.Nonnull PerformanceLimiterInfo quest) { + this.quest = quest; + } + + + public APIConfigAvatarPerfLimiter xrElite(@javax.annotation.Nonnull PerformanceLimiterInfo xrElite) { + this.xrElite = xrElite; + return this; + } + + /** + * Get xrElite + * @return xrElite + */ + @javax.annotation.Nonnull + public PerformanceLimiterInfo getXrElite() { + return xrElite; + } + + public void setXrElite(@javax.annotation.Nonnull PerformanceLimiterInfo xrElite) { + this.xrElite = xrElite; + } + + + public APIConfigAvatarPerfLimiter iOSMobile(@javax.annotation.Nonnull PerformanceLimiterInfo iOSMobile) { + this.iOSMobile = iOSMobile; + return this; + } + + /** + * Get iOSMobile + * @return iOSMobile + */ + @javax.annotation.Nonnull + public PerformanceLimiterInfo getiOSMobile() { + return iOSMobile; + } + + public void setiOSMobile(@javax.annotation.Nonnull PerformanceLimiterInfo iOSMobile) { + this.iOSMobile = iOSMobile; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigAvatarPerfLimiter apIConfigAvatarPerfLimiter = (APIConfigAvatarPerfLimiter) o; + return Objects.equals(this.androidMobile, apIConfigAvatarPerfLimiter.androidMobile) && + Objects.equals(this.PC, apIConfigAvatarPerfLimiter.PC) && + Objects.equals(this.pico, apIConfigAvatarPerfLimiter.pico) && + Objects.equals(this.quest, apIConfigAvatarPerfLimiter.quest) && + Objects.equals(this.xrElite, apIConfigAvatarPerfLimiter.xrElite) && + Objects.equals(this.iOSMobile, apIConfigAvatarPerfLimiter.iOSMobile); + } + + @Override + public int hashCode() { + return Objects.hash(androidMobile, PC, pico, quest, xrElite, iOSMobile); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigAvatarPerfLimiter {\n"); + sb.append(" androidMobile: ").append(toIndentedString(androidMobile)).append("\n"); + sb.append(" PC: ").append(toIndentedString(PC)).append("\n"); + sb.append(" pico: ").append(toIndentedString(pico)).append("\n"); + sb.append(" quest: ").append(toIndentedString(quest)).append("\n"); + sb.append(" xrElite: ").append(toIndentedString(xrElite)).append("\n"); + sb.append(" iOSMobile: ").append(toIndentedString(iOSMobile)).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("AndroidMobile", "PC", "Pico", "Quest", "XRElite", "iOSMobile")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("AndroidMobile", "PC", "Pico", "Quest", "XRElite", "iOSMobile")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigAvatarPerfLimiter.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 `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 (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.validateJsonElement(jsonObj.get("AndroidMobile")); + // validate the required field `PC` + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("PC")); + // validate the required field `Pico` + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("Pico")); + // validate the required field `Quest` + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("Quest")); + // validate the required field `XRElite` + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("XRElite")); + // validate the required field `iOSMobile` + PerformanceLimiterInfo.validateJsonElement(jsonObj.get("iOSMobile")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigAvatarPerfLimiter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigAvatarPerfLimiter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigAvatarPerfLimiter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigAvatarPerfLimiter value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigAvatarPerfLimiter read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ff1083bc --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstants.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.APIConfigConstantsGROUPS; +import io.github.vrchatapi.model.APIConfigConstantsINSTANCE; +import io.github.vrchatapi.model.APIConfigConstantsLANGUAGE; +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; + +/** + * Constants + */ +@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(@javax.annotation.Nonnull APIConfigConstantsGROUPS GROUPS) { + this.GROUPS = GROUPS; + return this; + } + + /** + * Get GROUPS + * @return GROUPS + */ + @javax.annotation.Nonnull + public APIConfigConstantsGROUPS getGROUPS() { + return GROUPS; + } + + public void setGROUPS(@javax.annotation.Nonnull APIConfigConstantsGROUPS GROUPS) { + this.GROUPS = GROUPS; + } + + + public APIConfigConstants INSTANCE(@javax.annotation.Nonnull APIConfigConstantsINSTANCE INSTANCE) { + this.INSTANCE = INSTANCE; + return this; + } + + /** + * Get INSTANCE + * @return INSTANCE + */ + @javax.annotation.Nonnull + public APIConfigConstantsINSTANCE getINSTANCE() { + return INSTANCE; + } + + public void setINSTANCE(@javax.annotation.Nonnull APIConfigConstantsINSTANCE INSTANCE) { + this.INSTANCE = INSTANCE; + } + + + public APIConfigConstants LANGUAGE(@javax.annotation.Nonnull APIConfigConstantsLANGUAGE LANGUAGE) { + this.LANGUAGE = LANGUAGE; + return this; + } + + /** + * Get LANGUAGE + * @return LANGUAGE + */ + @javax.annotation.Nonnull + public APIConfigConstantsLANGUAGE getLANGUAGE() { + return LANGUAGE; + } + + public void setLANGUAGE(@javax.annotation.Nonnull APIConfigConstantsLANGUAGE LANGUAGE) { + this.LANGUAGE = LANGUAGE; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstants apIConfigConstants = (APIConfigConstants) o; + return Objects.equals(this.GROUPS, apIConfigConstants.GROUPS) && + Objects.equals(this.INSTANCE, apIConfigConstants.INSTANCE) && + Objects.equals(this.LANGUAGE, apIConfigConstants.LANGUAGE); + } + + @Override + public int hashCode() { + return Objects.hash(GROUPS, INSTANCE, LANGUAGE); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstants {\n"); + sb.append(" GROUPS: ").append(toIndentedString(GROUPS)).append("\n"); + sb.append(" INSTANCE: ").append(toIndentedString(INSTANCE)).append("\n"); + sb.append(" LANGUAGE: ").append(toIndentedString(LANGUAGE)).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("GROUPS", "INSTANCE", "LANGUAGE")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("GROUPS", "INSTANCE", "LANGUAGE")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstants.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 `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 (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.validateJsonElement(jsonObj.get("GROUPS")); + // validate the required field `INSTANCE` + APIConfigConstantsINSTANCE.validateJsonElement(jsonObj.get("INSTANCE")); + // validate the required field `LANGUAGE` + APIConfigConstantsLANGUAGE.validateJsonElement(jsonObj.get("LANGUAGE")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstants.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstants' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstants.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstants value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstants read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ed7fd9e1 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsGROUPS.java @@ -0,0 +1,446 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * Group-related constants + */ +@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) + @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(@javax.annotation.Nullable Integer CAPACITY) { + this.CAPACITY = CAPACITY; + return this; + } + + /** + * Maximum group capacity + * @return CAPACITY + */ + @javax.annotation.Nullable + public Integer getCAPACITY() { + return CAPACITY; + } + + public void setCAPACITY(@javax.annotation.Nullable Integer CAPACITY) { + this.CAPACITY = CAPACITY; + } + + + public APIConfigConstantsGROUPS GROUP_TRANSFER_REQUIREMENTS(@javax.annotation.Nullable List GROUP_TRANSFER_REQUIREMENTS) { + this.GROUP_TRANSFER_REQUIREMENTS = GROUP_TRANSFER_REQUIREMENTS; + return this; + } + + public APIConfigConstantsGROUPS addGROUPTRANSFERREQUIREMENTSItem(String GROUP_TRANSFER_REQUIREMENTSItem) { + if (this.GROUP_TRANSFER_REQUIREMENTS == null) { + this.GROUP_TRANSFER_REQUIREMENTS = new ArrayList<>(); + } + this.GROUP_TRANSFER_REQUIREMENTS.add(GROUP_TRANSFER_REQUIREMENTSItem); + return this; + } + + /** + * Requirements for transferring group ownership + * @return GROUP_TRANSFER_REQUIREMENTS + */ + @javax.annotation.Nullable + public List getGROUPTRANSFERREQUIREMENTS() { + return 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(@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 + public Integer getMAXINVITESREQUESTS() { + return MAX_INVITES_REQUESTS; + } + + public void setMAXINVITESREQUESTS(@javax.annotation.Nullable Integer MAX_INVITES_REQUESTS) { + this.MAX_INVITES_REQUESTS = MAX_INVITES_REQUESTS; + } + + + 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 + public Integer getMAXJOINED() { + return MAX_JOINED; + } + + public void setMAXJOINED(@javax.annotation.Nullable Integer MAX_JOINED) { + this.MAX_JOINED = MAX_JOINED; + } + + + 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 + public Integer getMAXJOINEDPLUS() { + return MAX_JOINED_PLUS; + } + + public void setMAXJOINEDPLUS(@javax.annotation.Nullable Integer MAX_JOINED_PLUS) { + this.MAX_JOINED_PLUS = MAX_JOINED_PLUS; + } + + + 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 + public Integer getMAXLANGUAGES() { + return MAX_LANGUAGES; + } + + public void setMAXLANGUAGES(@javax.annotation.Nullable Integer MAX_LANGUAGES) { + this.MAX_LANGUAGES = MAX_LANGUAGES; + } + + + 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 + public Integer getMAXLINKS() { + return MAX_LINKS; + } + + public void setMAXLINKS(@javax.annotation.Nullable Integer MAX_LINKS) { + this.MAX_LINKS = MAX_LINKS; + } + + + 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 + public Integer getMAXMANAGEMENTROLES() { + return MAX_MANAGEMENT_ROLES; + } + + public void setMAXMANAGEMENTROLES(@javax.annotation.Nullable Integer MAX_MANAGEMENT_ROLES) { + this.MAX_MANAGEMENT_ROLES = MAX_MANAGEMENT_ROLES; + } + + + 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 + public Integer getMAXOWNED() { + return MAX_OWNED; + } + + public void setMAXOWNED(@javax.annotation.Nullable Integer MAX_OWNED) { + this.MAX_OWNED = MAX_OWNED; + } + + + 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 + public Integer getMAXROLES() { + return MAX_ROLES; + } + + public void setMAXROLES(@javax.annotation.Nullable Integer MAX_ROLES) { + this.MAX_ROLES = MAX_ROLES; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstantsGROUPS apIConfigConstantsGROUPS = (APIConfigConstantsGROUPS) o; + return Objects.equals(this.CAPACITY, apIConfigConstantsGROUPS.CAPACITY) && + Objects.equals(this.GROUP_TRANSFER_REQUIREMENTS, apIConfigConstantsGROUPS.GROUP_TRANSFER_REQUIREMENTS) && + Objects.equals(this.MAX_INVITES_REQUESTS, apIConfigConstantsGROUPS.MAX_INVITES_REQUESTS) && + Objects.equals(this.MAX_JOINED, apIConfigConstantsGROUPS.MAX_JOINED) && + Objects.equals(this.MAX_JOINED_PLUS, apIConfigConstantsGROUPS.MAX_JOINED_PLUS) && + Objects.equals(this.MAX_LANGUAGES, apIConfigConstantsGROUPS.MAX_LANGUAGES) && + Objects.equals(this.MAX_LINKS, apIConfigConstantsGROUPS.MAX_LINKS) && + Objects.equals(this.MAX_MANAGEMENT_ROLES, apIConfigConstantsGROUPS.MAX_MANAGEMENT_ROLES) && + Objects.equals(this.MAX_OWNED, apIConfigConstantsGROUPS.MAX_OWNED) && + Objects.equals(this.MAX_ROLES, apIConfigConstantsGROUPS.MAX_ROLES); + } + + @Override + public int hashCode() { + return Objects.hash(CAPACITY, GROUP_TRANSFER_REQUIREMENTS, MAX_INVITES_REQUESTS, MAX_JOINED, MAX_JOINED_PLUS, MAX_LANGUAGES, MAX_LINKS, MAX_MANAGEMENT_ROLES, MAX_OWNED, MAX_ROLES); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstantsGROUPS {\n"); + sb.append(" CAPACITY: ").append(toIndentedString(CAPACITY)).append("\n"); + sb.append(" GROUP_TRANSFER_REQUIREMENTS: ").append(toIndentedString(GROUP_TRANSFER_REQUIREMENTS)).append("\n"); + sb.append(" MAX_INVITES_REQUESTS: ").append(toIndentedString(MAX_INVITES_REQUESTS)).append("\n"); + sb.append(" MAX_JOINED: ").append(toIndentedString(MAX_JOINED)).append("\n"); + sb.append(" MAX_JOINED_PLUS: ").append(toIndentedString(MAX_JOINED_PLUS)).append("\n"); + sb.append(" MAX_LANGUAGES: ").append(toIndentedString(MAX_LANGUAGES)).append("\n"); + sb.append(" MAX_LINKS: ").append(toIndentedString(MAX_LINKS)).append("\n"); + sb.append(" MAX_MANAGEMENT_ROLES: ").append(toIndentedString(MAX_MANAGEMENT_ROLES)).append("\n"); + sb.append(" MAX_OWNED: ").append(toIndentedString(MAX_OWNED)).append("\n"); + sb.append(" MAX_ROLES: ").append(toIndentedString(MAX_ROLES)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstantsGROUPS.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 `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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstantsGROUPS.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstantsGROUPS' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstantsGROUPS.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstantsGROUPS value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstantsGROUPS read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..bf5dc327 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCE.java @@ -0,0 +1,203 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.APIConfigConstantsINSTANCEPOPULATIONBRACKETS; +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; + +/** + * Instance-related constants + */ +@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(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETS POPULATION_BRACKETS) { + this.POPULATION_BRACKETS = POPULATION_BRACKETS; + return this; + } + + /** + * Get POPULATION_BRACKETS + * @return POPULATION_BRACKETS + */ + @javax.annotation.Nullable + public APIConfigConstantsINSTANCEPOPULATIONBRACKETS getPOPULATIONBRACKETS() { + return POPULATION_BRACKETS; + } + + public void setPOPULATIONBRACKETS(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETS POPULATION_BRACKETS) { + this.POPULATION_BRACKETS = POPULATION_BRACKETS; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstantsINSTANCE apIConfigConstantsINSTANCE = (APIConfigConstantsINSTANCE) o; + return Objects.equals(this.POPULATION_BRACKETS, apIConfigConstantsINSTANCE.POPULATION_BRACKETS); + } + + @Override + public int hashCode() { + return Objects.hash(POPULATION_BRACKETS); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstantsINSTANCE {\n"); + sb.append(" POPULATION_BRACKETS: ").append(toIndentedString(POPULATION_BRACKETS)).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("POPULATION_BRACKETS")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstantsINSTANCE.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 `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.validateJsonElement(jsonObj.get("POPULATION_BRACKETS")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstantsINSTANCE.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstantsINSTANCE' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstantsINSTANCE.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstantsINSTANCE value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstantsINSTANCE read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..b7b87608 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETS.java @@ -0,0 +1,265 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED; +import io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW; +import io.github.vrchatapi.model.APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY; +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; + +/** + * Population brackets based on instance population + */ +@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(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED CROWDED) { + this.CROWDED = CROWDED; + return this; + } + + /** + * Get CROWDED + * @return CROWDED + */ + @javax.annotation.Nullable + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED getCROWDED() { + return CROWDED; + } + + public void setCROWDED(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED CROWDED) { + this.CROWDED = CROWDED; + } + + + public APIConfigConstantsINSTANCEPOPULATIONBRACKETS FEW(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW FEW) { + this.FEW = FEW; + return this; + } + + /** + * Get FEW + * @return FEW + */ + @javax.annotation.Nullable + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW getFEW() { + return FEW; + } + + public void setFEW(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW FEW) { + this.FEW = FEW; + } + + + public APIConfigConstantsINSTANCEPOPULATIONBRACKETS MANY(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY MANY) { + this.MANY = MANY; + return this; + } + + /** + * Get MANY + * @return MANY + */ + @javax.annotation.Nullable + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY getMANY() { + return MANY; + } + + public void setMANY(@javax.annotation.Nullable APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY MANY) { + this.MANY = MANY; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstantsINSTANCEPOPULATIONBRACKETS apIConfigConstantsINSTANCEPOPULATIONBRACKETS = (APIConfigConstantsINSTANCEPOPULATIONBRACKETS) o; + return Objects.equals(this.CROWDED, apIConfigConstantsINSTANCEPOPULATIONBRACKETS.CROWDED) && + Objects.equals(this.FEW, apIConfigConstantsINSTANCEPOPULATIONBRACKETS.FEW) && + Objects.equals(this.MANY, apIConfigConstantsINSTANCEPOPULATIONBRACKETS.MANY); + } + + @Override + public int hashCode() { + return Objects.hash(CROWDED, FEW, MANY); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstantsINSTANCEPOPULATIONBRACKETS {\n"); + sb.append(" CROWDED: ").append(toIndentedString(CROWDED)).append("\n"); + sb.append(" FEW: ").append(toIndentedString(FEW)).append("\n"); + sb.append(" MANY: ").append(toIndentedString(MANY)).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("CROWDED", "FEW", "MANY")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETS.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 `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.validateJsonElement(jsonObj.get("CROWDED")); + } + // validate the optional field `FEW` + if (jsonObj.get("FEW") != null && !jsonObj.get("FEW").isJsonNull()) { + APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.validateJsonElement(jsonObj.get("FEW")); + } + // validate the optional field `MANY` + if (jsonObj.get("MANY") != null && !jsonObj.get("MANY").isJsonNull()) { + APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.validateJsonElement(jsonObj.get("MANY")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETS.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstantsINSTANCEPOPULATIONBRACKETS' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstantsINSTANCEPOPULATIONBRACKETS.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETS value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstantsINSTANCEPOPULATIONBRACKETS read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..209764af --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.java @@ -0,0 +1,224 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Crowded population range + */ +@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(@javax.annotation.Nullable Integer max) { + this.max = max; + return this; + } + + /** + * Maximum population for a crowded instance + * @return max + */ + @javax.annotation.Nullable + public Integer getMax() { + return max; + } + + public void setMax(@javax.annotation.Nullable Integer max) { + this.max = max; + } + + + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED min(@javax.annotation.Nullable Integer min) { + this.min = min; + return this; + } + + /** + * Minimum population for a crowded instance + * @return min + */ + @javax.annotation.Nullable + public Integer getMin() { + return min; + } + + public void setMin(@javax.annotation.Nullable Integer min) { + this.min = min; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED apIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED = (APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED) o; + return Objects.equals(this.max, apIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.max) && + Objects.equals(this.min, apIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.min); + } + + @Override + public int hashCode() { + return Objects.hash(max, min); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED {\n"); + sb.append(" max: ").append(toIndentedString(max)).append("\n"); + sb.append(" min: ").append(toIndentedString(min)).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("max", "min")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.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 `APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSCROWDED read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..0a4d27b5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.java @@ -0,0 +1,224 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Few population range + */ +@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(@javax.annotation.Nullable Integer max) { + this.max = max; + return this; + } + + /** + * Maximum population for a few instance + * @return max + */ + @javax.annotation.Nullable + public Integer getMax() { + return max; + } + + public void setMax(@javax.annotation.Nullable Integer max) { + this.max = max; + } + + + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW min(@javax.annotation.Nullable Integer min) { + this.min = min; + return this; + } + + /** + * Minimum population for a few instance + * @return min + */ + @javax.annotation.Nullable + public Integer getMin() { + return min; + } + + public void setMin(@javax.annotation.Nullable Integer min) { + this.min = min; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW apIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW = (APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW) o; + return Objects.equals(this.max, apIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.max) && + Objects.equals(this.min, apIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.min); + } + + @Override + public int hashCode() { + return Objects.hash(max, min); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW {\n"); + sb.append(" max: ").append(toIndentedString(max)).append("\n"); + sb.append(" min: ").append(toIndentedString(min)).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("max", "min")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.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 `APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSFEW read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..3b5f7ea6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.java @@ -0,0 +1,224 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Many population range + */ +@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(@javax.annotation.Nullable Integer max) { + this.max = max; + return this; + } + + /** + * Maximum population for a many instance + * @return max + */ + @javax.annotation.Nullable + public Integer getMax() { + return max; + } + + public void setMax(@javax.annotation.Nullable Integer max) { + this.max = max; + } + + + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY min(@javax.annotation.Nullable Integer min) { + this.min = min; + return this; + } + + /** + * Minimum population for a many instance + * @return min + */ + @javax.annotation.Nullable + public Integer getMin() { + return min; + } + + public void setMin(@javax.annotation.Nullable Integer min) { + this.min = min; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY apIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY = (APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY) o; + return Objects.equals(this.max, apIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.max) && + Objects.equals(this.min, apIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.min); + } + + @Override + public int hashCode() { + return Objects.hash(max, min); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY {\n"); + sb.append(" max: ").append(toIndentedString(max)).append("\n"); + sb.append(" min: ").append(toIndentedString(min)).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("max", "min")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.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 `APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstantsINSTANCEPOPULATIONBRACKETSMANY read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..75f92099 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigConstantsLANGUAGE.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 java.util.HashMap; +import java.util.Map; + +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; + +/** + * Language-related constants + */ +@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) + @javax.annotation.Nullable + private Map SPOKEN_LANGUAGE_OPTIONS = new HashMap<>(); + + public APIConfigConstantsLANGUAGE() { + } + + public APIConfigConstantsLANGUAGE SPOKEN_LANGUAGE_OPTIONS(@javax.annotation.Nullable Map SPOKEN_LANGUAGE_OPTIONS) { + this.SPOKEN_LANGUAGE_OPTIONS = SPOKEN_LANGUAGE_OPTIONS; + return this; + } + + public APIConfigConstantsLANGUAGE putSPOKENLANGUAGEOPTIONSItem(String key, String SPOKEN_LANGUAGE_OPTIONSItem) { + if (this.SPOKEN_LANGUAGE_OPTIONS == null) { + this.SPOKEN_LANGUAGE_OPTIONS = new HashMap<>(); + } + this.SPOKEN_LANGUAGE_OPTIONS.put(key, SPOKEN_LANGUAGE_OPTIONSItem); + return this; + } + + /** + * Supported spoken language options + * @return SPOKEN_LANGUAGE_OPTIONS + */ + @javax.annotation.Nullable + public Map getSPOKENLANGUAGEOPTIONS() { + return SPOKEN_LANGUAGE_OPTIONS; + } + + public void setSPOKENLANGUAGEOPTIONS(@javax.annotation.Nullable Map SPOKEN_LANGUAGE_OPTIONS) { + this.SPOKEN_LANGUAGE_OPTIONS = SPOKEN_LANGUAGE_OPTIONS; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigConstantsLANGUAGE apIConfigConstantsLANGUAGE = (APIConfigConstantsLANGUAGE) o; + return Objects.equals(this.SPOKEN_LANGUAGE_OPTIONS, apIConfigConstantsLANGUAGE.SPOKEN_LANGUAGE_OPTIONS); + } + + @Override + public int hashCode() { + return Objects.hash(SPOKEN_LANGUAGE_OPTIONS); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigConstantsLANGUAGE {\n"); + sb.append(" SPOKEN_LANGUAGE_OPTIONS: ").append(toIndentedString(SPOKEN_LANGUAGE_OPTIONS)).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("SPOKEN_LANGUAGE_OPTIONS")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigConstantsLANGUAGE.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 `APIConfigConstantsLANGUAGE` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigConstantsLANGUAGE.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigConstantsLANGUAGE' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigConstantsLANGUAGE.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigConstantsLANGUAGE value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigConstantsLANGUAGE read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ddc436a3 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigDownloadURLList.java @@ -0,0 +1,329 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Download links for various development assets. + */ +@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(@javax.annotation.Nonnull String bootstrap) { + this.bootstrap = bootstrap; + return this; + } + + /** + * Download link for ??? + * @return bootstrap + */ + @javax.annotation.Nonnull + public String getBootstrap() { + return bootstrap; + } + + public void setBootstrap(@javax.annotation.Nonnull String bootstrap) { + this.bootstrap = bootstrap; + } + + + @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 + public String getSdk2() { + return sdk2; + } + + @Deprecated + public void setSdk2(@javax.annotation.Nonnull String sdk2) { + this.sdk2 = sdk2; + } + + + public APIConfigDownloadURLList sdk3Avatars(@javax.annotation.Nonnull String sdk3Avatars) { + this.sdk3Avatars = sdk3Avatars; + return this; + } + + /** + * Download link for SDK3 for Avatars + * @return sdk3Avatars + */ + @javax.annotation.Nonnull + public String getSdk3Avatars() { + return sdk3Avatars; + } + + public void setSdk3Avatars(@javax.annotation.Nonnull String sdk3Avatars) { + this.sdk3Avatars = sdk3Avatars; + } + + + public APIConfigDownloadURLList sdk3Worlds(@javax.annotation.Nonnull String sdk3Worlds) { + this.sdk3Worlds = sdk3Worlds; + return this; + } + + /** + * Download link for SDK3 for Worlds + * @return sdk3Worlds + */ + @javax.annotation.Nonnull + public String getSdk3Worlds() { + return sdk3Worlds; + } + + public void setSdk3Worlds(@javax.annotation.Nonnull String sdk3Worlds) { + this.sdk3Worlds = sdk3Worlds; + } + + + public APIConfigDownloadURLList vcc(@javax.annotation.Nonnull String vcc) { + this.vcc = vcc; + return this; + } + + /** + * Download link for the Creator Companion + * @return vcc + */ + @javax.annotation.Nonnull + public String getVcc() { + return vcc; + } + + public void setVcc(@javax.annotation.Nonnull String vcc) { + this.vcc = vcc; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigDownloadURLList apIConfigDownloadURLList = (APIConfigDownloadURLList) o; + return Objects.equals(this.bootstrap, apIConfigDownloadURLList.bootstrap) && + Objects.equals(this.sdk2, apIConfigDownloadURLList.sdk2) && + Objects.equals(this.sdk3Avatars, apIConfigDownloadURLList.sdk3Avatars) && + Objects.equals(this.sdk3Worlds, apIConfigDownloadURLList.sdk3Worlds) && + Objects.equals(this.vcc, apIConfigDownloadURLList.vcc); + } + + @Override + public int hashCode() { + return Objects.hash(bootstrap, sdk2, sdk3Avatars, sdk3Worlds, vcc); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigDownloadURLList {\n"); + sb.append(" bootstrap: ").append(toIndentedString(bootstrap)).append("\n"); + sb.append(" sdk2: ").append(toIndentedString(sdk2)).append("\n"); + sb.append(" sdk3Avatars: ").append(toIndentedString(sdk3Avatars)).append("\n"); + sb.append(" sdk3Worlds: ").append(toIndentedString(sdk3Worlds)).append("\n"); + sb.append(" vcc: ").append(toIndentedString(vcc)).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("bootstrap", "sdk2", "sdk3-avatars", "sdk3-worlds", "vcc")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("bootstrap", "sdk2", "sdk3-avatars", "sdk3-worlds", "vcc")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigDownloadURLList.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `vcc` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vcc").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigDownloadURLList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigDownloadURLList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigDownloadURLList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigDownloadURLList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigDownloadURLList read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..f003778c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigEvents.java @@ -0,0 +1,465 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * APIConfigEvents + */ +@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(@javax.annotation.Nonnull Integer distanceClose) { + this.distanceClose = distanceClose; + return this; + } + + /** + * Unknown + * @return distanceClose + */ + @javax.annotation.Nonnull + public Integer getDistanceClose() { + return distanceClose; + } + + public void setDistanceClose(@javax.annotation.Nonnull Integer distanceClose) { + this.distanceClose = distanceClose; + } + + + public APIConfigEvents distanceFactor(@javax.annotation.Nonnull Integer distanceFactor) { + this.distanceFactor = distanceFactor; + return this; + } + + /** + * Unknown + * @return distanceFactor + */ + @javax.annotation.Nonnull + public Integer getDistanceFactor() { + return distanceFactor; + } + + public void setDistanceFactor(@javax.annotation.Nonnull Integer distanceFactor) { + this.distanceFactor = distanceFactor; + } + + + public APIConfigEvents distanceFar(@javax.annotation.Nonnull Integer distanceFar) { + this.distanceFar = distanceFar; + return this; + } + + /** + * Unknown + * @return distanceFar + */ + @javax.annotation.Nonnull + public Integer getDistanceFar() { + return distanceFar; + } + + public void setDistanceFar(@javax.annotation.Nonnull Integer distanceFar) { + this.distanceFar = distanceFar; + } + + + public APIConfigEvents groupDistance(@javax.annotation.Nonnull Integer groupDistance) { + this.groupDistance = groupDistance; + return this; + } + + /** + * Unknown + * @return groupDistance + */ + @javax.annotation.Nonnull + public Integer getGroupDistance() { + return groupDistance; + } + + public void setGroupDistance(@javax.annotation.Nonnull Integer groupDistance) { + this.groupDistance = groupDistance; + } + + + public APIConfigEvents maximumBunchSize(@javax.annotation.Nonnull Integer maximumBunchSize) { + this.maximumBunchSize = maximumBunchSize; + return this; + } + + /** + * Unknown + * @return maximumBunchSize + */ + @javax.annotation.Nonnull + public Integer getMaximumBunchSize() { + return maximumBunchSize; + } + + public void setMaximumBunchSize(@javax.annotation.Nonnull Integer maximumBunchSize) { + this.maximumBunchSize = maximumBunchSize; + } + + + public APIConfigEvents notVisibleFactor(@javax.annotation.Nonnull Integer notVisibleFactor) { + this.notVisibleFactor = notVisibleFactor; + return this; + } + + /** + * Unknown + * @return notVisibleFactor + */ + @javax.annotation.Nonnull + public Integer getNotVisibleFactor() { + return notVisibleFactor; + } + + public void setNotVisibleFactor(@javax.annotation.Nonnull Integer notVisibleFactor) { + this.notVisibleFactor = notVisibleFactor; + } + + + public APIConfigEvents playerOrderBucketSize(@javax.annotation.Nonnull Integer playerOrderBucketSize) { + this.playerOrderBucketSize = playerOrderBucketSize; + return this; + } + + /** + * Unknown + * @return playerOrderBucketSize + */ + @javax.annotation.Nonnull + public Integer getPlayerOrderBucketSize() { + return playerOrderBucketSize; + } + + public void setPlayerOrderBucketSize(@javax.annotation.Nonnull Integer playerOrderBucketSize) { + this.playerOrderBucketSize = playerOrderBucketSize; + } + + + public APIConfigEvents playerOrderFactor(@javax.annotation.Nonnull Integer playerOrderFactor) { + this.playerOrderFactor = playerOrderFactor; + return this; + } + + /** + * Unknown + * @return playerOrderFactor + */ + @javax.annotation.Nonnull + public Integer getPlayerOrderFactor() { + return playerOrderFactor; + } + + public void setPlayerOrderFactor(@javax.annotation.Nonnull Integer playerOrderFactor) { + this.playerOrderFactor = playerOrderFactor; + } + + + public APIConfigEvents slowUpdateFactorThreshold(@javax.annotation.Nonnull Integer slowUpdateFactorThreshold) { + this.slowUpdateFactorThreshold = slowUpdateFactorThreshold; + return this; + } + + /** + * Unknown + * @return slowUpdateFactorThreshold + */ + @javax.annotation.Nonnull + public Integer getSlowUpdateFactorThreshold() { + return slowUpdateFactorThreshold; + } + + public void setSlowUpdateFactorThreshold(@javax.annotation.Nonnull Integer slowUpdateFactorThreshold) { + this.slowUpdateFactorThreshold = slowUpdateFactorThreshold; + } + + + public APIConfigEvents useDirectPlayerSerialization(@javax.annotation.Nonnull Boolean useDirectPlayerSerialization) { + this.useDirectPlayerSerialization = useDirectPlayerSerialization; + return this; + } + + /** + * Unknown + * @return useDirectPlayerSerialization + */ + @javax.annotation.Nonnull + public Boolean getUseDirectPlayerSerialization() { + return useDirectPlayerSerialization; + } + + public void setUseDirectPlayerSerialization(@javax.annotation.Nonnull Boolean useDirectPlayerSerialization) { + this.useDirectPlayerSerialization = useDirectPlayerSerialization; + } + + + public APIConfigEvents viewSegmentLength(@javax.annotation.Nonnull Integer viewSegmentLength) { + this.viewSegmentLength = viewSegmentLength; + return this; + } + + /** + * Unknown + * @return viewSegmentLength + */ + @javax.annotation.Nonnull + public Integer getViewSegmentLength() { + return viewSegmentLength; + } + + public void setViewSegmentLength(@javax.annotation.Nonnull Integer viewSegmentLength) { + this.viewSegmentLength = viewSegmentLength; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigEvents apIConfigEvents = (APIConfigEvents) o; + return Objects.equals(this.distanceClose, apIConfigEvents.distanceClose) && + Objects.equals(this.distanceFactor, apIConfigEvents.distanceFactor) && + Objects.equals(this.distanceFar, apIConfigEvents.distanceFar) && + Objects.equals(this.groupDistance, apIConfigEvents.groupDistance) && + Objects.equals(this.maximumBunchSize, apIConfigEvents.maximumBunchSize) && + Objects.equals(this.notVisibleFactor, apIConfigEvents.notVisibleFactor) && + Objects.equals(this.playerOrderBucketSize, apIConfigEvents.playerOrderBucketSize) && + Objects.equals(this.playerOrderFactor, apIConfigEvents.playerOrderFactor) && + Objects.equals(this.slowUpdateFactorThreshold, apIConfigEvents.slowUpdateFactorThreshold) && + Objects.equals(this.useDirectPlayerSerialization, apIConfigEvents.useDirectPlayerSerialization) && + Objects.equals(this.viewSegmentLength, apIConfigEvents.viewSegmentLength); + } + + @Override + public int hashCode() { + return Objects.hash(distanceClose, distanceFactor, distanceFar, groupDistance, maximumBunchSize, notVisibleFactor, playerOrderBucketSize, playerOrderFactor, slowUpdateFactorThreshold, useDirectPlayerSerialization, viewSegmentLength); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigEvents {\n"); + sb.append(" distanceClose: ").append(toIndentedString(distanceClose)).append("\n"); + sb.append(" distanceFactor: ").append(toIndentedString(distanceFactor)).append("\n"); + sb.append(" distanceFar: ").append(toIndentedString(distanceFar)).append("\n"); + sb.append(" groupDistance: ").append(toIndentedString(groupDistance)).append("\n"); + sb.append(" maximumBunchSize: ").append(toIndentedString(maximumBunchSize)).append("\n"); + sb.append(" notVisibleFactor: ").append(toIndentedString(notVisibleFactor)).append("\n"); + sb.append(" playerOrderBucketSize: ").append(toIndentedString(playerOrderBucketSize)).append("\n"); + sb.append(" playerOrderFactor: ").append(toIndentedString(playerOrderFactor)).append("\n"); + sb.append(" slowUpdateFactorThreshold: ").append(toIndentedString(slowUpdateFactorThreshold)).append("\n"); + sb.append(" useDirectPlayerSerialization: ").append(toIndentedString(useDirectPlayerSerialization)).append("\n"); + sb.append(" viewSegmentLength: ").append(toIndentedString(viewSegmentLength)).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("distanceClose", "distanceFactor", "distanceFar", "groupDistance", "maximumBunchSize", "notVisibleFactor", "playerOrderBucketSize", "playerOrderFactor", "slowUpdateFactorThreshold", "useDirectPlayerSerialization", "viewSegmentLength")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigEvents.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigEvents.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigEvents' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigEvents.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigEvents value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigEvents read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..377e6085 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigIosVersion.java @@ -0,0 +1,231 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Current version for iOS + */ +@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(@javax.annotation.Nonnull Integer major) { + this.major = major; + return this; + } + + /** + * Get major + * @return major + */ + @javax.annotation.Nonnull + public Integer getMajor() { + return major; + } + + public void setMajor(@javax.annotation.Nonnull Integer major) { + this.major = major; + } + + + public APIConfigIosVersion minor(@javax.annotation.Nonnull Integer minor) { + this.minor = minor; + return this; + } + + /** + * Get minor + * @return minor + */ + @javax.annotation.Nonnull + public Integer getMinor() { + return minor; + } + + public void setMinor(@javax.annotation.Nonnull Integer minor) { + this.minor = minor; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigIosVersion apIConfigIosVersion = (APIConfigIosVersion) o; + return Objects.equals(this.major, apIConfigIosVersion.major) && + Objects.equals(this.minor, apIConfigIosVersion.minor); + } + + @Override + public int hashCode() { + return Objects.hash(major, minor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigIosVersion {\n"); + sb.append(" major: ").append(toIndentedString(major)).append("\n"); + sb.append(" minor: ").append(toIndentedString(minor)).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("major", "minor")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigIosVersion.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigIosVersion.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigIosVersion' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigIosVersion.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigIosVersion value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigIosVersion read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..8df58a38 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigMinSupportedClientBuildNumber.java @@ -0,0 +1,488 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.PlatformBuildInfo; +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; + +/** + * Minimum supported client build number for various platforms + */ +@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(@javax.annotation.Nonnull PlatformBuildInfo appStore) { + this.appStore = appStore; + return this; + } + + /** + * Get appStore + * @return appStore + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getAppStore() { + return appStore; + } + + public void setAppStore(@javax.annotation.Nonnull PlatformBuildInfo appStore) { + this.appStore = appStore; + } + + + public APIConfigMinSupportedClientBuildNumber _default(@javax.annotation.Nonnull PlatformBuildInfo _default) { + this._default = _default; + return this; + } + + /** + * Get _default + * @return _default + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getDefault() { + return _default; + } + + public void setDefault(@javax.annotation.Nonnull PlatformBuildInfo _default) { + this._default = _default; + } + + + public APIConfigMinSupportedClientBuildNumber firebase(@javax.annotation.Nonnull PlatformBuildInfo firebase) { + this.firebase = firebase; + return this; + } + + /** + * Get firebase + * @return firebase + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getFirebase() { + return firebase; + } + + public void setFirebase(@javax.annotation.Nonnull PlatformBuildInfo firebase) { + this.firebase = firebase; + } + + + public APIConfigMinSupportedClientBuildNumber firebaseiOS(@javax.annotation.Nonnull PlatformBuildInfo firebaseiOS) { + this.firebaseiOS = firebaseiOS; + return this; + } + + /** + * Get firebaseiOS + * @return firebaseiOS + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getFirebaseiOS() { + return firebaseiOS; + } + + public void setFirebaseiOS(@javax.annotation.Nonnull PlatformBuildInfo firebaseiOS) { + this.firebaseiOS = firebaseiOS; + } + + + public APIConfigMinSupportedClientBuildNumber googlePlay(@javax.annotation.Nonnull PlatformBuildInfo googlePlay) { + this.googlePlay = googlePlay; + return this; + } + + /** + * Get googlePlay + * @return googlePlay + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getGooglePlay() { + return googlePlay; + } + + public void setGooglePlay(@javax.annotation.Nonnull PlatformBuildInfo googlePlay) { + this.googlePlay = googlePlay; + } + + + public APIConfigMinSupportedClientBuildNumber PC(@javax.annotation.Nonnull PlatformBuildInfo PC) { + this.PC = PC; + return this; + } + + /** + * Get PC + * @return PC + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getPC() { + return PC; + } + + public void setPC(@javax.annotation.Nonnull PlatformBuildInfo PC) { + this.PC = PC; + } + + + public APIConfigMinSupportedClientBuildNumber picoStore(@javax.annotation.Nonnull PlatformBuildInfo picoStore) { + this.picoStore = picoStore; + return this; + } + + /** + * Get picoStore + * @return picoStore + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getPicoStore() { + return picoStore; + } + + public void setPicoStore(@javax.annotation.Nonnull PlatformBuildInfo picoStore) { + this.picoStore = picoStore; + } + + + public APIConfigMinSupportedClientBuildNumber questAppLab(@javax.annotation.Nonnull PlatformBuildInfo questAppLab) { + this.questAppLab = questAppLab; + return this; + } + + /** + * Get questAppLab + * @return questAppLab + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getQuestAppLab() { + return questAppLab; + } + + public void setQuestAppLab(@javax.annotation.Nonnull PlatformBuildInfo questAppLab) { + this.questAppLab = questAppLab; + } + + + public APIConfigMinSupportedClientBuildNumber questStore(@javax.annotation.Nonnull PlatformBuildInfo questStore) { + this.questStore = questStore; + return this; + } + + /** + * Get questStore + * @return questStore + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getQuestStore() { + return questStore; + } + + public void setQuestStore(@javax.annotation.Nonnull PlatformBuildInfo questStore) { + this.questStore = questStore; + } + + + public APIConfigMinSupportedClientBuildNumber testFlight(@javax.annotation.Nonnull PlatformBuildInfo testFlight) { + this.testFlight = testFlight; + return this; + } + + /** + * Get testFlight + * @return testFlight + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getTestFlight() { + return testFlight; + } + + public void setTestFlight(@javax.annotation.Nonnull PlatformBuildInfo testFlight) { + this.testFlight = testFlight; + } + + + public APIConfigMinSupportedClientBuildNumber xrElite(@javax.annotation.Nonnull PlatformBuildInfo xrElite) { + this.xrElite = xrElite; + return this; + } + + /** + * Get xrElite + * @return xrElite + */ + @javax.annotation.Nonnull + public PlatformBuildInfo getXrElite() { + return xrElite; + } + + public void setXrElite(@javax.annotation.Nonnull PlatformBuildInfo xrElite) { + this.xrElite = xrElite; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigMinSupportedClientBuildNumber apIConfigMinSupportedClientBuildNumber = (APIConfigMinSupportedClientBuildNumber) o; + return Objects.equals(this.appStore, apIConfigMinSupportedClientBuildNumber.appStore) && + Objects.equals(this._default, apIConfigMinSupportedClientBuildNumber._default) && + Objects.equals(this.firebase, apIConfigMinSupportedClientBuildNumber.firebase) && + Objects.equals(this.firebaseiOS, apIConfigMinSupportedClientBuildNumber.firebaseiOS) && + Objects.equals(this.googlePlay, apIConfigMinSupportedClientBuildNumber.googlePlay) && + Objects.equals(this.PC, apIConfigMinSupportedClientBuildNumber.PC) && + Objects.equals(this.picoStore, apIConfigMinSupportedClientBuildNumber.picoStore) && + Objects.equals(this.questAppLab, apIConfigMinSupportedClientBuildNumber.questAppLab) && + Objects.equals(this.questStore, apIConfigMinSupportedClientBuildNumber.questStore) && + Objects.equals(this.testFlight, apIConfigMinSupportedClientBuildNumber.testFlight) && + Objects.equals(this.xrElite, apIConfigMinSupportedClientBuildNumber.xrElite); + } + + @Override + public int hashCode() { + return Objects.hash(appStore, _default, firebase, firebaseiOS, googlePlay, PC, picoStore, questAppLab, questStore, testFlight, xrElite); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigMinSupportedClientBuildNumber {\n"); + sb.append(" appStore: ").append(toIndentedString(appStore)).append("\n"); + sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); + sb.append(" firebase: ").append(toIndentedString(firebase)).append("\n"); + sb.append(" firebaseiOS: ").append(toIndentedString(firebaseiOS)).append("\n"); + sb.append(" googlePlay: ").append(toIndentedString(googlePlay)).append("\n"); + sb.append(" PC: ").append(toIndentedString(PC)).append("\n"); + sb.append(" picoStore: ").append(toIndentedString(picoStore)).append("\n"); + sb.append(" questAppLab: ").append(toIndentedString(questAppLab)).append("\n"); + sb.append(" questStore: ").append(toIndentedString(questStore)).append("\n"); + sb.append(" testFlight: ").append(toIndentedString(testFlight)).append("\n"); + sb.append(" xrElite: ").append(toIndentedString(xrElite)).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("AppStore", "Default", "Firebase", "FirebaseiOS", "GooglePlay", "PC", "PicoStore", "QuestAppLab", "QuestStore", "TestFlight", "XRElite")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigMinSupportedClientBuildNumber.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 `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 (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.validateJsonElement(jsonObj.get("AppStore")); + // validate the required field `Default` + PlatformBuildInfo.validateJsonElement(jsonObj.get("Default")); + // validate the required field `Firebase` + PlatformBuildInfo.validateJsonElement(jsonObj.get("Firebase")); + // validate the required field `FirebaseiOS` + PlatformBuildInfo.validateJsonElement(jsonObj.get("FirebaseiOS")); + // validate the required field `GooglePlay` + PlatformBuildInfo.validateJsonElement(jsonObj.get("GooglePlay")); + // validate the required field `PC` + PlatformBuildInfo.validateJsonElement(jsonObj.get("PC")); + // validate the required field `PicoStore` + PlatformBuildInfo.validateJsonElement(jsonObj.get("PicoStore")); + // validate the required field `QuestAppLab` + PlatformBuildInfo.validateJsonElement(jsonObj.get("QuestAppLab")); + // validate the required field `QuestStore` + PlatformBuildInfo.validateJsonElement(jsonObj.get("QuestStore")); + // validate the required field `TestFlight` + PlatformBuildInfo.validateJsonElement(jsonObj.get("TestFlight")); + // validate the required field `XRElite` + PlatformBuildInfo.validateJsonElement(jsonObj.get("XRElite")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigMinSupportedClientBuildNumber.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigMinSupportedClientBuildNumber' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigMinSupportedClientBuildNumber.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigMinSupportedClientBuildNumber value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigMinSupportedClientBuildNumber read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..896e6906 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/APIConfigOfflineAnalysis.java @@ -0,0 +1,224 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Whether to allow offline analysis + */ +@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(@javax.annotation.Nullable Boolean android) { + this.android = android; + return this; + } + + /** + * Whether to allow offline analysis + * @return android + */ + @javax.annotation.Nullable + public Boolean getAndroid() { + return android; + } + + public void setAndroid(@javax.annotation.Nullable Boolean android) { + this.android = android; + } + + + public APIConfigOfflineAnalysis standalonewindows(@javax.annotation.Nullable Boolean standalonewindows) { + this.standalonewindows = standalonewindows; + return this; + } + + /** + * Whether to allow offline analysis + * @return standalonewindows + */ + @javax.annotation.Nullable + public Boolean getStandalonewindows() { + return standalonewindows; + } + + public void setStandalonewindows(@javax.annotation.Nullable Boolean standalonewindows) { + this.standalonewindows = standalonewindows; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + APIConfigOfflineAnalysis apIConfigOfflineAnalysis = (APIConfigOfflineAnalysis) o; + return Objects.equals(this.android, apIConfigOfflineAnalysis.android) && + Objects.equals(this.standalonewindows, apIConfigOfflineAnalysis.standalonewindows); + } + + @Override + public int hashCode() { + return Objects.hash(android, standalonewindows); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIConfigOfflineAnalysis {\n"); + sb.append(" android: ").append(toIndentedString(android)).append("\n"); + sb.append(" standalonewindows: ").append(toIndentedString(standalonewindows)).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("android", "standalonewindows")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIConfigOfflineAnalysis.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 `APIConfigOfflineAnalysis` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIConfigOfflineAnalysis.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIConfigOfflineAnalysis' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIConfigOfflineAnalysis.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIConfigOfflineAnalysis value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIConfigOfflineAnalysis read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/APIEventConfig.java b/src/main/java/io/github/vrchatapi/model/APIEventConfig.java deleted file mode 100644 index 6a992222..00000000 --- a/src/main/java/io/github/vrchatapi/model/APIEventConfig.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * VRChat API Documentation - * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org - * - * 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; - -/** - * APIEventConfig - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class APIEventConfig { - public static final String SERIALIZED_NAME_DISTANCE_CLOSE = "distanceClose"; - @SerializedName(SERIALIZED_NAME_DISTANCE_CLOSE) - private Integer distanceClose; - - public static final String SERIALIZED_NAME_DISTANCE_FACTOR = "distanceFactor"; - @SerializedName(SERIALIZED_NAME_DISTANCE_FACTOR) - private Integer distanceFactor; - - public static final String SERIALIZED_NAME_DISTANCE_FAR = "distanceFar"; - @SerializedName(SERIALIZED_NAME_DISTANCE_FAR) - private Integer distanceFar; - - public static final String SERIALIZED_NAME_GROUP_DISTANCE = "groupDistance"; - @SerializedName(SERIALIZED_NAME_GROUP_DISTANCE) - private Integer groupDistance; - - public static final String SERIALIZED_NAME_MAXIMUM_BUNCH_SIZE = "maximumBunchSize"; - @SerializedName(SERIALIZED_NAME_MAXIMUM_BUNCH_SIZE) - private Integer maximumBunchSize; - - public static final String SERIALIZED_NAME_NOT_VISIBLE_FACTOR = "notVisibleFactor"; - @SerializedName(SERIALIZED_NAME_NOT_VISIBLE_FACTOR) - private Integer notVisibleFactor; - - public static final String SERIALIZED_NAME_PLAYER_ORDER_BUCKET_SIZE = "playerOrderBucketSize"; - @SerializedName(SERIALIZED_NAME_PLAYER_ORDER_BUCKET_SIZE) - private Integer playerOrderBucketSize; - - public static final String SERIALIZED_NAME_PLAYER_ORDER_FACTOR = "playerOrderFactor"; - @SerializedName(SERIALIZED_NAME_PLAYER_ORDER_FACTOR) - private Integer playerOrderFactor; - - public static final String SERIALIZED_NAME_SLOW_UPDATE_FACTOR_THRESHOLD = "slowUpdateFactorThreshold"; - @SerializedName(SERIALIZED_NAME_SLOW_UPDATE_FACTOR_THRESHOLD) - private Integer slowUpdateFactorThreshold; - - public static final String SERIALIZED_NAME_VIEW_SEGMENT_LENGTH = "viewSegmentLength"; - @SerializedName(SERIALIZED_NAME_VIEW_SEGMENT_LENGTH) - private Integer viewSegmentLength; - - - public APIEventConfig distanceClose(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) { - this.distanceClose = distanceClose; - } - - - public APIEventConfig distanceFactor(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) { - this.distanceFactor = distanceFactor; - } - - - public APIEventConfig distanceFar(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) { - this.distanceFar = distanceFar; - } - - - public APIEventConfig groupDistance(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) { - this.groupDistance = groupDistance; - } - - - public APIEventConfig maximumBunchSize(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) { - this.maximumBunchSize = maximumBunchSize; - } - - - public APIEventConfig notVisibleFactor(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) { - this.notVisibleFactor = notVisibleFactor; - } - - - public APIEventConfig playerOrderBucketSize(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) { - this.playerOrderBucketSize = playerOrderBucketSize; - } - - - public APIEventConfig playerOrderFactor(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) { - this.playerOrderFactor = playerOrderFactor; - } - - - public APIEventConfig slowUpdateFactorThreshold(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) { - this.slowUpdateFactorThreshold = slowUpdateFactorThreshold; - } - - - public APIEventConfig viewSegmentLength(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) { - this.viewSegmentLength = viewSegmentLength; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - APIEventConfig apIEventConfig = (APIEventConfig) o; - return Objects.equals(this.distanceClose, apIEventConfig.distanceClose) && - Objects.equals(this.distanceFactor, apIEventConfig.distanceFactor) && - Objects.equals(this.distanceFar, apIEventConfig.distanceFar) && - Objects.equals(this.groupDistance, apIEventConfig.groupDistance) && - Objects.equals(this.maximumBunchSize, apIEventConfig.maximumBunchSize) && - Objects.equals(this.notVisibleFactor, apIEventConfig.notVisibleFactor) && - Objects.equals(this.playerOrderBucketSize, apIEventConfig.playerOrderBucketSize) && - Objects.equals(this.playerOrderFactor, apIEventConfig.playerOrderFactor) && - Objects.equals(this.slowUpdateFactorThreshold, apIEventConfig.slowUpdateFactorThreshold) && - Objects.equals(this.viewSegmentLength, apIEventConfig.viewSegmentLength); - } - - @Override - public int hashCode() { - return Objects.hash(distanceClose, distanceFactor, distanceFar, groupDistance, maximumBunchSize, notVisibleFactor, playerOrderBucketSize, playerOrderFactor, slowUpdateFactorThreshold, viewSegmentLength); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class APIEventConfig {\n"); - sb.append(" distanceClose: ").append(toIndentedString(distanceClose)).append("\n"); - sb.append(" distanceFactor: ").append(toIndentedString(distanceFactor)).append("\n"); - sb.append(" distanceFar: ").append(toIndentedString(distanceFar)).append("\n"); - sb.append(" groupDistance: ").append(toIndentedString(groupDistance)).append("\n"); - sb.append(" maximumBunchSize: ").append(toIndentedString(maximumBunchSize)).append("\n"); - sb.append(" notVisibleFactor: ").append(toIndentedString(notVisibleFactor)).append("\n"); - sb.append(" playerOrderBucketSize: ").append(toIndentedString(playerOrderBucketSize)).append("\n"); - sb.append(" playerOrderFactor: ").append(toIndentedString(playerOrderFactor)).append("\n"); - sb.append(" slowUpdateFactorThreshold: ").append(toIndentedString(slowUpdateFactorThreshold)).append("\n"); - sb.append(" viewSegmentLength: ").append(toIndentedString(viewSegmentLength)).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 "); - } - -} - diff --git a/src/main/java/io/github/vrchatapi/model/APIHealth.java b/src/main/java/io/github/vrchatapi/model/APIHealth.java index 5632d276..9f12a064 100644 --- a/src/main/java/io/github/vrchatapi/model/APIHealth.java +++ b/src/main/java/io/github/vrchatapi/model/APIHealth.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,102 +13,117 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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 static final String SERIALIZED_NAME_BUILD_VERSION_TAG = "buildVersionTag"; - @SerializedName(SERIALIZED_NAME_BUILD_VERSION_TAG) - private String buildVersionTag; + public APIHealth() { + } + public APIHealth buildVersionTag(@javax.annotation.Nonnull String buildVersionTag) { + this.buildVersionTag = buildVersionTag; + return this; + } - public APIHealth ok(Boolean ok) { - + /** + * Get buildVersionTag + * @return buildVersionTag + */ + @javax.annotation.Nonnull + public String getBuildVersionTag() { + return buildVersionTag; + } + + public void setBuildVersionTag(@javax.annotation.Nonnull String buildVersionTag) { + this.buildVersionTag = buildVersionTag; + } + + + 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; } - public APIHealth buildVersionTag(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) { - this.buildVersionTag = buildVersionTag; - } - @Override public boolean equals(Object o) { @@ -119,23 +134,23 @@ public boolean equals(Object o) { return false; } APIHealth apIHealth = (APIHealth) o; - return Objects.equals(this.ok, apIHealth.ok) && - Objects.equals(this.serverName, apIHealth.serverName) && - Objects.equals(this.buildVersionTag, apIHealth.buildVersionTag); + return Objects.equals(this.buildVersionTag, apIHealth.buildVersionTag) && + Objects.equals(this.ok, apIHealth.ok) && + Objects.equals(this.serverName, apIHealth.serverName); } @Override public int hashCode() { - return Objects.hash(ok, serverName, buildVersionTag); + return Objects.hash(buildVersionTag, ok, serverName); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class APIHealth {\n"); + sb.append(" buildVersionTag: ").append(toIndentedString(buildVersionTag)).append("\n"); sb.append(" ok: ").append(toIndentedString(ok)).append("\n"); sb.append(" serverName: ").append(toIndentedString(serverName)).append("\n"); - sb.append(" buildVersionTag: ").append(toIndentedString(buildVersionTag)).append("\n"); sb.append("}"); return sb.toString(); } @@ -145,11 +160,104 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("buildVersionTag", "ok", "serverName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("buildVersionTag", "ok", "serverName")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!APIHealth.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `serverName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serverName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!APIHealth.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'APIHealth' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(APIHealth.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, APIHealth value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public APIHealth read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..19eee2d9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AbstractOpenApiSchema.java @@ -0,0 +1,142 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.model; + +import io.github.vrchatapi.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@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 + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + //@JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).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 boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java b/src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java new file mode 100644 index 00000000..80277851 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AccountDeletionLog.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * AccountDeletionLog + */ +@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(@javax.annotation.Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Date and time of the deletion request. + * @return dateTime + */ + @javax.annotation.Nullable + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(@javax.annotation.Nullable OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + + 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 + public OffsetDateTime getDeletionScheduled() { + return deletionScheduled; + } + + public void setDeletionScheduled(@javax.annotation.Nullable OffsetDateTime deletionScheduled) { + this.deletionScheduled = deletionScheduled; + } + + + 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 + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountDeletionLog accountDeletionLog = (AccountDeletionLog) o; + return Objects.equals(this.dateTime, accountDeletionLog.dateTime) && + Objects.equals(this.deletionScheduled, accountDeletionLog.deletionScheduled) && + Objects.equals(this.message, accountDeletionLog.message); + } + + 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(dateTime, deletionScheduled, message); + } + + 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 AccountDeletionLog {\n"); + sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); + sb.append(" deletionScheduled: ").append(toIndentedString(deletionScheduled)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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("dateTime", "deletionScheduled", "message")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AccountDeletionLog.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 `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(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AccountDeletionLog.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AccountDeletionLog' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AccountDeletionLog.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AccountDeletionLog value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AccountDeletionLog read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 9efc1b0e..2e57fc9f 100644 --- a/src/main/java/io/github/vrchatapi/model/AddFavoriteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/AddFavoriteRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,111 +13,129 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private FavoriteType type = FavoriteType.FRIEND; - 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) - private List tags = new ArrayList(); - - - public AddFavoriteRequest type(FavoriteType type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public FavoriteType getType() { - return type; - } + 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 void setType(FavoriteType type) { - this.type = type; + 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(@javax.annotation.Nonnull FavoriteType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public FavoriteType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull FavoriteType type) { + this.type = type; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -127,23 +145,23 @@ public boolean equals(Object o) { return false; } AddFavoriteRequest addFavoriteRequest = (AddFavoriteRequest) o; - return Objects.equals(this.type, addFavoriteRequest.type) && - Objects.equals(this.favoriteId, addFavoriteRequest.favoriteId) && - Objects.equals(this.tags, addFavoriteRequest.tags); + return Objects.equals(this.favoriteId, addFavoriteRequest.favoriteId) && + Objects.equals(this.tags, addFavoriteRequest.tags) && + Objects.equals(this.type, addFavoriteRequest.type); } @Override public int hashCode() { - return Objects.hash(type, favoriteId, tags); + return Objects.hash(favoriteId, tags, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AddFavoriteRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" favoriteId: ").append(toIndentedString(favoriteId)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } @@ -153,11 +171,109 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("favoriteId", "tags", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("favoriteId", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AddFavoriteRequest.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 `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 (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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddFavoriteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddFavoriteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AddFavoriteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AddFavoriteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AddFavoriteRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..ce8f6020 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AddGroupGalleryImageRequest.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * AddGroupGalleryImageRequest + */ +@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(@javax.annotation.Nonnull String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + */ + @javax.annotation.Nonnull + public String getFileId() { + return fileId; + } + + public void setFileId(@javax.annotation.Nonnull String fileId) { + this.fileId = fileId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddGroupGalleryImageRequest addGroupGalleryImageRequest = (AddGroupGalleryImageRequest) o; + return Objects.equals(this.fileId, addGroupGalleryImageRequest.fileId); + } + + @Override + public int hashCode() { + return Objects.hash(fileId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddGroupGalleryImageRequest {\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).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("fileId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("fileId")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AddGroupGalleryImageRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `fileId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddGroupGalleryImageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddGroupGalleryImageRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AddGroupGalleryImageRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AddGroupGalleryImageRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AddGroupGalleryImageRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..2de653f6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AdminAssetBundle.java @@ -0,0 +1,582 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.AdminUnityPackage; +import io.github.vrchatapi.model.ReleaseStatus; +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; + +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; + +/** + * + */ +@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(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AdminAssetBundle updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public AdminAssetBundle assetType(@javax.annotation.Nonnull String assetType) { + this.assetType = assetType; + return this; + } + + /** + * Get assetType + * @return assetType + */ + @javax.annotation.Nonnull + public String getAssetType() { + return assetType; + } + + public void setAssetType(@javax.annotation.Nonnull String assetType) { + this.assetType = assetType; + } + + + 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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nonnull String authorId) { + this.authorId = authorId; + } + + + public AdminAssetBundle authorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Get authorName + * @return authorName + */ + @javax.annotation.Nonnull + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + } + + + public AdminAssetBundle description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public AdminAssetBundle imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public AdminAssetBundle name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public AdminAssetBundle releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; + return this; + } + + /** + * Get releaseStatus + * @return releaseStatus + */ + @javax.annotation.Nonnull + public ReleaseStatus getReleaseStatus() { + return releaseStatus; + } + + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public AdminAssetBundle thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; + return this; + } + + /** + * Get thumbnailImageUrl + * @return thumbnailImageUrl + */ + @javax.annotation.Nonnull + public String getThumbnailImageUrl() { + return thumbnailImageUrl; + } + + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; + } + + + public AdminAssetBundle unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; + return this; + } + + /** + * Get unityPackageUrl + * @return unityPackageUrl + */ + @javax.annotation.Nullable + public String getUnityPackageUrl() { + return unityPackageUrl; + } + + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; + } + + + 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 + public Set getUnityPackages() { + return unityPackages; + } + + public void setUnityPackages(@javax.annotation.Nonnull Set unityPackages) { + this.unityPackages = unityPackages; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdminAssetBundle adminAssetBundle = (AdminAssetBundle) o; + return Objects.equals(this.createdAt, adminAssetBundle.createdAt) && + Objects.equals(this.updatedAt, adminAssetBundle.updatedAt) && + Objects.equals(this.assetType, adminAssetBundle.assetType) && + Objects.equals(this.authorId, adminAssetBundle.authorId) && + Objects.equals(this.authorName, adminAssetBundle.authorName) && + Objects.equals(this.description, adminAssetBundle.description) && + Objects.equals(this.imageUrl, adminAssetBundle.imageUrl) && + Objects.equals(this.name, adminAssetBundle.name) && + Objects.equals(this.releaseStatus, adminAssetBundle.releaseStatus) && + Objects.equals(this.tags, adminAssetBundle.tags) && + Objects.equals(this.thumbnailImageUrl, adminAssetBundle.thumbnailImageUrl) && + Objects.equals(this.unityPackageUrl, adminAssetBundle.unityPackageUrl) && + Objects.equals(this.unityPackages, adminAssetBundle.unityPackages); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, assetType, authorId, authorName, description, imageUrl, name, releaseStatus, tags, thumbnailImageUrl, unityPackageUrl, unityPackages); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdminAssetBundle {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" assetType: ").append(toIndentedString(assetType)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" thumbnailImageUrl: ").append(toIndentedString(thumbnailImageUrl)).append("\n"); + sb.append(" unityPackageUrl: ").append(toIndentedString(unityPackageUrl)).append("\n"); + sb.append(" unityPackages: ").append(toIndentedString(unityPackages)).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("_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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AdminAssetBundle.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 `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 (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(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(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(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(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(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(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(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(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(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("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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdminAssetBundle.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdminAssetBundle' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdminAssetBundle.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdminAssetBundle value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AdminAssetBundle read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..c6993519 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AdminUnityPackage.java @@ -0,0 +1,322 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * + */ +@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(@javax.annotation.Nonnull String assetUrl) { + this.assetUrl = assetUrl; + return this; + } + + /** + * Get assetUrl + * @return assetUrl + */ + @javax.annotation.Nonnull + public String getAssetUrl() { + return assetUrl; + } + + public void setAssetUrl(@javax.annotation.Nonnull String assetUrl) { + this.assetUrl = assetUrl; + } + + + public AdminUnityPackage assetVersion(@javax.annotation.Nonnull Integer assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get assetVersion + * minimum: 0 + * @return assetVersion + */ + @javax.annotation.Nonnull + public Integer getAssetVersion() { + return assetVersion; + } + + public void setAssetVersion(@javax.annotation.Nonnull Integer assetVersion) { + this.assetVersion = assetVersion; + } + + + 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + } + + + public AdminUnityPackage unityVersion(@javax.annotation.Nonnull String unityVersion) { + this.unityVersion = unityVersion; + return this; + } + + /** + * Get unityVersion + * @return unityVersion + */ + @javax.annotation.Nonnull + public String getUnityVersion() { + return unityVersion; + } + + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { + this.unityVersion = unityVersion; + } + + + public AdminUnityPackage variant(@javax.annotation.Nonnull String variant) { + this.variant = variant; + return this; + } + + /** + * Get variant + * @return variant + */ + @javax.annotation.Nonnull + public String getVariant() { + return variant; + } + + public void setVariant(@javax.annotation.Nonnull String variant) { + this.variant = variant; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdminUnityPackage adminUnityPackage = (AdminUnityPackage) o; + return Objects.equals(this.assetUrl, adminUnityPackage.assetUrl) && + Objects.equals(this.assetVersion, adminUnityPackage.assetVersion) && + Objects.equals(this.platform, adminUnityPackage.platform) && + Objects.equals(this.unityVersion, adminUnityPackage.unityVersion) && + Objects.equals(this.variant, adminUnityPackage.variant); + } + + @Override + public int hashCode() { + return Objects.hash(assetUrl, assetVersion, platform, unityVersion, variant); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdminUnityPackage {\n"); + sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); + sb.append(" assetVersion: ").append(toIndentedString(assetVersion)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); + sb.append(" variant: ").append(toIndentedString(variant)).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("assetUrl", "assetVersion", "platform", "unityVersion", "variant")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "platform", "unityVersion", "variant")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AdminUnityPackage.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 `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 (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(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(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(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(java.util.Locale.ROOT, "Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdminUnityPackage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdminUnityPackage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdminUnityPackage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdminUnityPackage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AdminUnityPackage read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..8f4848d7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AgeVerificationStatus.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * `verified` is obsolete. User who have verified and are 18+ can switch to `plus18` status. + */ +@JsonAdapter(AgeVerificationStatus.Adapter.class) +public enum AgeVerificationStatus { + + plus18("18+"), + + hidden("hidden"), + + verified("verified"); + + private String value; + + AgeVerificationStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AgeVerificationStatus fromValue(String value) { + for (AgeVerificationStatus b : AgeVerificationStatus.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 AgeVerificationStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AgeVerificationStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..344ee967 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Agreement.java @@ -0,0 +1,421 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.AgreementCode; +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; + +/** + * Agreement + */ +@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(@javax.annotation.Nonnull AgreementCode agreementCode) { + this.agreementCode = agreementCode; + return this; + } + + /** + * Get agreementCode + * @return agreementCode + */ + @javax.annotation.Nonnull + public AgreementCode getAgreementCode() { + return agreementCode; + } + + public void setAgreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { + this.agreementCode = agreementCode; + } + + + public Agreement agreementFulltext(@javax.annotation.Nullable String agreementFulltext) { + this.agreementFulltext = agreementFulltext; + return this; + } + + /** + * The full text of the agreement. + * @return agreementFulltext + */ + @javax.annotation.Nullable + public String getAgreementFulltext() { + return agreementFulltext; + } + + public void setAgreementFulltext(@javax.annotation.Nullable String agreementFulltext) { + this.agreementFulltext = agreementFulltext; + } + + + 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 + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + public Agreement created(@javax.annotation.Nonnull String created) { + this.created = created; + return this; + } + + /** + * When the agreement was created + * @return created + */ + @javax.annotation.Nonnull + public String getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nonnull String created) { + this.created = created; + } + + + public Agreement id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The id of the agreement. + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + public Agreement version(@javax.annotation.Nonnull Integer version) { + this.version = version; + return this; + } + + /** + * The version of the agreement. + * @return version + */ + @javax.annotation.Nonnull + public Integer getVersion() { + return version; + } + + public void setVersion(@javax.annotation.Nonnull Integer version) { + this.version = version; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Agreement agreement = (Agreement) o; + return Objects.equals(this.agreementCode, agreement.agreementCode) && + Objects.equals(this.agreementFulltext, agreement.agreementFulltext) && + Objects.equals(this.contentId, agreement.contentId) && + Objects.equals(this.created, agreement.created) && + Objects.equals(this.id, agreement.id) && + Objects.equals(this.tags, agreement.tags) && + Objects.equals(this.userId, agreement.userId) && + Objects.equals(this.version, agreement.version); + } + + @Override + public int hashCode() { + return Objects.hash(agreementCode, agreementFulltext, contentId, created, id, tags, userId, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Agreement {\n"); + sb.append(" agreementCode: ").append(toIndentedString(agreementCode)).append("\n"); + sb.append(" agreementFulltext: ").append(toIndentedString(agreementFulltext)).append("\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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("agreementCode", "agreementFulltext", "contentId", "created", "id", "tags", "userId", "version")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Agreement.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 `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 (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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Agreement.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Agreement' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Agreement.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Agreement value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Agreement read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..0729ec24 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AgreementCode.java @@ -0,0 +1,75 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * The type of agreement. + */ +@JsonAdapter(AgreementCode.Adapter.class) +public enum AgreementCode { + + CONTENT_COPYRIGHT_OWNED("content.copyright.owned"); + + private String value; + + AgreementCode(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AgreementCode fromValue(String value) { + for (AgreementCode b : AgreementCode.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 AgreementCode enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AgreementCode read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..e5413825 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AgreementRequest.java @@ -0,0 +1,292 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.AgreementCode; +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; + +/** + * AgreementRequest + */ +@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(@javax.annotation.Nonnull AgreementCode agreementCode) { + this.agreementCode = agreementCode; + return this; + } + + /** + * Get agreementCode + * @return agreementCode + */ + @javax.annotation.Nonnull + public AgreementCode getAgreementCode() { + return agreementCode; + } + + public void setAgreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { + this.agreementCode = agreementCode; + } + + + 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 + public String getAgreementFulltext() { + return agreementFulltext; + } + + public void setAgreementFulltext(@javax.annotation.Nonnull String agreementFulltext) { + this.agreementFulltext = agreementFulltext; + } + + + 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 + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + 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 + public Integer getVersion() { + return version; + } + + public void setVersion(@javax.annotation.Nonnull Integer version) { + this.version = version; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgreementRequest agreementRequest = (AgreementRequest) o; + return Objects.equals(this.agreementCode, agreementRequest.agreementCode) && + Objects.equals(this.agreementFulltext, agreementRequest.agreementFulltext) && + Objects.equals(this.contentId, agreementRequest.contentId) && + Objects.equals(this.version, agreementRequest.version); + } + + @Override + public int hashCode() { + return Objects.hash(agreementCode, agreementFulltext, contentId, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgreementRequest {\n"); + sb.append(" agreementCode: ").append(toIndentedString(agreementCode)).append("\n"); + sb.append(" agreementFulltext: ").append(toIndentedString(agreementFulltext)).append("\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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("agreementCode", "agreementFulltext", "contentId", "version")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("agreementCode", "agreementFulltext", "contentId", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AgreementRequest.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `contentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contentId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AgreementRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AgreementRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AgreementRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AgreementRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AgreementRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..8af23430 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AgreementStatus.java @@ -0,0 +1,318 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.AgreementCode; +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; + +/** + * AgreementStatus + */ +@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(@javax.annotation.Nonnull Boolean agreed) { + this.agreed = agreed; + return this; + } + + /** + * Whether the user has agreed for this content. + * @return agreed + */ + @javax.annotation.Nonnull + public Boolean getAgreed() { + return agreed; + } + + public void setAgreed(@javax.annotation.Nonnull Boolean agreed) { + this.agreed = agreed; + } + + + public AgreementStatus agreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { + this.agreementCode = agreementCode; + return this; + } + + /** + * Get agreementCode + * @return agreementCode + */ + @javax.annotation.Nonnull + public AgreementCode getAgreementCode() { + return agreementCode; + } + + public void setAgreementCode(@javax.annotation.Nonnull AgreementCode agreementCode) { + this.agreementCode = agreementCode; + } + + + 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 + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + public AgreementStatus version(@javax.annotation.Nonnull Integer version) { + this.version = version; + return this; + } + + /** + * The version of the agreement. + * @return version + */ + @javax.annotation.Nonnull + public Integer getVersion() { + return version; + } + + public void setVersion(@javax.annotation.Nonnull Integer version) { + this.version = version; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AgreementStatus agreementStatus = (AgreementStatus) o; + return Objects.equals(this.agreed, agreementStatus.agreed) && + Objects.equals(this.agreementCode, agreementStatus.agreementCode) && + Objects.equals(this.contentId, agreementStatus.contentId) && + Objects.equals(this.userId, agreementStatus.userId) && + Objects.equals(this.version, agreementStatus.version); + } + + @Override + public int hashCode() { + return Objects.hash(agreed, agreementCode, contentId, userId, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AgreementStatus {\n"); + sb.append(" agreed: ").append(toIndentedString(agreed)).append("\n"); + sb.append(" agreementCode: ").append(toIndentedString(agreementCode)).append("\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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("agreed", "agreementCode", "contentId", "userId", "version")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("agreed", "agreementCode", "contentId", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AgreementStatus.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AgreementStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AgreementStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AgreementStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AgreementStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AgreementStatus read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 9e2274f1..685250dc 100644 --- a/src/main/java/io/github/vrchatapi/model/Avatar.java +++ b/src/main/java/io/github/vrchatapi/model/Avatar.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,529 +13,807 @@ package io.github.vrchatapi.model; import 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.AvatarPerformance; +import io.github.vrchatapi.model.AvatarPublishedListingsInner; +import io.github.vrchatapi.model.AvatarStyles; 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; -import org.threeten.bp.OffsetDateTime; + +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; /** - * Avatar + * */ -@javax.annotation.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) + @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) - private List tags = new ArrayList(); + @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) - private Set unityPackages = new LinkedHashSet(); + @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(@javax.annotation.Nullable String acknowledgements) { + this.acknowledgements = acknowledgements; + return this; + } + + /** + * Get acknowledgements + * @return acknowledgements + */ + @javax.annotation.Nullable + public String getAcknowledgements() { + return acknowledgements; + } - public Avatar assetUrl(String assetUrl) { - + public void setAcknowledgements(@javax.annotation.Nullable String acknowledgements) { + this.acknowledgements = acknowledgements; + } + + + 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 + public String getActiveAssetReviewId() { + return activeAssetReviewId; + } + + public void setActiveAssetReviewId(@javax.annotation.Nullable String activeAssetReviewId) { + this.activeAssetReviewId = activeAssetReviewId; + } + + + public Avatar assetUrl(@javax.annotation.Nullable String assetUrl) { this.assetUrl = assetUrl; return this; } - /** - * Not present from general serach `/avatars`, only on specific requests `/avatars/{avatarId}`. + /** + * Not present from general search `/avatars`, only on specific requests `/avatars/{avatarId}`. * @return assetUrl - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "Not present from general serach `/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 serach `/avatars`, only on specific requests `/avatars/{avatarId}`. **Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead. + /** + * 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 serach `/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 id(String id) { - + public Avatar highestPrice(@javax.annotation.Nullable Integer highestPrice) { + this.highestPrice = highestPrice; + return this; + } + + /** + * Get highestPrice + * @return highestPrice + */ + @javax.annotation.Nullable + public Integer getHighestPrice() { + return highestPrice; + } + + public void setHighestPrice(@javax.annotation.Nullable Integer highestPrice) { + this.highestPrice = highestPrice; + } + + + 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 name(String name) { - + public Avatar listingDate(@javax.annotation.Nullable String listingDate) { + this.listingDate = listingDate; + return this; + } + + /** + * Get listingDate + * @return listingDate + */ + @javax.annotation.Nullable + public String getListingDate() { + return listingDate; + } + + public void setListingDate(@javax.annotation.Nullable String listingDate) { + this.listingDate = listingDate; + } + + + public Avatar lock(@javax.annotation.Nullable Boolean lock) { + this.lock = lock; + return this; + } + + /** + * Get lock + * @return lock + */ + @javax.annotation.Nullable + public Boolean getLock() { + return lock; + } + + public void setLock(@javax.annotation.Nullable Boolean lock) { + this.lock = lock; + } + + + public Avatar lowestPrice(@javax.annotation.Nullable Integer lowestPrice) { + this.lowestPrice = lowestPrice; + return this; + } + + /** + * Get lowestPrice + * @return lowestPrice + */ + @javax.annotation.Nullable + public Integer getLowestPrice() { + return lowestPrice; + } + + public void setLowestPrice(@javax.annotation.Nullable Integer lowestPrice) { + this.lowestPrice = lowestPrice; + } + + + 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 releaseStatus(ReleaseStatus releaseStatus) { - + public Avatar pendingUpload(@javax.annotation.Nullable Boolean pendingUpload) { + this.pendingUpload = pendingUpload; + return this; + } + + /** + * Get pendingUpload + * @return pendingUpload + */ + @javax.annotation.Nullable + public Boolean getPendingUpload() { + return pendingUpload; + } + + public void setPendingUpload(@javax.annotation.Nullable Boolean pendingUpload) { + this.pendingUpload = pendingUpload; + } + + + public Avatar performance(@javax.annotation.Nonnull AvatarPerformance performance) { + this.performance = performance; + return this; + } + + /** + * Get performance + * @return performance + */ + @javax.annotation.Nonnull + public AvatarPerformance getPerformance() { + return performance; + } + + public void setPerformance(@javax.annotation.Nonnull AvatarPerformance performance) { + this.performance = performance; + } + + + public Avatar productId(@javax.annotation.Nullable String productId) { + this.productId = productId; + return this; + } + + /** + * Get productId + * @return productId + */ + @javax.annotation.Nullable + public String getProductId() { + return productId; + } + + public void setProductId(@javax.annotation.Nullable String productId) { + this.productId = productId; + } + + + public Avatar publishedListings(@javax.annotation.Nullable List publishedListings) { + this.publishedListings = publishedListings; + return this; + } + + public Avatar addPublishedListingsItem(AvatarPublishedListingsInner publishedListingsItem) { + if (this.publishedListings == null) { + this.publishedListings = new ArrayList<>(); + } + this.publishedListings.add(publishedListingsItem); + return this; + } + + /** + * Get publishedListings + * @return publishedListings + */ + @javax.annotation.Nullable + public List getPublishedListings() { + return publishedListings; + } + + public void setPublishedListings(@javax.annotation.Nullable List publishedListings) { + this.publishedListings = publishedListings; + } + + + 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 tags(List tags) { - + public Avatar searchable(@javax.annotation.Nullable Boolean searchable) { + this.searchable = searchable; + return this; + } + + /** + * Get searchable + * @return searchable + */ + @javax.annotation.Nullable + public Boolean getSearchable() { + return searchable; + } + + public void setSearchable(@javax.annotation.Nullable Boolean searchable) { + this.searchable = searchable; + } + + + public Avatar styles(@javax.annotation.Nonnull AvatarStyles styles) { + this.styles = styles; + return this; + } + + /** + * Get styles + * @return styles + */ + @javax.annotation.Nonnull + public AvatarStyles getStyles() { + return styles; + } + + public void setStyles(@javax.annotation.Nonnull AvatarStyles styles) { + this.styles = styles; + } + + + 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; } - /** - * 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 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -545,17 +823,29 @@ public boolean equals(Object o) { return false; } Avatar avatar = (Avatar) o; - return Objects.equals(this.assetUrl, avatar.assetUrl) && + return Objects.equals(this.acknowledgements, avatar.acknowledgements) && + Objects.equals(this.activeAssetReviewId, avatar.activeAssetReviewId) && + Objects.equals(this.assetUrl, avatar.assetUrl) && Objects.equals(this.assetUrlObject, avatar.assetUrlObject) && Objects.equals(this.authorId, avatar.authorId) && Objects.equals(this.authorName, avatar.authorName) && Objects.equals(this.createdAt, avatar.createdAt) && Objects.equals(this.description, avatar.description) && Objects.equals(this.featured, avatar.featured) && + Objects.equals(this.highestPrice, avatar.highestPrice) && Objects.equals(this.id, avatar.id) && Objects.equals(this.imageUrl, avatar.imageUrl) && + Objects.equals(this.listingDate, avatar.listingDate) && + Objects.equals(this.lock, avatar.lock) && + Objects.equals(this.lowestPrice, avatar.lowestPrice) && Objects.equals(this.name, avatar.name) && + Objects.equals(this.pendingUpload, avatar.pendingUpload) && + Objects.equals(this.performance, avatar.performance) && + Objects.equals(this.productId, avatar.productId) && + Objects.equals(this.publishedListings, avatar.publishedListings) && Objects.equals(this.releaseStatus, avatar.releaseStatus) && + Objects.equals(this.searchable, avatar.searchable) && + Objects.equals(this.styles, avatar.styles) && Objects.equals(this.tags, avatar.tags) && Objects.equals(this.thumbnailImageUrl, avatar.thumbnailImageUrl) && Objects.equals(this.unityPackageUrl, avatar.unityPackageUrl) && @@ -567,13 +857,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(assetUrl, assetUrlObject, authorId, authorName, createdAt, description, featured, id, imageUrl, name, releaseStatus, tags, thumbnailImageUrl, unityPackageUrl, unityPackageUrlObject, unityPackages, updatedAt, version); + return Objects.hash(acknowledgements, activeAssetReviewId, assetUrl, assetUrlObject, authorId, authorName, createdAt, description, featured, highestPrice, id, imageUrl, listingDate, lock, lowestPrice, name, pendingUpload, performance, productId, publishedListings, releaseStatus, searchable, styles, tags, thumbnailImageUrl, unityPackageUrl, unityPackageUrlObject, unityPackages, updatedAt, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Avatar {\n"); + sb.append(" acknowledgements: ").append(toIndentedString(acknowledgements)).append("\n"); + sb.append(" activeAssetReviewId: ").append(toIndentedString(activeAssetReviewId)).append("\n"); sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); sb.append(" assetUrlObject: ").append(toIndentedString(assetUrlObject)).append("\n"); sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); @@ -581,10 +873,20 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" featured: ").append(toIndentedString(featured)).append("\n"); + sb.append(" highestPrice: ").append(toIndentedString(highestPrice)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" listingDate: ").append(toIndentedString(listingDate)).append("\n"); + sb.append(" lock: ").append(toIndentedString(lock)).append("\n"); + sb.append(" lowestPrice: ").append(toIndentedString(lowestPrice)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" pendingUpload: ").append(toIndentedString(pendingUpload)).append("\n"); + sb.append(" performance: ").append(toIndentedString(performance)).append("\n"); + sb.append(" productId: ").append(toIndentedString(productId)).append("\n"); + sb.append(" publishedListings: ").append(toIndentedString(publishedListings)).append("\n"); sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); + sb.append(" searchable: ").append(toIndentedString(searchable)).append("\n"); + sb.append(" styles: ").append(toIndentedString(styles)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" thumbnailImageUrl: ").append(toIndentedString(thumbnailImageUrl)).append("\n"); sb.append(" unityPackageUrl: ").append(toIndentedString(unityPackageUrl)).append("\n"); @@ -601,11 +903,175 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Avatar.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 `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 (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(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(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(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(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(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(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(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(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") != 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(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.validateJsonElement(jsonObj.get("performance")); + if ((jsonObj.get("productId") != null && !jsonObj.get("productId").isJsonNull()) && !jsonObj.get("productId").isJsonPrimitive()) { + 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(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.validateJsonElement(jsonArraypublishedListings.get(i)); + }; + } + } + // validate the required field `releaseStatus` + ReleaseStatus.validateJsonElement(jsonObj.get("releaseStatus")); + // validate the required field `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(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(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(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.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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Avatar.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Avatar' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Avatar.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Avatar value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Avatar read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..432ae71e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AvatarModeration.java @@ -0,0 +1,264 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.AvatarModerationType; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * AvatarModeration + */ +@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(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { + this.avatarModerationType = avatarModerationType; + return this; + } + + /** + * Get avatarModerationType + * @return avatarModerationType + */ + @javax.annotation.Nonnull + public AvatarModerationType getAvatarModerationType() { + return avatarModerationType; + } + + public void setAvatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { + this.avatarModerationType = avatarModerationType; + } + + + public AvatarModeration created(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nonnull OffsetDateTime created) { + this.created = created; + } + + + public AvatarModeration targetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { + this.targetAvatarId = targetAvatarId; + return this; + } + + /** + * Get targetAvatarId + * @return targetAvatarId + */ + @javax.annotation.Nonnull + public String getTargetAvatarId() { + return targetAvatarId; + } + + public void setTargetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { + this.targetAvatarId = targetAvatarId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvatarModeration avatarModeration = (AvatarModeration) o; + return Objects.equals(this.avatarModerationType, avatarModeration.avatarModerationType) && + Objects.equals(this.created, avatarModeration.created) && + Objects.equals(this.targetAvatarId, avatarModeration.targetAvatarId); + } + + @Override + public int hashCode() { + return Objects.hash(avatarModerationType, created, targetAvatarId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvatarModeration {\n"); + sb.append(" avatarModerationType: ").append(toIndentedString(avatarModerationType)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" targetAvatarId: ").append(toIndentedString(targetAvatarId)).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("avatarModerationType", "created", "targetAvatarId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("avatarModerationType", "created", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvatarModeration.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 `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 (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(java.util.Locale.ROOT, "Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvatarModeration.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvatarModeration' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvatarModeration.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvatarModeration value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvatarModeration read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..c8057e2e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AvatarModerationCreated.java @@ -0,0 +1,263 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.AvatarModerationType; +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; + +/** + * AvatarModerationCreated + */ +@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(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { + this.avatarModerationType = avatarModerationType; + return this; + } + + /** + * Get avatarModerationType + * @return avatarModerationType + */ + @javax.annotation.Nonnull + public AvatarModerationType getAvatarModerationType() { + return avatarModerationType; + } + + public void setAvatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { + this.avatarModerationType = avatarModerationType; + } + + + public AvatarModerationCreated created(@javax.annotation.Nonnull Long created) { + this.created = created; + return this; + } + + /** + * Timestamp in milliseconds since Unix epoch + * @return created + */ + @javax.annotation.Nonnull + public Long getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nonnull Long created) { + this.created = created; + } + + + public AvatarModerationCreated targetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { + this.targetAvatarId = targetAvatarId; + return this; + } + + /** + * Get targetAvatarId + * @return targetAvatarId + */ + @javax.annotation.Nonnull + public String getTargetAvatarId() { + return targetAvatarId; + } + + public void setTargetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { + this.targetAvatarId = targetAvatarId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvatarModerationCreated avatarModerationCreated = (AvatarModerationCreated) o; + return Objects.equals(this.avatarModerationType, avatarModerationCreated.avatarModerationType) && + Objects.equals(this.created, avatarModerationCreated.created) && + Objects.equals(this.targetAvatarId, avatarModerationCreated.targetAvatarId); + } + + @Override + public int hashCode() { + return Objects.hash(avatarModerationType, created, targetAvatarId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvatarModerationCreated {\n"); + sb.append(" avatarModerationType: ").append(toIndentedString(avatarModerationType)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" targetAvatarId: ").append(toIndentedString(targetAvatarId)).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("avatarModerationType", "created", "targetAvatarId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("avatarModerationType", "created", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvatarModerationCreated.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 `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 (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(java.util.Locale.ROOT, "Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvatarModerationCreated.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvatarModerationCreated' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvatarModerationCreated.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvatarModerationCreated value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvatarModerationCreated read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..149993a3 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AvatarModerationType.java @@ -0,0 +1,75 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 AvatarModerationType + */ +@JsonAdapter(AvatarModerationType.Adapter.class) +public enum AvatarModerationType { + + BLOCK("block"); + + private String value; + + AvatarModerationType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AvatarModerationType fromValue(String value) { + for (AvatarModerationType b : AvatarModerationType.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 AvatarModerationType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AvatarModerationType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..b3f1f879 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AvatarPerformance.java @@ -0,0 +1,337 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * AvatarPerformance + */ +@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(@javax.annotation.Nullable String android) { + this.android = android; + return this; + } + + /** + * Get android + * @return android + */ + @javax.annotation.Nullable + public String getAndroid() { + return android; + } + + public void setAndroid(@javax.annotation.Nullable String android) { + this.android = android; + } + + + public AvatarPerformance androidSort(@javax.annotation.Nullable Integer androidSort) { + this.androidSort = androidSort; + return this; + } + + /** + * Get androidSort + * @return androidSort + */ + @javax.annotation.Nullable + public Integer getAndroidSort() { + return androidSort; + } + + public void setAndroidSort(@javax.annotation.Nullable Integer androidSort) { + this.androidSort = androidSort; + } + + + public AvatarPerformance ios(@javax.annotation.Nullable String ios) { + this.ios = ios; + return this; + } + + /** + * Get ios + * @return ios + */ + @javax.annotation.Nullable + public String getIos() { + return ios; + } + + public void setIos(@javax.annotation.Nullable String ios) { + this.ios = ios; + } + + + public AvatarPerformance iosSort(@javax.annotation.Nullable Integer iosSort) { + this.iosSort = iosSort; + return this; + } + + /** + * Get iosSort + * @return iosSort + */ + @javax.annotation.Nullable + public Integer getIosSort() { + return iosSort; + } + + public void setIosSort(@javax.annotation.Nullable Integer iosSort) { + this.iosSort = iosSort; + } + + + public AvatarPerformance standalonewindows(@javax.annotation.Nullable String standalonewindows) { + this.standalonewindows = standalonewindows; + return this; + } + + /** + * Get standalonewindows + * @return standalonewindows + */ + @javax.annotation.Nullable + public String getStandalonewindows() { + return standalonewindows; + } + + public void setStandalonewindows(@javax.annotation.Nullable String standalonewindows) { + this.standalonewindows = standalonewindows; + } + + + public AvatarPerformance standalonewindowsSort(@javax.annotation.Nullable Integer standalonewindowsSort) { + this.standalonewindowsSort = standalonewindowsSort; + return this; + } + + /** + * Get standalonewindowsSort + * @return standalonewindowsSort + */ + @javax.annotation.Nullable + public Integer getStandalonewindowsSort() { + return standalonewindowsSort; + } + + public void setStandalonewindowsSort(@javax.annotation.Nullable Integer standalonewindowsSort) { + this.standalonewindowsSort = standalonewindowsSort; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvatarPerformance avatarPerformance = (AvatarPerformance) o; + return Objects.equals(this.android, avatarPerformance.android) && + Objects.equals(this.androidSort, avatarPerformance.androidSort) && + Objects.equals(this.ios, avatarPerformance.ios) && + Objects.equals(this.iosSort, avatarPerformance.iosSort) && + Objects.equals(this.standalonewindows, avatarPerformance.standalonewindows) && + Objects.equals(this.standalonewindowsSort, avatarPerformance.standalonewindowsSort); + } + + @Override + public int hashCode() { + return Objects.hash(android, androidSort, ios, iosSort, standalonewindows, standalonewindowsSort); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvatarPerformance {\n"); + sb.append(" android: ").append(toIndentedString(android)).append("\n"); + sb.append(" androidSort: ").append(toIndentedString(androidSort)).append("\n"); + sb.append(" ios: ").append(toIndentedString(ios)).append("\n"); + sb.append(" iosSort: ").append(toIndentedString(iosSort)).append("\n"); + sb.append(" standalonewindows: ").append(toIndentedString(standalonewindows)).append("\n"); + sb.append(" standalonewindowsSort: ").append(toIndentedString(standalonewindowsSort)).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("android", "android-sort", "ios", "ios-sort", "standalonewindows", "standalonewindows-sort")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvatarPerformance.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 `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(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(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(java.util.Locale.ROOT, "Expected the field `standalonewindows` to be a primitive type in the JSON string but got `%s`", jsonObj.get("standalonewindows").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvatarPerformance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvatarPerformance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvatarPerformance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvatarPerformance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvatarPerformance read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..0cbf044e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AvatarPublishedListingsInner.java @@ -0,0 +1,343 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * AvatarPublishedListingsInner + */ +@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(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public AvatarPublishedListingsInner 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 AvatarPublishedListingsInner imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public AvatarPublishedListingsInner listingId(@javax.annotation.Nullable String listingId) { + this.listingId = listingId; + return this; + } + + /** + * Get listingId + * @return listingId + */ + @javax.annotation.Nullable + public String getListingId() { + return listingId; + } + + public void setListingId(@javax.annotation.Nullable String listingId) { + this.listingId = listingId; + } + + + public AvatarPublishedListingsInner listingType(@javax.annotation.Nullable String listingType) { + this.listingType = listingType; + return this; + } + + /** + * Get listingType + * @return listingType + */ + @javax.annotation.Nullable + public String getListingType() { + return listingType; + } + + public void setListingType(@javax.annotation.Nullable String listingType) { + this.listingType = listingType; + } + + + public AvatarPublishedListingsInner priceTokens(@javax.annotation.Nullable Integer priceTokens) { + this.priceTokens = priceTokens; + return this; + } + + /** + * Get priceTokens + * @return priceTokens + */ + @javax.annotation.Nullable + public Integer getPriceTokens() { + return priceTokens; + } + + public void setPriceTokens(@javax.annotation.Nullable Integer priceTokens) { + this.priceTokens = priceTokens; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvatarPublishedListingsInner avatarPublishedListingsInner = (AvatarPublishedListingsInner) o; + return Objects.equals(this.description, avatarPublishedListingsInner.description) && + Objects.equals(this.displayName, avatarPublishedListingsInner.displayName) && + Objects.equals(this.imageId, avatarPublishedListingsInner.imageId) && + Objects.equals(this.listingId, avatarPublishedListingsInner.listingId) && + Objects.equals(this.listingType, avatarPublishedListingsInner.listingType) && + Objects.equals(this.priceTokens, avatarPublishedListingsInner.priceTokens); + } + + @Override + public int hashCode() { + return Objects.hash(description, displayName, imageId, listingId, listingType, priceTokens); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvatarPublishedListingsInner {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" listingId: ").append(toIndentedString(listingId)).append("\n"); + sb.append(" listingType: ").append(toIndentedString(listingType)).append("\n"); + sb.append(" priceTokens: ").append(toIndentedString(priceTokens)).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("description", "displayName", "imageId", "listingId", "listingType", "priceTokens")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvatarPublishedListingsInner.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 `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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `listingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvatarPublishedListingsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvatarPublishedListingsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvatarPublishedListingsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvatarPublishedListingsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvatarPublishedListingsInner read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..89adb2ca --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AvatarStyle.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * + */ +@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(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public AvatarStyle styleName(@javax.annotation.Nonnull String styleName) { + this.styleName = styleName; + return this; + } + + /** + * Get styleName + * @return styleName + */ + @javax.annotation.Nonnull + public String getStyleName() { + return styleName; + } + + public void setStyleName(@javax.annotation.Nonnull String styleName) { + this.styleName = styleName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvatarStyle avatarStyle = (AvatarStyle) o; + return Objects.equals(this.id, avatarStyle.id) && + Objects.equals(this.styleName, avatarStyle.styleName); + } + + @Override + public int hashCode() { + return Objects.hash(id, styleName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvatarStyle {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" styleName: ").append(toIndentedString(styleName)).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("id", "styleName")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvatarStyle.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `styleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("styleName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvatarStyle.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvatarStyle' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvatarStyle.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvatarStyle value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvatarStyle read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..d366f619 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/AvatarStyles.java @@ -0,0 +1,282 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * AvatarStyles + */ +@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) + @javax.annotation.Nullable + private List supplementary = new ArrayList<>(); + + public AvatarStyles() { + } + + public AvatarStyles primary(@javax.annotation.Nullable String primary) { + this.primary = primary; + return this; + } + + /** + * Get primary + * @return primary + */ + @javax.annotation.Nullable + public String getPrimary() { + return primary; + } + + public void setPrimary(@javax.annotation.Nullable String primary) { + this.primary = primary; + } + + + public AvatarStyles secondary(@javax.annotation.Nullable String secondary) { + this.secondary = secondary; + return this; + } + + /** + * Get secondary + * @return secondary + */ + @javax.annotation.Nullable + public String getSecondary() { + return secondary; + } + + public void setSecondary(@javax.annotation.Nullable String secondary) { + this.secondary = secondary; + } + + + public AvatarStyles supplementary(@javax.annotation.Nullable List supplementary) { + this.supplementary = supplementary; + return this; + } + + public AvatarStyles addSupplementaryItem(String supplementaryItem) { + if (this.supplementary == null) { + this.supplementary = new ArrayList<>(); + } + this.supplementary.add(supplementaryItem); + return this; + } + + /** + * Get supplementary + * @return supplementary + */ + @javax.annotation.Nullable + public List getSupplementary() { + return supplementary; + } + + public void setSupplementary(@javax.annotation.Nullable List supplementary) { + this.supplementary = supplementary; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvatarStyles avatarStyles = (AvatarStyles) o; + return Objects.equals(this.primary, avatarStyles.primary) && + Objects.equals(this.secondary, avatarStyles.secondary) && + Objects.equals(this.supplementary, avatarStyles.supplementary); + } + + 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(primary, secondary, supplementary); + } + + 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 AvatarStyles {\n"); + sb.append(" primary: ").append(toIndentedString(primary)).append("\n"); + sb.append(" secondary: ").append(toIndentedString(secondary)).append("\n"); + sb.append(" supplementary: ").append(toIndentedString(supplementary)).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("primary", "secondary", "supplementary")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvatarStyles.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 `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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvatarStyles.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvatarStyles' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvatarStyles.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvatarStyles value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvatarStyles read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 38144778..225698a6 100644 --- a/src/main/java/io/github/vrchatapi/model/AvatarUnityPackageUrlObject.java +++ b/src/main/java/io/github/vrchatapi/model/AvatarUnityPackageUrlObject.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,52 +13,72 @@ package io.github.vrchatapi.model; import 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; +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; /** * **Deprecation:** `Object` has unknown usage/fields, and is always empty. Use normal `Url` field instead. * @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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -90,11 +110,94 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("unityPackageUrl")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvatarUnityPackageUrlObject.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 `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(java.util.Locale.ROOT, "Expected the field `unityPackageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityPackageUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvatarUnityPackageUrlObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvatarUnityPackageUrlObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AvatarUnityPackageUrlObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AvatarUnityPackageUrlObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvatarUnityPackageUrlObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..28132148 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Badge.java @@ -0,0 +1,438 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * Badge + */ +@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(@javax.annotation.Nullable OffsetDateTime assignedAt) { + this.assignedAt = assignedAt; + return this; + } + + /** + * only present in CurrentUser badges + * @return assignedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getAssignedAt() { + return assignedAt; + } + + public void setAssignedAt(@javax.annotation.Nullable OffsetDateTime assignedAt) { + this.assignedAt = assignedAt; + } + + + public Badge 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 Badge 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 Badge badgeImageUrl(@javax.annotation.Nonnull String badgeImageUrl) { + this.badgeImageUrl = badgeImageUrl; + return this; + } + + /** + * direct url to image + * @return badgeImageUrl + */ + @javax.annotation.Nonnull + public String getBadgeImageUrl() { + return badgeImageUrl; + } + + public void setBadgeImageUrl(@javax.annotation.Nonnull String badgeImageUrl) { + this.badgeImageUrl = badgeImageUrl; + } + + + public Badge 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; + } + + + public Badge hidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * only present in CurrentUser badges + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + + 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 + public Boolean getShowcased() { + return showcased; + } + + public void setShowcased(@javax.annotation.Nonnull Boolean showcased) { + this.showcased = showcased; + } + + + public Badge updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * only present in CurrentUser badges + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Badge badge = (Badge) o; + return Objects.equals(this.assignedAt, badge.assignedAt) && + Objects.equals(this.badgeDescription, badge.badgeDescription) && + Objects.equals(this.badgeId, badge.badgeId) && + 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); + } + + 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(assignedAt, badgeDescription, badgeId, badgeImageUrl, badgeName, hidden, isQuantifiable, showcased, updatedAt); + } + + 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 Badge {\n"); + sb.append(" assignedAt: ").append(toIndentedString(assignedAt)).append("\n"); + sb.append(" badgeDescription: ").append(toIndentedString(badgeDescription)).append("\n"); + sb.append(" badgeId: ").append(toIndentedString(badgeId)).append("\n"); + 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("}"); + 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("assignedAt", "badgeDescription", "badgeId", "badgeImageUrl", "badgeName", "hidden", "isQuantifiable", "showcased", "updatedAt")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Badge.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 `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 (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("badgeImageUrl").isJsonPrimitive()) { + 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(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 (!Badge.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Badge' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Badge.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Badge value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Badge read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..236b597a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Balance.java @@ -0,0 +1,257 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * + */ +@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(@javax.annotation.Nonnull Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + */ + @javax.annotation.Nonnull + public Integer getBalance() { + return balance; + } + + public void setBalance(@javax.annotation.Nonnull Integer balance) { + this.balance = balance; + } + + + public Balance noTransactions(@javax.annotation.Nullable Boolean noTransactions) { + this.noTransactions = noTransactions; + return this; + } + + /** + * Get noTransactions + * @return noTransactions + */ + @javax.annotation.Nullable + public Boolean getNoTransactions() { + return noTransactions; + } + + public void setNoTransactions(@javax.annotation.Nullable Boolean noTransactions) { + this.noTransactions = noTransactions; + } + + + public Balance tiliaResponse(@javax.annotation.Nullable Boolean tiliaResponse) { + this.tiliaResponse = tiliaResponse; + return this; + } + + /** + * Get tiliaResponse + * @return tiliaResponse + */ + @javax.annotation.Nullable + public Boolean getTiliaResponse() { + return tiliaResponse; + } + + public void setTiliaResponse(@javax.annotation.Nullable Boolean tiliaResponse) { + this.tiliaResponse = tiliaResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Balance balance = (Balance) o; + return Objects.equals(this.balance, balance.balance) && + Objects.equals(this.noTransactions, balance.noTransactions) && + Objects.equals(this.tiliaResponse, balance.tiliaResponse); + } + + @Override + public int hashCode() { + return Objects.hash(balance, noTransactions, tiliaResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Balance {\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" noTransactions: ").append(toIndentedString(noTransactions)).append("\n"); + sb.append(" tiliaResponse: ").append(toIndentedString(tiliaResponse)).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("balance", "noTransactions", "tiliaResponse")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("balance")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Balance.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Balance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Balance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Balance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Balance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Balance read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..51f8542b --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/BanGroupMemberRequest.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * BanGroupMemberRequest + */ +@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(@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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BanGroupMemberRequest banGroupMemberRequest = (BanGroupMemberRequest) o; + return Objects.equals(this.userId, banGroupMemberRequest.userId); + } + + @Override + public int hashCode() { + return Objects.hash(userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BanGroupMemberRequest {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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("userId")); + + // a set of required properties/fields (JSON key names) + 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BanGroupMemberRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BanGroupMemberRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BanGroupMemberRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BanGroupMemberRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BanGroupMemberRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BanGroupMemberRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..84c2f519 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/BoopRequest.java @@ -0,0 +1,256 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * 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", 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(@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 + public String getEmojiId() { + return emojiId; + } + + public void setEmojiId(@javax.annotation.Nullable String emojiId) { + this.emojiId = emojiId; + } + + + public BoopRequest 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 BoopRequest 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; + } + BoopRequest boopRequest = (BoopRequest) o; + return Objects.equals(this.emojiId, boopRequest.emojiId) && + Objects.equals(this.emojiVersion, boopRequest.emojiVersion) && + Objects.equals(this.inventoryItemId, boopRequest.inventoryItemId); + } + + @Override + public int hashCode() { + return Objects.hash(emojiId, emojiVersion, inventoryItemId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BoopRequest {\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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BoopRequest.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 `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(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 (!BoopRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BoopRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BoopRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BoopRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BoopRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..5133e705 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarDayOfWeek.java @@ -0,0 +1,87 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * The day of the week, used for recurring events. + */ +@JsonAdapter(CalendarDayOfWeek.Adapter.class) +public enum CalendarDayOfWeek { + + FR("FR"), + + MO("MO"), + + SA("SA"), + + SU("SU"), + + TH("TH"), + + TU("TU"), + + WE("WE"); + + private String value; + + CalendarDayOfWeek(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarDayOfWeek fromValue(String value) { + for (CalendarDayOfWeek b : CalendarDayOfWeek.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 CalendarDayOfWeek enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarDayOfWeek read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..bf326d1c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEvent.java @@ -0,0 +1,1068 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.CalendarEventAccess; +import io.github.vrchatapi.model.CalendarEventCategory; +import io.github.vrchatapi.model.CalendarEventOccurrenceKind; +import io.github.vrchatapi.model.CalendarEventPlatform; +import io.github.vrchatapi.model.CalendarEventRecurrence; +import io.github.vrchatapi.model.CalendarEventUserInterest; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * An event scheduled on a group's calendar + */ +@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) + @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) + @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) + @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) + @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(@javax.annotation.Nonnull CalendarEventAccess accessType) { + this.accessType = accessType; + return this; + } + + /** + * Get accessType + * @return accessType + */ + @javax.annotation.Nonnull + public CalendarEventAccess getAccessType() { + return accessType; + } + + public void setAccessType(@javax.annotation.Nonnull CalendarEventAccess accessType) { + this.accessType = accessType; + } + + + public CalendarEvent category(@javax.annotation.Nonnull CalendarEventCategory category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @javax.annotation.Nonnull + public CalendarEventCategory getCategory() { + return category; + } + + public void setCategory(@javax.annotation.Nonnull CalendarEventCategory category) { + this.category = category; + } + + + public CalendarEvent closeInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { + this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; + return this; + } + + /** + * Get closeInstanceAfterEndMinutes + * @return closeInstanceAfterEndMinutes + */ + @javax.annotation.Nullable + public Integer getCloseInstanceAfterEndMinutes() { + return closeInstanceAfterEndMinutes; + } + + public void setCloseInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { + this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; + } + + + public CalendarEvent createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CalendarEvent deletedAt(@javax.annotation.Nullable OffsetDateTime deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + /** + * Get deletedAt + * @return deletedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getDeletedAt() { + return deletedAt; + } + + public void setDeletedAt(@javax.annotation.Nullable OffsetDateTime deletedAt) { + this.deletedAt = deletedAt; + } + + + public CalendarEvent description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public CalendarEvent durationInMs(@javax.annotation.Nullable Long durationInMs) { + this.durationInMs = durationInMs; + return this; + } + + /** + * Get durationInMs + * @return durationInMs + */ + @javax.annotation.Nullable + public Long getDurationInMs() { + return durationInMs; + } + + public void setDurationInMs(@javax.annotation.Nullable Long durationInMs) { + this.durationInMs = durationInMs; + } + + + public CalendarEvent endsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { + this.endsAt = endsAt; + return this; + } + + /** + * Get endsAt + * @return endsAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getEndsAt() { + return endsAt; + } + + public void setEndsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { + this.endsAt = endsAt; + } + + + public CalendarEvent featured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + return this; + } + + /** + * Get featured + * @return featured + */ + @javax.annotation.Nullable + public Boolean getFeatured() { + return featured; + } + + public void setFeatured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + } + + + public CalendarEvent guestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { + this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; + return this; + } + + /** + * Get guestEarlyJoinMinutes + * @return guestEarlyJoinMinutes + */ + @javax.annotation.Nullable + public Integer getGuestEarlyJoinMinutes() { + return guestEarlyJoinMinutes; + } + + public void setGuestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { + this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; + } + + + public CalendarEvent hostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { + this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; + return this; + } + + /** + * Get hostEarlyJoinMinutes + * @return hostEarlyJoinMinutes + */ + @javax.annotation.Nullable + public Integer getHostEarlyJoinMinutes() { + return hostEarlyJoinMinutes; + } + + public void setHostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { + this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; + } + + + public CalendarEvent id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public CalendarEvent imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public CalendarEvent imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public CalendarEvent interestedUserCount(@javax.annotation.Nullable Integer interestedUserCount) { + this.interestedUserCount = interestedUserCount; + return this; + } + + /** + * Get interestedUserCount + * @return interestedUserCount + */ + @javax.annotation.Nullable + public Integer getInterestedUserCount() { + return interestedUserCount; + } + + public void setInterestedUserCount(@javax.annotation.Nullable Integer interestedUserCount) { + this.interestedUserCount = interestedUserCount; + } + + + public CalendarEvent isDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + return this; + } + + /** + * Get isDraft + * @return isDraft + */ + @javax.annotation.Nullable + public Boolean getIsDraft() { + return isDraft; + } + + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + } + + + public CalendarEvent languages(@javax.annotation.Nullable List languages) { + this.languages = languages; + return this; + } + + public CalendarEvent addLanguagesItem(String languagesItem) { + if (this.languages == null) { + this.languages = new ArrayList<>(); + } + this.languages.add(languagesItem); + return this; + } + + /** + * Languages that might be spoken at this event + * @return languages + */ + @javax.annotation.Nullable + public List getLanguages() { + return languages; + } + + public void setLanguages(@javax.annotation.Nullable List languages) { + this.languages = languages; + } + + + public CalendarEvent occurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { + this.occurrenceKind = occurrenceKind; + return this; + } + + /** + * Get occurrenceKind + * @return occurrenceKind + */ + @javax.annotation.Nullable + public CalendarEventOccurrenceKind getOccurrenceKind() { + return occurrenceKind; + } + + public void setOccurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { + this.occurrenceKind = occurrenceKind; + } + + + public CalendarEvent ownerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + return this; + } + + /** + * Get ownerId + * @return ownerId + */ + @javax.annotation.Nullable + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public CalendarEvent platforms(@javax.annotation.Nullable List platforms) { + this.platforms = platforms; + return this; + } + + public CalendarEvent addPlatformsItem(CalendarEventPlatform platformsItem) { + if (this.platforms == null) { + this.platforms = new ArrayList<>(); + } + this.platforms.add(platformsItem); + return this; + } + + /** + * Get platforms + * @return platforms + */ + @javax.annotation.Nullable + public List getPlatforms() { + return platforms; + } + + public void setPlatforms(@javax.annotation.Nullable List platforms) { + this.platforms = platforms; + } + + + public CalendarEvent recurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { + this.recurrence = recurrence; + return this; + } + + /** + * Get recurrence + * @return recurrence + */ + @javax.annotation.Nullable + public CalendarEventRecurrence getRecurrence() { + return recurrence; + } + + public void setRecurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { + this.recurrence = recurrence; + } + + + public CalendarEvent roleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + return this; + } + + public CalendarEvent addRoleIdsItem(String roleIdsItem) { + if (this.roleIds == null) { + this.roleIds = new ArrayList<>(); + } + this.roleIds.add(roleIdsItem); + return this; + } + + /** + * Group roles that may join this event + * @return roleIds + */ + @javax.annotation.Nullable + public List getRoleIds() { + return roleIds; + } + + public void setRoleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + } + + + public CalendarEvent seriesId(@javax.annotation.Nullable String seriesId) { + this.seriesId = seriesId; + return this; + } + + /** + * So far unused, always \"null\" + * @return seriesId + */ + @javax.annotation.Nullable + public String getSeriesId() { + return seriesId; + } + + public void setSeriesId(@javax.annotation.Nullable String seriesId) { + this.seriesId = seriesId; + } + + + public CalendarEvent startsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + * Get startsAt + * @return startsAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getStartsAt() { + return startsAt; + } + + public void setStartsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { + this.startsAt = startsAt; + } + + + public CalendarEvent tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public CalendarEvent addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Custom tags for this event + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public CalendarEvent 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; + } + + + public CalendarEvent 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; + } + + + public CalendarEvent updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public CalendarEvent userInterest(@javax.annotation.Nullable CalendarEventUserInterest userInterest) { + this.userInterest = userInterest; + return this; + } + + /** + * Get userInterest + * @return userInterest + */ + @javax.annotation.Nullable + public CalendarEventUserInterest getUserInterest() { + return userInterest; + } + + public void setUserInterest(@javax.annotation.Nullable CalendarEventUserInterest userInterest) { + this.userInterest = userInterest; + } + + + public CalendarEvent usesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { + this.usesInstanceOverflow = usesInstanceOverflow; + return this; + } + + /** + * Get usesInstanceOverflow + * @return usesInstanceOverflow + */ + @javax.annotation.Nullable + public Boolean getUsesInstanceOverflow() { + return usesInstanceOverflow; + } + + public void setUsesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { + this.usesInstanceOverflow = usesInstanceOverflow; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarEvent calendarEvent = (CalendarEvent) o; + return Objects.equals(this.accessType, calendarEvent.accessType) && + Objects.equals(this.category, calendarEvent.category) && + Objects.equals(this.closeInstanceAfterEndMinutes, calendarEvent.closeInstanceAfterEndMinutes) && + Objects.equals(this.createdAt, calendarEvent.createdAt) && + Objects.equals(this.deletedAt, calendarEvent.deletedAt) && + Objects.equals(this.description, calendarEvent.description) && + Objects.equals(this.durationInMs, calendarEvent.durationInMs) && + Objects.equals(this.endsAt, calendarEvent.endsAt) && + Objects.equals(this.featured, calendarEvent.featured) && + Objects.equals(this.guestEarlyJoinMinutes, calendarEvent.guestEarlyJoinMinutes) && + Objects.equals(this.hostEarlyJoinMinutes, calendarEvent.hostEarlyJoinMinutes) && + Objects.equals(this.id, calendarEvent.id) && + Objects.equals(this.imageId, calendarEvent.imageId) && + Objects.equals(this.imageUrl, calendarEvent.imageUrl) && + Objects.equals(this.interestedUserCount, calendarEvent.interestedUserCount) && + Objects.equals(this.isDraft, calendarEvent.isDraft) && + Objects.equals(this.languages, calendarEvent.languages) && + Objects.equals(this.occurrenceKind, calendarEvent.occurrenceKind) && + Objects.equals(this.ownerId, calendarEvent.ownerId) && + Objects.equals(this.platforms, calendarEvent.platforms) && + Objects.equals(this.recurrence, calendarEvent.recurrence) && + Objects.equals(this.roleIds, calendarEvent.roleIds) && + Objects.equals(this.seriesId, calendarEvent.seriesId) && + Objects.equals(this.startsAt, calendarEvent.startsAt) && + Objects.equals(this.tags, calendarEvent.tags) && + Objects.equals(this.title, calendarEvent.title) && + Objects.equals(this.type, calendarEvent.type) && + Objects.equals(this.updatedAt, calendarEvent.updatedAt) && + Objects.equals(this.userInterest, calendarEvent.userInterest) && + Objects.equals(this.usesInstanceOverflow, calendarEvent.usesInstanceOverflow); + } + + 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(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); + } + + 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 CalendarEvent {\n"); + sb.append(" accessType: ").append(toIndentedString(accessType)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" closeInstanceAfterEndMinutes: ").append(toIndentedString(closeInstanceAfterEndMinutes)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" durationInMs: ").append(toIndentedString(durationInMs)).append("\n"); + sb.append(" endsAt: ").append(toIndentedString(endsAt)).append("\n"); + sb.append(" featured: ").append(toIndentedString(featured)).append("\n"); + sb.append(" guestEarlyJoinMinutes: ").append(toIndentedString(guestEarlyJoinMinutes)).append("\n"); + sb.append(" hostEarlyJoinMinutes: ").append(toIndentedString(hostEarlyJoinMinutes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" interestedUserCount: ").append(toIndentedString(interestedUserCount)).append("\n"); + sb.append(" isDraft: ").append(toIndentedString(isDraft)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" occurrenceKind: ").append(toIndentedString(occurrenceKind)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" platforms: ").append(toIndentedString(platforms)).append("\n"); + sb.append(" recurrence: ").append(toIndentedString(recurrence)).append("\n"); + sb.append(" roleIds: ").append(toIndentedString(roleIds)).append("\n"); + sb.append(" seriesId: ").append(toIndentedString(seriesId)).append("\n"); + sb.append(" startsAt: ").append(toIndentedString(startsAt)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" userInterest: ").append(toIndentedString(userInterest)).append("\n"); + sb.append(" usesInstanceOverflow: ").append(toIndentedString(usesInstanceOverflow)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CalendarEvent.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 `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 (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(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(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(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(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").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(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").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.validateJsonElement(jsonObj.get("recurrence")); + } + // ensure the optional json data is an array if present + 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(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").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(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(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.validateJsonElement(jsonObj.get("userInterest")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CalendarEvent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CalendarEvent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CalendarEvent.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CalendarEvent value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CalendarEvent read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..15d7b9d9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventAccess.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Who the event is for + */ +@JsonAdapter(CalendarEventAccess.Adapter.class) +public enum CalendarEventAccess { + + GROUP("group"), + + PUBLIC("public"); + + private String value; + + CalendarEventAccess(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventAccess fromValue(String value) { + for (CalendarEventAccess b : CalendarEventAccess.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 CalendarEventAccess enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventAccess read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..d3b37e39 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventCategory.java @@ -0,0 +1,99 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * The activity intended to take place at an event + */ +@JsonAdapter(CalendarEventCategory.Adapter.class) +public enum CalendarEventCategory { + + ARTS("arts"), + + AVATARS("avatars"), + + DANCE("dance"), + + EDUCATION("education"), + + EXPLORATION("exploration"), + + FILM_MEDIA("film_media"), + + GAMING("gaming"), + + HANGOUT("hangout"), + + MUSIC("music"), + + OTHER("other"), + + PERFORMANCE("performance"), + + ROLEPLAYING("roleplaying"), + + WELLNESS("wellness"); + + private String value; + + CalendarEventCategory(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventCategory fromValue(String value) { + for (CalendarEventCategory b : CalendarEventCategory.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 CalendarEventCategory enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventCategory read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..87fd44a2 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscovery.java @@ -0,0 +1,255 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.CalendarEvent; +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; + +/** + * CalendarEventDiscovery + */ +@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(@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 + public String getNextCursor() { + return nextCursor; + } + + public void setNextCursor(@javax.annotation.Nonnull String nextCursor) { + this.nextCursor = nextCursor; + } + + + 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 + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarEventDiscovery calendarEventDiscovery = (CalendarEventDiscovery) o; + return Objects.equals(this.nextCursor, calendarEventDiscovery.nextCursor) && + Objects.equals(this.results, calendarEventDiscovery.results); + } + + @Override + public int hashCode() { + return Objects.hash(nextCursor, results); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarEventDiscovery {\n"); + sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).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("nextCursor", "results")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("nextCursor", "results")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CalendarEventDiscovery.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 `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 (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(java.util.Locale.ROOT, "Expected the field `nextCursor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextCursor").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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CalendarEventDiscovery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CalendarEventDiscovery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CalendarEventDiscovery.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CalendarEventDiscovery value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CalendarEventDiscovery read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..46a0c4fd --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryInclusion.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 CalendarEventDiscoveryInclusion + */ +@JsonAdapter(CalendarEventDiscoveryInclusion.Adapter.class) +public enum CalendarEventDiscoveryInclusion { + + EXCLUDE("exclude"), + + INCLUDE("include"), + + SKIP("skip"); + + private String value; + + CalendarEventDiscoveryInclusion(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventDiscoveryInclusion fromValue(String value) { + for (CalendarEventDiscoveryInclusion b : CalendarEventDiscoveryInclusion.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 CalendarEventDiscoveryInclusion enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventDiscoveryInclusion read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..97593459 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventDiscoveryScope.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 CalendarEventDiscoveryScope + */ +@JsonAdapter(CalendarEventDiscoveryScope.Adapter.class) +public enum CalendarEventDiscoveryScope { + + ALL("all"), + + LIVE("live"), + + UPCOMING("upcoming"); + + private String value; + + CalendarEventDiscoveryScope(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventDiscoveryScope fromValue(String value) { + for (CalendarEventDiscoveryScope b : CalendarEventDiscoveryScope.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 CalendarEventDiscoveryScope enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventDiscoveryScope read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..a9117b38 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventFrequency.java @@ -0,0 +1,81 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * The time unit used to specify how often a recurring event occurs. + */ +@JsonAdapter(CalendarEventFrequency.Adapter.class) +public enum CalendarEventFrequency { + + DAILY("daily"), + + MONTHLY("monthly"), + + WEEKLY("weekly"), + + YEARLY("yearly"); + + private String value; + + CalendarEventFrequency(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventFrequency fromValue(String value) { + for (CalendarEventFrequency b : CalendarEventFrequency.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 CalendarEventFrequency enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventFrequency read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..56e12f56 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventOccurrenceKind.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * How an event occurs or recurs. \"single\" is a standalone event, \"series\" is a parent specification of a recurring series, and \"occurrence\" is an individual event in a series. + */ +@JsonAdapter(CalendarEventOccurrenceKind.Adapter.class) +public enum CalendarEventOccurrenceKind { + + OCCURRENCE("occurrence"), + + SERIES("series"), + + SINGLE("single"); + + private String value; + + CalendarEventOccurrenceKind(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventOccurrenceKind fromValue(String value) { + for (CalendarEventOccurrenceKind b : CalendarEventOccurrenceKind.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 CalendarEventOccurrenceKind enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventOccurrenceKind read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..d22891ca --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventPlatform.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 CalendarEventPlatform + */ +@JsonAdapter(CalendarEventPlatform.Adapter.class) +public enum CalendarEventPlatform { + + ANDROID("android"), + + IOS("ios"), + + STANDALONEWINDOWS("standalonewindows"); + + private String value; + + CalendarEventPlatform(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventPlatform fromValue(String value) { + for (CalendarEventPlatform b : CalendarEventPlatform.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 CalendarEventPlatform enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventPlatform read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..aef8dedf --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrence.java @@ -0,0 +1,336 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.CalendarDayOfWeek; +import io.github.vrchatapi.model.CalendarEventFrequency; +import io.github.vrchatapi.model.CalendarEventRecurrenceEnd; +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; + +/** + * 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", 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) + @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(@javax.annotation.Nullable List daysOfWeek) { + this.daysOfWeek = daysOfWeek; + return this; + } + + public CalendarEventRecurrence addDaysOfWeekItem(CalendarDayOfWeek daysOfWeekItem) { + if (this.daysOfWeek == null) { + this.daysOfWeek = new ArrayList<>(); + } + this.daysOfWeek.add(daysOfWeekItem); + return this; + } + + /** + * Which days of the week the event will be scheduled, only valid/present for \"weekly\" recurring events + * @return daysOfWeek + */ + @javax.annotation.Nullable + public List getDaysOfWeek() { + return daysOfWeek; + } + + public void setDaysOfWeek(@javax.annotation.Nullable List daysOfWeek) { + this.daysOfWeek = daysOfWeek; + } + + + public CalendarEventRecurrence end(@javax.annotation.Nullable CalendarEventRecurrenceEnd end) { + this.end = end; + return this; + } + + /** + * Get end + * @return end + */ + @javax.annotation.Nullable + public CalendarEventRecurrenceEnd getEnd() { + return end; + } + + public void setEnd(@javax.annotation.Nullable CalendarEventRecurrenceEnd end) { + this.end = end; + } + + + public CalendarEventRecurrence frequency(@javax.annotation.Nonnull CalendarEventFrequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get frequency + * @return frequency + */ + @javax.annotation.Nonnull + public CalendarEventFrequency getFrequency() { + return frequency; + } + + public void setFrequency(@javax.annotation.Nonnull CalendarEventFrequency frequency) { + this.frequency = frequency; + } + + + 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 + public Integer getInterval() { + return interval; + } + + public void setInterval(@javax.annotation.Nonnull Integer interval) { + this.interval = interval; + } + + + 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 + public String getTimezone() { + return timezone; + } + + public void setTimezone(@javax.annotation.Nonnull String timezone) { + this.timezone = timezone; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarEventRecurrence calendarEventRecurrence = (CalendarEventRecurrence) o; + return Objects.equals(this.daysOfWeek, calendarEventRecurrence.daysOfWeek) && + Objects.equals(this.end, calendarEventRecurrence.end) && + Objects.equals(this.frequency, calendarEventRecurrence.frequency) && + Objects.equals(this.interval, calendarEventRecurrence.interval) && + Objects.equals(this.timezone, calendarEventRecurrence.timezone); + } + + @Override + public int hashCode() { + return Objects.hash(daysOfWeek, end, frequency, interval, timezone); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarEventRecurrence {\n"); + sb.append(" daysOfWeek: ").append(toIndentedString(daysOfWeek)).append("\n"); + sb.append(" end: ").append(toIndentedString(end)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).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("daysOfWeek", "end", "frequency", "interval", "timezone")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("frequency", "interval", "timezone")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CalendarEventRecurrence.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 `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 (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").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.validateJsonElement(jsonObj.get("end")); + } + // validate the required field `frequency` + CalendarEventFrequency.validateJsonElement(jsonObj.get("frequency")); + if (!jsonObj.get("timezone").isJsonPrimitive()) { + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CalendarEventRecurrence.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CalendarEventRecurrence' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CalendarEventRecurrence.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CalendarEventRecurrence value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CalendarEventRecurrence read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..4691f47e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEnd.java @@ -0,0 +1,264 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.CalendarEventRecurrenceEndType; +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; + +/** + * Details about how a recurring event stops being scheduled + */ +@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) + @javax.annotation.Nonnull + private CalendarEventRecurrenceEndType type = CalendarEventRecurrenceEndType.AFTER_DATE; + + public CalendarEventRecurrenceEnd() { + } + + 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 + public Integer getCount() { + return count; + } + + public void setCount(@javax.annotation.Nullable Integer count) { + this.count = count; + } + + + 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 + public String getDate() { + return date; + } + + public void setDate(@javax.annotation.Nullable String date) { + this.date = date; + } + + + public CalendarEventRecurrenceEnd type(@javax.annotation.Nonnull CalendarEventRecurrenceEndType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public CalendarEventRecurrenceEndType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull CalendarEventRecurrenceEndType type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarEventRecurrenceEnd calendarEventRecurrenceEnd = (CalendarEventRecurrenceEnd) o; + return Objects.equals(this.count, calendarEventRecurrenceEnd.count) && + Objects.equals(this.date, calendarEventRecurrenceEnd.date) && + Objects.equals(this.type, calendarEventRecurrenceEnd.type); + } + + @Override + public int hashCode() { + return Objects.hash(count, date, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarEventRecurrenceEnd {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\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("count", "date", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CalendarEventRecurrenceEnd.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 `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 (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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CalendarEventRecurrenceEnd.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CalendarEventRecurrenceEnd' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CalendarEventRecurrenceEnd.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CalendarEventRecurrenceEnd value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CalendarEventRecurrenceEnd read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..159e41dd --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventRecurrenceEndType.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * How a recurring event stops being scheduled + */ +@JsonAdapter(CalendarEventRecurrenceEndType.Adapter.class) +public enum CalendarEventRecurrenceEndType { + + AFTER_DATE("afterDate"), + + AFTER_OCCURRENCES("afterOccurrences"); + + private String value; + + CalendarEventRecurrenceEndType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CalendarEventRecurrenceEndType fromValue(String value) { + for (CalendarEventRecurrenceEndType b : CalendarEventRecurrenceEndType.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 CalendarEventRecurrenceEndType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CalendarEventRecurrenceEndType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..9ba80219 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CalendarEventUserInterest.java @@ -0,0 +1,251 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * CalendarEventUserInterest + */ +@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(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CalendarEventUserInterest isFollowing(@javax.annotation.Nullable Boolean isFollowing) { + this.isFollowing = isFollowing; + return this; + } + + /** + * Get isFollowing + * @return isFollowing + */ + @javax.annotation.Nullable + public Boolean getIsFollowing() { + return isFollowing; + } + + public void setIsFollowing(@javax.annotation.Nullable Boolean isFollowing) { + this.isFollowing = isFollowing; + } + + + public CalendarEventUserInterest updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarEventUserInterest calendarEventUserInterest = (CalendarEventUserInterest) o; + return Objects.equals(this.createdAt, calendarEventUserInterest.createdAt) && + Objects.equals(this.isFollowing, calendarEventUserInterest.isFollowing) && + Objects.equals(this.updatedAt, calendarEventUserInterest.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, isFollowing, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarEventUserInterest {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" isFollowing: ").append(toIndentedString(isFollowing)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("createdAt", "isFollowing", "updatedAt")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CalendarEventUserInterest.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 `CalendarEventUserInterest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CalendarEventUserInterest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CalendarEventUserInterest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CalendarEventUserInterest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CalendarEventUserInterest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CalendarEventUserInterest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..0fe4c4b1 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ChangeUserTagsRequest.java @@ -0,0 +1,221 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * ChangeUserTagsRequest + */ +@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(@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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeUserTagsRequest changeUserTagsRequest = (ChangeUserTagsRequest) o; + return Objects.equals(this.tags, changeUserTagsRequest.tags); + } + + @Override + public int hashCode() { + return Objects.hash(tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeUserTagsRequest {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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("tags")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ChangeUserTagsRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeUserTagsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeUserTagsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeUserTagsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeUserTagsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ChangeUserTagsRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..52dbc507 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ChangeWorldTagsRequest.java @@ -0,0 +1,221 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * ChangeWorldTagsRequest + */ +@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(@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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeWorldTagsRequest changeWorldTagsRequest = (ChangeWorldTagsRequest) o; + return Objects.equals(this.tags, changeWorldTagsRequest.tags); + } + + @Override + public int hashCode() { + return Objects.hash(tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeWorldTagsRequest {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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("tags")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ChangeWorldTagsRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeWorldTagsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeWorldTagsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeWorldTagsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeWorldTagsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ChangeWorldTagsRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..24891e3b --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ContentFilter.java @@ -0,0 +1,83 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Flags for content filtering + */ +@JsonAdapter(ContentFilter.Adapter.class) +public enum ContentFilter { + + CONTENT_ADULT("content_adult"), + + CONTENT_GORE("content_gore"), + + CONTENT_HORROR("content_horror"), + + CONTENT_SEX("content_sex"), + + CONTENT_VIOLENCE("content_violence"); + + private String value; + + ContentFilter(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContentFilter fromValue(String value) { + for (ContentFilter b : ContentFilter.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 ContentFilter enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContentFilter read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..6417afae --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateAvatarModerationRequest.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.AvatarModerationType; +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; + +/** + * CreateAvatarModerationRequest + */ +@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(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { + this.avatarModerationType = avatarModerationType; + return this; + } + + /** + * Get avatarModerationType + * @return avatarModerationType + */ + @javax.annotation.Nonnull + public AvatarModerationType getAvatarModerationType() { + return avatarModerationType; + } + + public void setAvatarModerationType(@javax.annotation.Nonnull AvatarModerationType avatarModerationType) { + this.avatarModerationType = avatarModerationType; + } + + + public CreateAvatarModerationRequest targetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { + this.targetAvatarId = targetAvatarId; + return this; + } + + /** + * Get targetAvatarId + * @return targetAvatarId + */ + @javax.annotation.Nonnull + public String getTargetAvatarId() { + return targetAvatarId; + } + + public void setTargetAvatarId(@javax.annotation.Nonnull String targetAvatarId) { + this.targetAvatarId = targetAvatarId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAvatarModerationRequest createAvatarModerationRequest = (CreateAvatarModerationRequest) o; + return Objects.equals(this.avatarModerationType, createAvatarModerationRequest.avatarModerationType) && + Objects.equals(this.targetAvatarId, createAvatarModerationRequest.targetAvatarId); + } + + @Override + public int hashCode() { + return Objects.hash(avatarModerationType, targetAvatarId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAvatarModerationRequest {\n"); + sb.append(" avatarModerationType: ").append(toIndentedString(avatarModerationType)).append("\n"); + sb.append(" targetAvatarId: ").append(toIndentedString(targetAvatarId)).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("avatarModerationType", "targetAvatarId")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateAvatarModerationRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `targetAvatarId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetAvatarId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAvatarModerationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAvatarModerationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAvatarModerationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAvatarModerationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateAvatarModerationRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 84f440a8..f9c3b234 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateAvatarRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateAvatarRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,277 +13,417 @@ package io.github.vrchatapi.model; import 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.math.BigDecimal; 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; + /** * 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_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + 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_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; + 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_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + 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_VERSION = "version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private BigDecimal version = new BigDecimal("1"); + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @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 id(String id) { - + public CreateAvatarRequest assetVersion(@javax.annotation.Nullable String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get assetVersion + * @return assetVersion + */ + @javax.annotation.Nullable + public String getAssetVersion() { + return assetVersion; + } + + public void setAssetVersion(@javax.annotation.Nullable String assetVersion) { + this.assetVersion = assetVersion; + } + + + 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 + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + } + + + public CreateAvatarRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + 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 name(String name) { - + public CreateAvatarRequest imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + 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 description(String description) { - - this.description = description; + public CreateAvatarRequest platform(@javax.annotation.Nullable String platform) { + this.platform = platform; return this; } - /** - * Get description - * @return description - **/ + /** + * 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(value = "") + public String getPlatform() { + return platform; + } - public String getDescription() { - return description; + public void setPlatform(@javax.annotation.Nullable String platform) { + this.platform = platform; } - public void setDescription(String description) { - this.description = description; + public CreateAvatarRequest releaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; + return this; + } + + /** + * Get releaseStatus + * @return releaseStatus + */ + @javax.annotation.Nullable + public ReleaseStatus getReleaseStatus() { + return 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; } public CreateAvatarRequest addTagsItem(String tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(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 CreateAvatarRequest imageUrl(String imageUrl) { - - this.imageUrl = imageUrl; + public CreateAvatarRequest thumbnailImageUrl(@javax.annotation.Nullable String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; return this; } - /** - * Get imageUrl - * @return imageUrl - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getImageUrl() { - return imageUrl; + /** + * Get thumbnailImageUrl + * @return thumbnailImageUrl + */ + @javax.annotation.Nullable + public String getThumbnailImageUrl() { + return thumbnailImageUrl; } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; + public void setThumbnailImageUrl(@javax.annotation.Nullable String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; } - public CreateAvatarRequest releaseStatus(ReleaseStatus releaseStatus) { - - this.releaseStatus = releaseStatus; + public CreateAvatarRequest unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; return this; } - /** - * Get releaseStatus - * @return releaseStatus - **/ + /** + * Get unityPackageUrl + * @return unityPackageUrl + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public ReleaseStatus getReleaseStatus() { - return releaseStatus; + public String getUnityPackageUrl() { + return unityPackageUrl; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { - this.releaseStatus = releaseStatus; + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; } - public CreateAvatarRequest version(BigDecimal version) { - - this.version = version; + public CreateAvatarRequest unityVersion(@javax.annotation.Nullable String unityVersion) { + this.unityVersion = unityVersion; return this; } - /** - * Get version - * minimum: 0 - * @return version - **/ + /** + * Get unityVersion + * @return unityVersion + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public BigDecimal getVersion() { - return version; + public String getUnityVersion() { + return unityVersion; } - - public void setVersion(BigDecimal version) { - this.version = version; + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { + this.unityVersion = unityVersion; } - public CreateAvatarRequest unityPackageUrl(String unityPackageUrl) { - - this.unityPackageUrl = unityPackageUrl; + public CreateAvatarRequest updatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; return this; } - /** - * Get unityPackageUrl - * @return unityPackageUrl - **/ + /** + * 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(value = "") + public String getUpdatedAt() { + return updatedAt; + } - public String getUnityPackageUrl() { - return unityPackageUrl; + public void setUpdatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; } - public void setUnityPackageUrl(String unityPackageUrl) { - this.unityPackageUrl = unityPackageUrl; + public CreateAvatarRequest version(@javax.annotation.Nullable Integer version) { + this.version = version; + return this; } + /** + * Get version + * minimum: 0 + * @return version + */ + @javax.annotation.Nullable + public Integer getVersion() { + return version; + } + + public void setVersion(@javax.annotation.Nullable Integer version) { + this.version = version; + } + + @Override public boolean equals(Object o) { @@ -295,19 +435,25 @@ public boolean equals(Object o) { } CreateAvatarRequest createAvatarRequest = (CreateAvatarRequest) o; return Objects.equals(this.assetUrl, createAvatarRequest.assetUrl) && - Objects.equals(this.id, createAvatarRequest.id) && - Objects.equals(this.name, createAvatarRequest.name) && + Objects.equals(this.assetVersion, createAvatarRequest.assetVersion) && + Objects.equals(this.createdAt, createAvatarRequest.createdAt) && Objects.equals(this.description, createAvatarRequest.description) && - Objects.equals(this.tags, createAvatarRequest.tags) && + Objects.equals(this.id, createAvatarRequest.id) && Objects.equals(this.imageUrl, createAvatarRequest.imageUrl) && + Objects.equals(this.name, createAvatarRequest.name) && + Objects.equals(this.platform, createAvatarRequest.platform) && Objects.equals(this.releaseStatus, createAvatarRequest.releaseStatus) && - Objects.equals(this.version, createAvatarRequest.version) && - Objects.equals(this.unityPackageUrl, createAvatarRequest.unityPackageUrl); + Objects.equals(this.tags, createAvatarRequest.tags) && + Objects.equals(this.thumbnailImageUrl, createAvatarRequest.thumbnailImageUrl) && + Objects.equals(this.unityPackageUrl, createAvatarRequest.unityPackageUrl) && + Objects.equals(this.unityVersion, createAvatarRequest.unityVersion) && + Objects.equals(this.updatedAt, createAvatarRequest.updatedAt) && + Objects.equals(this.version, createAvatarRequest.version); } @Override public int hashCode() { - return Objects.hash(assetUrl, id, name, description, tags, imageUrl, releaseStatus, version, unityPackageUrl); + return Objects.hash(assetUrl, assetVersion, createdAt, description, id, imageUrl, name, platform, releaseStatus, tags, thumbnailImageUrl, unityPackageUrl, unityVersion, updatedAt, version); } @Override @@ -315,14 +461,20 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateAvatarRequest {\n"); sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" assetVersion: ").append(toIndentedString(assetVersion)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" thumbnailImageUrl: ").append(toIndentedString(thumbnailImageUrl)).append("\n"); sb.append(" unityPackageUrl: ").append(toIndentedString(unityPackageUrl)).append("\n"); + sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); } @@ -332,11 +484,142 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateAvatarRequest.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 `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 (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(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(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(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(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(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(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(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(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").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(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(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(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(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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAvatarRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAvatarRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAvatarRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAvatarRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateAvatarRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..6bd83779 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateCalendarEventRequest.java @@ -0,0 +1,817 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.CalendarEventAccess; +import io.github.vrchatapi.model.CalendarEventCategory; +import io.github.vrchatapi.model.CalendarEventOccurrenceKind; +import io.github.vrchatapi.model.CalendarEventPlatform; +import io.github.vrchatapi.model.CalendarEventRecurrence; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * CreateCalendarEventRequest + */ +@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) + @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) + @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) + @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) + @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(@javax.annotation.Nonnull CalendarEventAccess accessType) { + this.accessType = accessType; + return this; + } + + /** + * Get accessType + * @return accessType + */ + @javax.annotation.Nonnull + public CalendarEventAccess getAccessType() { + return accessType; + } + + public void setAccessType(@javax.annotation.Nonnull CalendarEventAccess accessType) { + this.accessType = accessType; + } + + + public CreateCalendarEventRequest category(@javax.annotation.Nonnull CalendarEventCategory category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @javax.annotation.Nonnull + public CalendarEventCategory getCategory() { + return category; + } + + public void setCategory(@javax.annotation.Nonnull CalendarEventCategory category) { + this.category = category; + } + + + public CreateCalendarEventRequest closeInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { + this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; + return this; + } + + /** + * Get closeInstanceAfterEndMinutes + * @return closeInstanceAfterEndMinutes + */ + @javax.annotation.Nullable + public Integer getCloseInstanceAfterEndMinutes() { + return closeInstanceAfterEndMinutes; + } + + public void setCloseInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { + this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; + } + + + public CreateCalendarEventRequest description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public CreateCalendarEventRequest endsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { + this.endsAt = endsAt; + return this; + } + + /** + * Time the event ends at + * @return endsAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getEndsAt() { + return endsAt; + } + + public void setEndsAt(@javax.annotation.Nonnull OffsetDateTime endsAt) { + this.endsAt = endsAt; + } + + + public CreateCalendarEventRequest featured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + return this; + } + + /** + * Get featured + * @return featured + */ + @javax.annotation.Nullable + public Boolean getFeatured() { + return featured; + } + + public void setFeatured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + } + + + public CreateCalendarEventRequest guestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { + this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; + return this; + } + + /** + * Get guestEarlyJoinMinutes + * @return guestEarlyJoinMinutes + */ + @javax.annotation.Nullable + public Integer getGuestEarlyJoinMinutes() { + return guestEarlyJoinMinutes; + } + + public void setGuestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { + this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; + } + + + public CreateCalendarEventRequest hostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { + this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; + return this; + } + + /** + * Get hostEarlyJoinMinutes + * @return hostEarlyJoinMinutes + */ + @javax.annotation.Nullable + public Integer getHostEarlyJoinMinutes() { + return hostEarlyJoinMinutes; + } + + public void setHostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { + this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; + } + + + public CreateCalendarEventRequest imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public CreateCalendarEventRequest isDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + return this; + } + + /** + * Get isDraft + * @return isDraft + */ + @javax.annotation.Nullable + public Boolean getIsDraft() { + return isDraft; + } + + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + } + + + public CreateCalendarEventRequest languages(@javax.annotation.Nullable List languages) { + this.languages = languages; + return this; + } + + public CreateCalendarEventRequest 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 CreateCalendarEventRequest occurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { + this.occurrenceKind = occurrenceKind; + return this; + } + + /** + * Get occurrenceKind + * @return occurrenceKind + */ + @javax.annotation.Nullable + public CalendarEventOccurrenceKind getOccurrenceKind() { + return occurrenceKind; + } + + public void setOccurrenceKind(@javax.annotation.Nullable CalendarEventOccurrenceKind occurrenceKind) { + this.occurrenceKind = occurrenceKind; + } + + + public CreateCalendarEventRequest parentId(@javax.annotation.Nullable String parentId) { + this.parentId = parentId; + return this; + } + + /** + * Get parentId + * @return parentId + */ + @javax.annotation.Nullable + public String getParentId() { + return parentId; + } + + public void setParentId(@javax.annotation.Nullable String parentId) { + this.parentId = parentId; + } + + + public CreateCalendarEventRequest platforms(@javax.annotation.Nullable List platforms) { + this.platforms = platforms; + return this; + } + + public CreateCalendarEventRequest addPlatformsItem(CalendarEventPlatform platformsItem) { + if (this.platforms == null) { + this.platforms = new ArrayList<>(); + } + this.platforms.add(platformsItem); + return this; + } + + /** + * Get platforms + * @return platforms + */ + @javax.annotation.Nullable + public List getPlatforms() { + return platforms; + } + + public void setPlatforms(@javax.annotation.Nullable List platforms) { + this.platforms = platforms; + } + + + public CreateCalendarEventRequest recurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { + this.recurrence = recurrence; + return this; + } + + /** + * Get recurrence + * @return recurrence + */ + @javax.annotation.Nullable + public CalendarEventRecurrence getRecurrence() { + return recurrence; + } + + public void setRecurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { + this.recurrence = recurrence; + } + + + public CreateCalendarEventRequest roleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + return this; + } + + public CreateCalendarEventRequest addRoleIdsItem(String roleIdsItem) { + if (this.roleIds == null) { + this.roleIds = new ArrayList<>(); + } + this.roleIds.add(roleIdsItem); + return this; + } + + /** + * Get roleIds + * @return roleIds + */ + @javax.annotation.Nullable + public List getRoleIds() { + return roleIds; + } + + public void setRoleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + } + + + public CreateCalendarEventRequest sendCreationNotification(@javax.annotation.Nonnull Boolean sendCreationNotification) { + this.sendCreationNotification = sendCreationNotification; + return this; + } + + /** + * Send notification to group members. + * @return sendCreationNotification + */ + @javax.annotation.Nonnull + public Boolean getSendCreationNotification() { + return sendCreationNotification; + } + + public void setSendCreationNotification(@javax.annotation.Nonnull Boolean sendCreationNotification) { + this.sendCreationNotification = sendCreationNotification; + } + + + public CreateCalendarEventRequest startsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + * Time the event starts at + * @return startsAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getStartsAt() { + return startsAt; + } + + public void setStartsAt(@javax.annotation.Nonnull OffsetDateTime startsAt) { + this.startsAt = startsAt; + } + + + public CreateCalendarEventRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public CreateCalendarEventRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public CreateCalendarEventRequest title(@javax.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Event title + * @return title + */ + @javax.annotation.Nonnull + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nonnull String title) { + this.title = title; + } + + + public CreateCalendarEventRequest usesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { + this.usesInstanceOverflow = usesInstanceOverflow; + return this; + } + + /** + * Get usesInstanceOverflow + * @return usesInstanceOverflow + */ + @javax.annotation.Nullable + public Boolean getUsesInstanceOverflow() { + return usesInstanceOverflow; + } + + public void setUsesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { + this.usesInstanceOverflow = usesInstanceOverflow; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCalendarEventRequest createCalendarEventRequest = (CreateCalendarEventRequest) o; + return Objects.equals(this.accessType, createCalendarEventRequest.accessType) && + Objects.equals(this.category, createCalendarEventRequest.category) && + Objects.equals(this.closeInstanceAfterEndMinutes, createCalendarEventRequest.closeInstanceAfterEndMinutes) && + Objects.equals(this.description, createCalendarEventRequest.description) && + Objects.equals(this.endsAt, createCalendarEventRequest.endsAt) && + Objects.equals(this.featured, createCalendarEventRequest.featured) && + Objects.equals(this.guestEarlyJoinMinutes, createCalendarEventRequest.guestEarlyJoinMinutes) && + Objects.equals(this.hostEarlyJoinMinutes, createCalendarEventRequest.hostEarlyJoinMinutes) && + Objects.equals(this.imageId, createCalendarEventRequest.imageId) && + Objects.equals(this.isDraft, createCalendarEventRequest.isDraft) && + Objects.equals(this.languages, createCalendarEventRequest.languages) && + Objects.equals(this.occurrenceKind, createCalendarEventRequest.occurrenceKind) && + Objects.equals(this.parentId, createCalendarEventRequest.parentId) && + Objects.equals(this.platforms, createCalendarEventRequest.platforms) && + Objects.equals(this.recurrence, createCalendarEventRequest.recurrence) && + Objects.equals(this.roleIds, createCalendarEventRequest.roleIds) && + Objects.equals(this.sendCreationNotification, createCalendarEventRequest.sendCreationNotification) && + Objects.equals(this.startsAt, createCalendarEventRequest.startsAt) && + Objects.equals(this.tags, createCalendarEventRequest.tags) && + Objects.equals(this.title, createCalendarEventRequest.title) && + Objects.equals(this.usesInstanceOverflow, createCalendarEventRequest.usesInstanceOverflow); + } + + 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(accessType, category, closeInstanceAfterEndMinutes, description, endsAt, featured, guestEarlyJoinMinutes, hostEarlyJoinMinutes, imageId, isDraft, languages, occurrenceKind, parentId, platforms, recurrence, roleIds, sendCreationNotification, startsAt, tags, title, usesInstanceOverflow); + } + + 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 CreateCalendarEventRequest {\n"); + sb.append(" accessType: ").append(toIndentedString(accessType)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" closeInstanceAfterEndMinutes: ").append(toIndentedString(closeInstanceAfterEndMinutes)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" endsAt: ").append(toIndentedString(endsAt)).append("\n"); + sb.append(" featured: ").append(toIndentedString(featured)).append("\n"); + sb.append(" guestEarlyJoinMinutes: ").append(toIndentedString(guestEarlyJoinMinutes)).append("\n"); + sb.append(" hostEarlyJoinMinutes: ").append(toIndentedString(hostEarlyJoinMinutes)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" isDraft: ").append(toIndentedString(isDraft)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" occurrenceKind: ").append(toIndentedString(occurrenceKind)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" platforms: ").append(toIndentedString(platforms)).append("\n"); + sb.append(" recurrence: ").append(toIndentedString(recurrence)).append("\n"); + sb.append(" roleIds: ").append(toIndentedString(roleIds)).append("\n"); + sb.append(" sendCreationNotification: ").append(toIndentedString(sendCreationNotification)).append("\n"); + sb.append(" startsAt: ").append(toIndentedString(startsAt)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" usesInstanceOverflow: ").append(toIndentedString(usesInstanceOverflow)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateCalendarEventRequest.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 `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 (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(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(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").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(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").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.validateJsonElement(jsonObj.get("recurrence")); + } + // ensure the optional json data is an array if present + 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").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(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 (!CreateCalendarEventRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCalendarEventRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCalendarEventRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCalendarEventRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateCalendarEventRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 79456b15..f24ffc8d 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateFileRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateFileRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,141 +13,153 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; + 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_EXTENSION = "extension"; - @SerializedName(SERIALIZED_NAME_EXTENSION) - private String extension; + 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 name(String name) { - - this.name = name; + public CreateFileRequest extension(@javax.annotation.Nonnull String extension) { + this.extension = extension; return this; } - /** - * Get name - * @return name - **/ + /** + * Get extension + * @return extension + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getName() { - return name; + public String getExtension() { + return extension; } - - public void setName(String name) { - this.name = name; + 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 extension(String extension) { - - this.extension = extension; + public CreateFileRequest name(@javax.annotation.Nonnull String name) { + this.name = name; return this; } - /** - * Get extension - * @return extension - **/ + /** + * Get name + * @return name + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getExtension() { - return extension; + public String getName() { + return name; } - - public void setExtension(String extension) { - this.extension = extension; + 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; } public CreateFileRequest addTagsItem(String tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -157,24 +169,24 @@ public boolean equals(Object o) { return false; } CreateFileRequest createFileRequest = (CreateFileRequest) o; - return Objects.equals(this.name, createFileRequest.name) && + return Objects.equals(this.extension, createFileRequest.extension) && Objects.equals(this.mimeType, createFileRequest.mimeType) && - Objects.equals(this.extension, createFileRequest.extension) && + Objects.equals(this.name, createFileRequest.name) && Objects.equals(this.tags, createFileRequest.tags); } @Override public int hashCode() { - return Objects.hash(name, mimeType, extension, tags); + return Objects.hash(extension, mimeType, name, tags); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateFileRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" mimeType: ").append(toIndentedString(mimeType)).append("\n"); sb.append(" extension: ").append(toIndentedString(extension)).append("\n"); + sb.append(" mimeType: ").append(toIndentedString(mimeType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append("}"); return sb.toString(); @@ -185,11 +197,110 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("extension", "mimeType", "name", "tags")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("extension", "mimeType", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateFileRequest.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 `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 (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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateFileRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateFileRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateFileRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateFileRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateFileRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 d61b335b..4658c9f4 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateFileVersionRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateFileVersionRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,131 +13,142 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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_SIGNATURE_MD5 = "signatureMd5"; - @SerializedName(SERIALIZED_NAME_SIGNATURE_MD5) - private String signatureMd5; - - public static final String SERIALIZED_NAME_SIGNATURE_SIZE_IN_BYTES = "signatureSizeInBytes"; - @SerializedName(SERIALIZED_NAME_SIGNATURE_SIZE_IN_BYTES) - private BigDecimal signatureSizeInBytes; - 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) - private BigDecimal fileSizeInBytes; - - - public CreateFileVersionRequest signatureMd5(String signatureMd5) { - - this.signatureMd5 = signatureMd5; - return this; - } + @javax.annotation.Nullable + private Integer fileSizeInBytes; - /** - * Get signatureMd5 - * @return signatureMd5 - **/ + public static final String SERIALIZED_NAME_SIGNATURE_MD5 = "signatureMd5"; + @SerializedName(SERIALIZED_NAME_SIGNATURE_MD5) @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getSignatureMd5() { - return signatureMd5; - } - - - public void setSignatureMd5(String signatureMd5) { - this.signatureMd5 = signatureMd5; - } - - - public CreateFileVersionRequest signatureSizeInBytes(BigDecimal signatureSizeInBytes) { - - this.signatureSizeInBytes = signatureSizeInBytes; - return this; - } + private String signatureMd5; - /** - * Get signatureSizeInBytes - * @return signatureSizeInBytes - **/ + public static final String SERIALIZED_NAME_SIGNATURE_SIZE_IN_BYTES = "signatureSizeInBytes"; + @SerializedName(SERIALIZED_NAME_SIGNATURE_SIZE_IN_BYTES) @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + private Integer signatureSizeInBytes; - public BigDecimal getSignatureSizeInBytes() { - return signatureSizeInBytes; + public CreateFileVersionRequest() { } - - public void setSignatureSizeInBytes(BigDecimal signatureSizeInBytes) { - this.signatureSizeInBytes = signatureSizeInBytes; - } - - - 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(BigDecimal fileSizeInBytes) { - + public CreateFileVersionRequest fileSizeInBytes(@javax.annotation.Nullable Integer fileSizeInBytes) { this.fileSizeInBytes = fileSizeInBytes; return this; } - /** + /** * Get fileSizeInBytes * @return fileSizeInBytes - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public BigDecimal getFileSizeInBytes() { + public Integer getFileSizeInBytes() { return fileSizeInBytes; } - - public void setFileSizeInBytes(BigDecimal fileSizeInBytes) { + public void setFileSizeInBytes(@javax.annotation.Nullable Integer fileSizeInBytes) { this.fileSizeInBytes = fileSizeInBytes; } + public CreateFileVersionRequest signatureMd5(@javax.annotation.Nonnull String signatureMd5) { + this.signatureMd5 = signatureMd5; + return this; + } + + /** + * Get signatureMd5 + * @return signatureMd5 + */ + @javax.annotation.Nonnull + public String getSignatureMd5() { + return signatureMd5; + } + + public void setSignatureMd5(@javax.annotation.Nonnull String signatureMd5) { + this.signatureMd5 = signatureMd5; + } + + + public CreateFileVersionRequest signatureSizeInBytes(@javax.annotation.Nonnull Integer signatureSizeInBytes) { + this.signatureSizeInBytes = signatureSizeInBytes; + return this; + } + + /** + * Get signatureSizeInBytes + * @return signatureSizeInBytes + */ + @javax.annotation.Nonnull + public Integer getSignatureSizeInBytes() { + return signatureSizeInBytes; + } + + public void setSignatureSizeInBytes(@javax.annotation.Nonnull Integer signatureSizeInBytes) { + this.signatureSizeInBytes = signatureSizeInBytes; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -147,25 +158,25 @@ public boolean equals(Object o) { return false; } CreateFileVersionRequest createFileVersionRequest = (CreateFileVersionRequest) o; - return Objects.equals(this.signatureMd5, createFileVersionRequest.signatureMd5) && - Objects.equals(this.signatureSizeInBytes, createFileVersionRequest.signatureSizeInBytes) && - Objects.equals(this.fileMd5, createFileVersionRequest.fileMd5) && - Objects.equals(this.fileSizeInBytes, createFileVersionRequest.fileSizeInBytes); + return Objects.equals(this.fileMd5, createFileVersionRequest.fileMd5) && + Objects.equals(this.fileSizeInBytes, createFileVersionRequest.fileSizeInBytes) && + Objects.equals(this.signatureMd5, createFileVersionRequest.signatureMd5) && + Objects.equals(this.signatureSizeInBytes, createFileVersionRequest.signatureSizeInBytes); } @Override public int hashCode() { - return Objects.hash(signatureMd5, signatureSizeInBytes, fileMd5, fileSizeInBytes); + return Objects.hash(fileMd5, fileSizeInBytes, signatureMd5, signatureSizeInBytes); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateFileVersionRequest {\n"); - sb.append(" signatureMd5: ").append(toIndentedString(signatureMd5)).append("\n"); - sb.append(" signatureSizeInBytes: ").append(toIndentedString(signatureSizeInBytes)).append("\n"); sb.append(" fileMd5: ").append(toIndentedString(fileMd5)).append("\n"); sb.append(" fileSizeInBytes: ").append(toIndentedString(fileSizeInBytes)).append("\n"); + sb.append(" signatureMd5: ").append(toIndentedString(signatureMd5)).append("\n"); + sb.append(" signatureSizeInBytes: ").append(toIndentedString(signatureSizeInBytes)).append("\n"); sb.append("}"); return sb.toString(); } @@ -175,11 +186,104 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("fileMd5", "fileSizeInBytes", "signatureMd5", "signatureSizeInBytes")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("signatureMd5", "signatureSizeInBytes")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateFileVersionRequest.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `signatureMd5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signatureMd5").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateFileVersionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateFileVersionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateFileVersionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateFileVersionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateFileVersionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..b25600ba --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupAnnouncementRequest.java @@ -0,0 +1,292 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * CreateGroupAnnouncementRequest + */ +@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(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public CreateGroupAnnouncementRequest sendNotification(@javax.annotation.Nullable Boolean sendNotification) { + this.sendNotification = sendNotification; + return this; + } + + /** + * Send notification to group members. + * @return sendNotification + */ + @javax.annotation.Nullable + public Boolean getSendNotification() { + return sendNotification; + } + + public void setSendNotification(@javax.annotation.Nullable Boolean sendNotification) { + this.sendNotification = sendNotification; + } + + + public CreateGroupAnnouncementRequest text(@javax.annotation.Nullable String text) { + this.text = text; + return this; + } + + /** + * Announcement text + * @return text + */ + @javax.annotation.Nullable + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nullable String text) { + this.text = text; + } + + + public CreateGroupAnnouncementRequest title(@javax.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Announcement 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; + } + CreateGroupAnnouncementRequest createGroupAnnouncementRequest = (CreateGroupAnnouncementRequest) o; + return Objects.equals(this.imageId, createGroupAnnouncementRequest.imageId) && + Objects.equals(this.sendNotification, createGroupAnnouncementRequest.sendNotification) && + Objects.equals(this.text, createGroupAnnouncementRequest.text) && + Objects.equals(this.title, createGroupAnnouncementRequest.title); + } + + @Override + public int hashCode() { + return Objects.hash(imageId, sendNotification, text, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateGroupAnnouncementRequest {\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" sendNotification: ").append(toIndentedString(sendNotification)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).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("imageId", "sendNotification", "text", "title")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateGroupAnnouncementRequest.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 `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 (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(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(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(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 (!CreateGroupAnnouncementRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateGroupAnnouncementRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateGroupAnnouncementRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateGroupAnnouncementRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateGroupAnnouncementRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..9f307eae --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupGalleryRequest.java @@ -0,0 +1,429 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * CreateGroupGalleryRequest + */ +@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) + @javax.annotation.Nullable + private List roleIdsToAutoApprove; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_MANAGE = "roleIdsToManage"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_MANAGE) + @javax.annotation.Nullable + private List roleIdsToManage; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT = "roleIdsToSubmit"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT) + @javax.annotation.Nullable + private List roleIdsToSubmit; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_VIEW = "roleIdsToView"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_VIEW) + @javax.annotation.Nullable + private List roleIdsToView; + + public CreateGroupGalleryRequest() { + } + + public CreateGroupGalleryRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the gallery. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateGroupGalleryRequest membersOnly(@javax.annotation.Nullable Boolean membersOnly) { + this.membersOnly = membersOnly; + return this; + } + + /** + * Whether the gallery is members only. + * @return membersOnly + */ + @javax.annotation.Nullable + public Boolean getMembersOnly() { + return membersOnly; + } + + public void setMembersOnly(@javax.annotation.Nullable Boolean membersOnly) { + this.membersOnly = membersOnly; + } + + + public CreateGroupGalleryRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the gallery. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateGroupGalleryRequest roleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { + this.roleIdsToAutoApprove = roleIdsToAutoApprove; + return this; + } + + public CreateGroupGalleryRequest addRoleIdsToAutoApproveItem(String roleIdsToAutoApproveItem) { + if (this.roleIdsToAutoApprove == null) { + this.roleIdsToAutoApprove = new ArrayList<>(); + } + this.roleIdsToAutoApprove.add(roleIdsToAutoApproveItem); + return this; + } + + /** + * + * @return roleIdsToAutoApprove + */ + @javax.annotation.Nullable + public List getRoleIdsToAutoApprove() { + return roleIdsToAutoApprove; + } + + public void setRoleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { + this.roleIdsToAutoApprove = roleIdsToAutoApprove; + } + + + public CreateGroupGalleryRequest roleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { + this.roleIdsToManage = roleIdsToManage; + return this; + } + + public CreateGroupGalleryRequest addRoleIdsToManageItem(String roleIdsToManageItem) { + if (this.roleIdsToManage == null) { + this.roleIdsToManage = new ArrayList<>(); + } + this.roleIdsToManage.add(roleIdsToManageItem); + return this; + } + + /** + * + * @return roleIdsToManage + */ + @javax.annotation.Nullable + public List getRoleIdsToManage() { + return roleIdsToManage; + } + + public void setRoleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { + this.roleIdsToManage = roleIdsToManage; + } + + + public CreateGroupGalleryRequest roleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { + this.roleIdsToSubmit = roleIdsToSubmit; + return this; + } + + public CreateGroupGalleryRequest addRoleIdsToSubmitItem(String roleIdsToSubmitItem) { + if (this.roleIdsToSubmit == null) { + this.roleIdsToSubmit = new ArrayList<>(); + } + this.roleIdsToSubmit.add(roleIdsToSubmitItem); + return this; + } + + /** + * + * @return roleIdsToSubmit + */ + @javax.annotation.Nullable + public List getRoleIdsToSubmit() { + return roleIdsToSubmit; + } + + public void setRoleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { + this.roleIdsToSubmit = roleIdsToSubmit; + } + + + public CreateGroupGalleryRequest roleIdsToView(@javax.annotation.Nullable List roleIdsToView) { + this.roleIdsToView = roleIdsToView; + return this; + } + + public CreateGroupGalleryRequest addRoleIdsToViewItem(String roleIdsToViewItem) { + if (this.roleIdsToView == null) { + this.roleIdsToView = new ArrayList<>(); + } + this.roleIdsToView.add(roleIdsToViewItem); + return this; + } + + /** + * + * @return roleIdsToView + */ + @javax.annotation.Nullable + public List getRoleIdsToView() { + return roleIdsToView; + } + + public void setRoleIdsToView(@javax.annotation.Nullable List roleIdsToView) { + this.roleIdsToView = roleIdsToView; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateGroupGalleryRequest createGroupGalleryRequest = (CreateGroupGalleryRequest) o; + return Objects.equals(this.description, createGroupGalleryRequest.description) && + Objects.equals(this.membersOnly, createGroupGalleryRequest.membersOnly) && + Objects.equals(this.name, createGroupGalleryRequest.name) && + Objects.equals(this.roleIdsToAutoApprove, createGroupGalleryRequest.roleIdsToAutoApprove) && + Objects.equals(this.roleIdsToManage, createGroupGalleryRequest.roleIdsToManage) && + Objects.equals(this.roleIdsToSubmit, createGroupGalleryRequest.roleIdsToSubmit) && + Objects.equals(this.roleIdsToView, createGroupGalleryRequest.roleIdsToView); + } + + 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(description, membersOnly, name, roleIdsToAutoApprove, roleIdsToManage, roleIdsToSubmit, roleIdsToView); + } + + 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 CreateGroupGalleryRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" membersOnly: ").append(toIndentedString(membersOnly)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" roleIdsToAutoApprove: ").append(toIndentedString(roleIdsToAutoApprove)).append("\n"); + sb.append(" roleIdsToManage: ").append(toIndentedString(roleIdsToManage)).append("\n"); + sb.append(" roleIdsToSubmit: ").append(toIndentedString(roleIdsToSubmit)).append("\n"); + sb.append(" roleIdsToView: ").append(toIndentedString(roleIdsToView)).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("description", "membersOnly", "name", "roleIdsToAutoApprove", "roleIdsToManage", "roleIdsToSubmit", "roleIdsToView")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateGroupGalleryRequest.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 `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 (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(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(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").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").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").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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateGroupGalleryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateGroupGalleryRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateGroupGalleryRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateGroupGalleryRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateGroupGalleryRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..cb982786 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupInviteRequest.java @@ -0,0 +1,234 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * CreateGroupInviteRequest + */ +@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(@javax.annotation.Nullable Boolean confirmOverrideBlock) { + this.confirmOverrideBlock = confirmOverrideBlock; + return this; + } + + /** + * Get confirmOverrideBlock + * @return confirmOverrideBlock + */ + @javax.annotation.Nullable + public Boolean getConfirmOverrideBlock() { + return confirmOverrideBlock; + } + + public void setConfirmOverrideBlock(@javax.annotation.Nullable Boolean confirmOverrideBlock) { + this.confirmOverrideBlock = confirmOverrideBlock; + } + + + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateGroupInviteRequest createGroupInviteRequest = (CreateGroupInviteRequest) o; + return Objects.equals(this.confirmOverrideBlock, createGroupInviteRequest.confirmOverrideBlock) && + Objects.equals(this.userId, createGroupInviteRequest.userId); + } + + @Override + public int hashCode() { + return Objects.hash(confirmOverrideBlock, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateGroupInviteRequest {\n"); + sb.append(" confirmOverrideBlock: ").append(toIndentedString(confirmOverrideBlock)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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("confirmOverrideBlock", "userId")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateGroupInviteRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateGroupInviteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateGroupInviteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateGroupInviteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateGroupInviteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateGroupInviteRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..acc8c1c7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupPostRequest.java @@ -0,0 +1,361 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPostVisibility; +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; + +/** + * CreateGroupPostRequest + */ +@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) + @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(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public CreateGroupPostRequest roleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + return this; + } + + public CreateGroupPostRequest addRoleIdsItem(String roleIdsItem) { + if (this.roleIds == null) { + this.roleIds = new ArrayList<>(); + } + this.roleIds.add(roleIdsItem); + return this; + } + + /** + * + * @return roleIds + */ + @javax.annotation.Nullable + public List getRoleIds() { + return roleIds; + } + + public void setRoleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + } + + + public CreateGroupPostRequest sendNotification(@javax.annotation.Nonnull Boolean sendNotification) { + this.sendNotification = sendNotification; + return this; + } + + /** + * Send notification to group members. + * @return sendNotification + */ + @javax.annotation.Nonnull + public Boolean getSendNotification() { + return sendNotification; + } + + public void setSendNotification(@javax.annotation.Nonnull Boolean sendNotification) { + this.sendNotification = sendNotification; + } + + + public CreateGroupPostRequest text(@javax.annotation.Nonnull String text) { + this.text = text; + return this; + } + + /** + * Post text + * @return text + */ + @javax.annotation.Nonnull + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nonnull String text) { + this.text = text; + } + + + public CreateGroupPostRequest title(@javax.annotation.Nonnull String title) { + this.title = title; + return this; + } + + /** + * Post title + * @return title + */ + @javax.annotation.Nonnull + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nonnull String title) { + this.title = title; + } + + + public CreateGroupPostRequest visibility(@javax.annotation.Nonnull GroupPostVisibility visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get visibility + * @return visibility + */ + @javax.annotation.Nonnull + public GroupPostVisibility getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nonnull GroupPostVisibility visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateGroupPostRequest createGroupPostRequest = (CreateGroupPostRequest) o; + return Objects.equals(this.imageId, createGroupPostRequest.imageId) && + Objects.equals(this.roleIds, createGroupPostRequest.roleIds) && + Objects.equals(this.sendNotification, createGroupPostRequest.sendNotification) && + Objects.equals(this.text, createGroupPostRequest.text) && + Objects.equals(this.title, createGroupPostRequest.title) && + Objects.equals(this.visibility, createGroupPostRequest.visibility); + } + + @Override + public int hashCode() { + return Objects.hash(imageId, roleIds, sendNotification, text, title, visibility); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateGroupPostRequest {\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" roleIds: ").append(toIndentedString(roleIds)).append("\n"); + sb.append(" sendNotification: ").append(toIndentedString(sendNotification)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).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("imageId", "roleIds", "sendNotification", "text", "title", "visibility")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("sendNotification", "text", "title", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateGroupPostRequest.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 `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 (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(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").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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateGroupPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateGroupPostRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateGroupPostRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateGroupPostRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateGroupPostRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..2d73bec7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupRequest.java @@ -0,0 +1,427 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupJoinState; +import io.github.vrchatapi.model.GroupPrivacy; +import io.github.vrchatapi.model.GroupRoleTemplate; +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; + +/** + * CreateGroupRequest + */ +@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(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + return this; + } + + /** + * Get bannerId + * @return bannerId + */ + @javax.annotation.Nullable + public String getBannerId() { + return bannerId; + } + + public void setBannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + } + + + public CreateGroupRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateGroupRequest iconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + return this; + } + + /** + * Get iconId + * @return iconId + */ + @javax.annotation.Nullable + public String getIconId() { + return iconId; + } + + public void setIconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + } + + + public CreateGroupRequest joinState(@javax.annotation.Nullable GroupJoinState joinState) { + this.joinState = joinState; + return this; + } + + /** + * Get joinState + * @return joinState + */ + @javax.annotation.Nullable + public GroupJoinState getJoinState() { + return joinState; + } + + public void setJoinState(@javax.annotation.Nullable GroupJoinState joinState) { + this.joinState = joinState; + } + + + public CreateGroupRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public CreateGroupRequest privacy(@javax.annotation.Nullable GroupPrivacy privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public GroupPrivacy getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable GroupPrivacy privacy) { + this.privacy = privacy; + } + + + public CreateGroupRequest roleTemplate(@javax.annotation.Nonnull GroupRoleTemplate roleTemplate) { + this.roleTemplate = roleTemplate; + return this; + } + + /** + * Get roleTemplate + * @return roleTemplate + */ + @javax.annotation.Nonnull + public GroupRoleTemplate getRoleTemplate() { + return roleTemplate; + } + + public void setRoleTemplate(@javax.annotation.Nonnull GroupRoleTemplate roleTemplate) { + this.roleTemplate = roleTemplate; + } + + + public CreateGroupRequest shortCode(@javax.annotation.Nonnull String shortCode) { + this.shortCode = shortCode; + return this; + } + + /** + * Get shortCode + * @return shortCode + */ + @javax.annotation.Nonnull + public String getShortCode() { + return shortCode; + } + + public void setShortCode(@javax.annotation.Nonnull String shortCode) { + this.shortCode = shortCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateGroupRequest createGroupRequest = (CreateGroupRequest) o; + return Objects.equals(this.bannerId, createGroupRequest.bannerId) && + Objects.equals(this.description, createGroupRequest.description) && + Objects.equals(this.iconId, createGroupRequest.iconId) && + Objects.equals(this.joinState, createGroupRequest.joinState) && + Objects.equals(this.name, createGroupRequest.name) && + Objects.equals(this.privacy, createGroupRequest.privacy) && + Objects.equals(this.roleTemplate, createGroupRequest.roleTemplate) && + Objects.equals(this.shortCode, createGroupRequest.shortCode); + } + + 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(bannerId, description, iconId, joinState, name, privacy, roleTemplate, shortCode); + } + + 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 CreateGroupRequest {\n"); + sb.append(" bannerId: ").append(toIndentedString(bannerId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" iconId: ").append(toIndentedString(iconId)).append("\n"); + sb.append(" joinState: ").append(toIndentedString(joinState)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" roleTemplate: ").append(toIndentedString(roleTemplate)).append("\n"); + sb.append(" shortCode: ").append(toIndentedString(shortCode)).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("bannerId", "description", "iconId", "joinState", "name", "privacy", "roleTemplate", "shortCode")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateGroupRequest.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateGroupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateGroupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateGroupRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..17a4646a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateGroupRoleRequest.java @@ -0,0 +1,326 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPermissions; +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; + +/** + * CreateGroupRoleRequest + */ +@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) + @javax.annotation.Nullable + private List permissions = new ArrayList<>(); + + public CreateGroupRoleRequest() { + } + + public CreateGroupRoleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public CreateGroupRoleRequest 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 CreateGroupRoleRequest isSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { + this.isSelfAssignable = isSelfAssignable; + return this; + } + + /** + * Get isSelfAssignable + * @return isSelfAssignable + */ + @javax.annotation.Nullable + public Boolean getIsSelfAssignable() { + return isSelfAssignable; + } + + public void setIsSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { + this.isSelfAssignable = isSelfAssignable; + } + + + public CreateGroupRoleRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public CreateGroupRoleRequest permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public CreateGroupRoleRequest addPermissionsItem(GroupPermissions permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Get permissions + * @return permissions + */ + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateGroupRoleRequest createGroupRoleRequest = (CreateGroupRoleRequest) o; + return Objects.equals(this.description, createGroupRoleRequest.description) && + Objects.equals(this.id, createGroupRoleRequest.id) && + Objects.equals(this.isSelfAssignable, createGroupRoleRequest.isSelfAssignable) && + Objects.equals(this.name, createGroupRoleRequest.name) && + Objects.equals(this.permissions, createGroupRoleRequest.permissions); + } + + @Override + public int hashCode() { + return Objects.hash(description, id, isSelfAssignable, name, permissions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateGroupRoleRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isSelfAssignable: ").append(toIndentedString(isSelfAssignable)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).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("description", "id", "isSelfAssignable", "name", "permissions")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateGroupRoleRequest.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 `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(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(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())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateGroupRoleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateGroupRoleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateGroupRoleRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateGroupRoleRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateGroupRoleRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..46b3c5b6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateInstanceRequest.java @@ -0,0 +1,676 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupAccessType; +import io.github.vrchatapi.model.InstanceContentSettings; +import io.github.vrchatapi.model.InstanceRegion; +import io.github.vrchatapi.model.InstanceType; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * CreateInstanceRequest + */ +@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) + @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(@javax.annotation.Nullable Boolean ageGate) { + this.ageGate = ageGate; + return this; + } + + /** + * Get ageGate + * @return ageGate + */ + @javax.annotation.Nullable + public Boolean getAgeGate() { + return ageGate; + } + + public void setAgeGate(@javax.annotation.Nullable Boolean ageGate) { + this.ageGate = ageGate; + } + + + public CreateInstanceRequest calendarEntryId(@javax.annotation.Nullable String calendarEntryId) { + this.calendarEntryId = calendarEntryId; + return this; + } + + /** + * Get calendarEntryId + * @return calendarEntryId + */ + @javax.annotation.Nullable + public String getCalendarEntryId() { + return calendarEntryId; + } + + public void setCalendarEntryId(@javax.annotation.Nullable String calendarEntryId) { + this.calendarEntryId = calendarEntryId; + } + + + 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 + public Boolean getCanRequestInvite() { + return canRequestInvite; + } + + public void setCanRequestInvite(@javax.annotation.Nullable Boolean canRequestInvite) { + this.canRequestInvite = canRequestInvite; + } + + + 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 + public OffsetDateTime getClosedAt() { + return closedAt; + } + + public void setClosedAt(@javax.annotation.Nullable OffsetDateTime closedAt) { + this.closedAt = closedAt; + } + + + public CreateInstanceRequest contentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { + this.contentSettings = contentSettings; + return this; + } + + /** + * Get contentSettings + * @return contentSettings + */ + @javax.annotation.Nullable + public InstanceContentSettings getContentSettings() { + return contentSettings; + } + + public void setContentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { + this.contentSettings = contentSettings; + } + + + public CreateInstanceRequest 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 CreateInstanceRequest groupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { + this.groupAccessType = groupAccessType; + return this; + } + + /** + * Get groupAccessType + * @return groupAccessType + */ + @javax.annotation.Nullable + public GroupAccessType getGroupAccessType() { + return groupAccessType; + } + + public void setGroupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { + this.groupAccessType = groupAccessType; + } + + + 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 + public Boolean getHardClose() { + return hardClose; + } + + public void setHardClose(@javax.annotation.Nullable Boolean hardClose) { + this.hardClose = hardClose; + } + + + public CreateInstanceRequest instancePersistenceEnabled(@javax.annotation.Nullable Boolean instancePersistenceEnabled) { + this.instancePersistenceEnabled = instancePersistenceEnabled; + return this; + } + + /** + * Get instancePersistenceEnabled + * @return instancePersistenceEnabled + */ + @javax.annotation.Nullable + public Boolean getInstancePersistenceEnabled() { + return instancePersistenceEnabled; + } + + public void setInstancePersistenceEnabled(@javax.annotation.Nullable Boolean instancePersistenceEnabled) { + this.instancePersistenceEnabled = instancePersistenceEnabled; + } + + + public CreateInstanceRequest inviteOnly(@javax.annotation.Nullable Boolean inviteOnly) { + this.inviteOnly = inviteOnly; + return this; + } + + /** + * Get inviteOnly + * @return inviteOnly + */ + @javax.annotation.Nullable + public Boolean getInviteOnly() { + return inviteOnly; + } + + public void setInviteOnly(@javax.annotation.Nullable Boolean inviteOnly) { + this.inviteOnly = inviteOnly; + } + + + 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 + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public CreateInstanceRequest playerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { + this.playerPersistenceEnabled = playerPersistenceEnabled; + return this; + } + + /** + * Get playerPersistenceEnabled + * @return playerPersistenceEnabled + */ + @javax.annotation.Nullable + public Boolean getPlayerPersistenceEnabled() { + return playerPersistenceEnabled; + } + + public void setPlayerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { + this.playerPersistenceEnabled = playerPersistenceEnabled; + } + + + public CreateInstanceRequest queueEnabled(@javax.annotation.Nullable Boolean queueEnabled) { + this.queueEnabled = queueEnabled; + return this; + } + + /** + * Get queueEnabled + * @return queueEnabled + */ + @javax.annotation.Nullable + public Boolean getQueueEnabled() { + return queueEnabled; + } + + public void setQueueEnabled(@javax.annotation.Nullable Boolean queueEnabled) { + this.queueEnabled = queueEnabled; + } + + + public CreateInstanceRequest region(@javax.annotation.Nonnull InstanceRegion region) { + this.region = region; + return this; + } + + /** + * Get region + * @return region + */ + @javax.annotation.Nonnull + public InstanceRegion getRegion() { + return region; + } + + public void setRegion(@javax.annotation.Nonnull InstanceRegion region) { + this.region = region; + } + + + public CreateInstanceRequest roleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + return this; + } + + public CreateInstanceRequest addRoleIdsItem(String roleIdsItem) { + if (this.roleIds == null) { + this.roleIds = new ArrayList<>(); + } + this.roleIds.add(roleIdsItem); + return this; + } + + /** + * Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" + * @return roleIds + */ + @javax.annotation.Nullable + public List getRoleIds() { + return roleIds; + } + + public void setRoleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + } + + + public CreateInstanceRequest type(@javax.annotation.Nonnull InstanceType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public InstanceType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull InstanceType type) { + this.type = type; + } + + + 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 + public String getWorldId() { + return worldId; + } + + public void setWorldId(@javax.annotation.Nonnull String worldId) { + this.worldId = worldId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateInstanceRequest createInstanceRequest = (CreateInstanceRequest) o; + return Objects.equals(this.ageGate, createInstanceRequest.ageGate) && + Objects.equals(this.calendarEntryId, createInstanceRequest.calendarEntryId) && + Objects.equals(this.canRequestInvite, createInstanceRequest.canRequestInvite) && + Objects.equals(this.closedAt, createInstanceRequest.closedAt) && + Objects.equals(this.contentSettings, createInstanceRequest.contentSettings) && + Objects.equals(this.displayName, createInstanceRequest.displayName) && + Objects.equals(this.groupAccessType, createInstanceRequest.groupAccessType) && + Objects.equals(this.hardClose, createInstanceRequest.hardClose) && + Objects.equals(this.instancePersistenceEnabled, createInstanceRequest.instancePersistenceEnabled) && + Objects.equals(this.inviteOnly, createInstanceRequest.inviteOnly) && + Objects.equals(this.ownerId, createInstanceRequest.ownerId) && + Objects.equals(this.playerPersistenceEnabled, createInstanceRequest.playerPersistenceEnabled) && + Objects.equals(this.queueEnabled, createInstanceRequest.queueEnabled) && + Objects.equals(this.region, createInstanceRequest.region) && + Objects.equals(this.roleIds, createInstanceRequest.roleIds) && + Objects.equals(this.type, createInstanceRequest.type) && + Objects.equals(this.worldId, createInstanceRequest.worldId); + } + + 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(ageGate, calendarEntryId, canRequestInvite, closedAt, contentSettings, displayName, groupAccessType, hardClose, instancePersistenceEnabled, inviteOnly, ownerId, playerPersistenceEnabled, queueEnabled, region, roleIds, type, worldId); + } + + 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 CreateInstanceRequest {\n"); + sb.append(" ageGate: ").append(toIndentedString(ageGate)).append("\n"); + sb.append(" calendarEntryId: ").append(toIndentedString(calendarEntryId)).append("\n"); + sb.append(" canRequestInvite: ").append(toIndentedString(canRequestInvite)).append("\n"); + sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n"); + sb.append(" contentSettings: ").append(toIndentedString(contentSettings)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groupAccessType: ").append(toIndentedString(groupAccessType)).append("\n"); + sb.append(" hardClose: ").append(toIndentedString(hardClose)).append("\n"); + sb.append(" instancePersistenceEnabled: ").append(toIndentedString(instancePersistenceEnabled)).append("\n"); + sb.append(" inviteOnly: ").append(toIndentedString(inviteOnly)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" playerPersistenceEnabled: ").append(toIndentedString(playerPersistenceEnabled)).append("\n"); + sb.append(" queueEnabled: ").append(toIndentedString(queueEnabled)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" roleIds: ").append(toIndentedString(roleIds)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateInstanceRequest.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 `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 (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(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.validateJsonElement(jsonObj.get("contentSettings")); + } + 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())); + } + // 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(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").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(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 (!CreateInstanceRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateInstanceRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateInstanceRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateInstanceRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateInstanceRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..56a746a6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateJamSubmissionRequest.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * 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", 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(@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 + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + 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 + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateJamSubmissionRequest createJamSubmissionRequest = (CreateJamSubmissionRequest) o; + return Objects.equals(this.contentId, createJamSubmissionRequest.contentId) && + Objects.equals(this.description, createJamSubmissionRequest.description); + } + + @Override + public int hashCode() { + return Objects.hash(contentId, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateJamSubmissionRequest {\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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("contentId", "description")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateJamSubmissionRequest.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateJamSubmissionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateJamSubmissionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateJamSubmissionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateJamSubmissionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateJamSubmissionRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..03d192bb --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateListingRequest.java @@ -0,0 +1,429 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductListingType; +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; + +/** + * Observed create-listing payload fields. Additional fields may exist. + */ +@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(@javax.annotation.Nullable Boolean active) { + this.active = active; + return this; + } + + /** + * Get active + * @return active + */ + @javax.annotation.Nullable + public Boolean getActive() { + return active; + } + + public void setActive(@javax.annotation.Nullable Boolean active) { + this.active = active; + } + + + public CreateListingRequest description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public CreateListingRequest displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public CreateListingRequest imageId(@javax.annotation.Nonnull String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nonnull + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nonnull String imageId) { + this.imageId = imageId; + } + + + public CreateListingRequest listingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + return this; + } + + /** + * Get listingType + * @return listingType + */ + @javax.annotation.Nonnull + public ProductListingType getListingType() { + return listingType; + } + + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + } + + + public CreateListingRequest priceTokens(@javax.annotation.Nonnull Integer priceTokens) { + this.priceTokens = priceTokens; + return this; + } + + /** + * Get priceTokens + * @return priceTokens + */ + @javax.annotation.Nonnull + public Integer getPriceTokens() { + return priceTokens; + } + + public void setPriceTokens(@javax.annotation.Nonnull Integer priceTokens) { + this.priceTokens = priceTokens; + } + + + 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 + public List getProductIds() { + return productIds; + } + + public void setProductIds(@javax.annotation.Nonnull List productIds) { + this.productIds = productIds; + } + + + 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 + public List getStoreIds() { + return storeIds; + } + + public void setStoreIds(@javax.annotation.Nonnull List storeIds) { + this.storeIds = storeIds; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateListingRequest createListingRequest = (CreateListingRequest) o; + return Objects.equals(this.active, createListingRequest.active) && + Objects.equals(this.description, createListingRequest.description) && + Objects.equals(this.displayName, createListingRequest.displayName) && + Objects.equals(this.imageId, createListingRequest.imageId) && + Objects.equals(this.listingType, createListingRequest.listingType) && + Objects.equals(this.priceTokens, createListingRequest.priceTokens) && + Objects.equals(this.productIds, createListingRequest.productIds) && + Objects.equals(this.storeIds, createListingRequest.storeIds); + } + + @Override + public int hashCode() { + return Objects.hash(active, description, displayName, imageId, listingType, priceTokens, productIds, storeIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateListingRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" listingType: ").append(toIndentedString(listingType)).append("\n"); + sb.append(" priceTokens: ").append(toIndentedString(priceTokens)).append("\n"); + sb.append(" productIds: ").append(toIndentedString(productIds)).append("\n"); + sb.append(" storeIds: ").append(toIndentedString(storeIds)).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("active", "description", "displayName", "imageId", "listingType", "priceTokens", "productIds", "storeIds")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateListingRequest.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `storeIds` to be an array in the JSON string but got `%s`", jsonObj.get("storeIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateListingRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateListingRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateListingRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateListingRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateListingRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..f466793e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreateProductRequest.java @@ -0,0 +1,363 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductType; +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; + +/** + * CreateProductRequest + */ +@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(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public CreateProductRequest displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public CreateProductRequest imageId(@javax.annotation.Nonnull String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nonnull + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nonnull String imageId) { + this.imageId = imageId; + } + + + public CreateProductRequest productType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get productType + * @return productType + */ + @javax.annotation.Nonnull + public ProductType getProductType() { + return productType; + } + + public void setProductType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public CreateProductRequest useForSubscriberList(@javax.annotation.Nonnull Boolean useForSubscriberList) { + this.useForSubscriberList = useForSubscriberList; + return this; + } + + /** + * Get useForSubscriberList + * @return useForSubscriberList + */ + @javax.annotation.Nonnull + public Boolean getUseForSubscriberList() { + return useForSubscriberList; + } + + public void setUseForSubscriberList(@javax.annotation.Nonnull Boolean useForSubscriberList) { + this.useForSubscriberList = useForSubscriberList; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateProductRequest createProductRequest = (CreateProductRequest) o; + return Objects.equals(this.description, createProductRequest.description) && + Objects.equals(this.displayName, createProductRequest.displayName) && + Objects.equals(this.imageId, createProductRequest.imageId) && + Objects.equals(this.productType, createProductRequest.productType) && + Objects.equals(this.tags, createProductRequest.tags) && + Objects.equals(this.useForSubscriberList, createProductRequest.useForSubscriberList); + } + + @Override + public int hashCode() { + return Objects.hash(description, displayName, imageId, productType, tags, useForSubscriberList); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateProductRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" productType: ").append(toIndentedString(productType)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" useForSubscriberList: ").append(toIndentedString(useForSubscriberList)).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("description", "displayName", "imageId", "productType", "tags", "useForSubscriberList")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("description", "displayName", "imageId", "productType", "tags", "useForSubscriberList")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateProductRequest.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 `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 (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(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(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(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(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateProductRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateProductRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateProductRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateProductRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateProductRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..09e1aebb --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CreatePropRequest.java @@ -0,0 +1,533 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * CreatePropRequest + */ +@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(@javax.annotation.Nonnull String assetUrl) { + this.assetUrl = assetUrl; + return this; + } + + /** + * Get assetUrl + * @return assetUrl + */ + @javax.annotation.Nonnull + public String getAssetUrl() { + return assetUrl; + } + + public void setAssetUrl(@javax.annotation.Nonnull String assetUrl) { + this.assetUrl = assetUrl; + } + + + public CreatePropRequest assetVersion(@javax.annotation.Nonnull Integer assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get assetVersion + * @return assetVersion + */ + @javax.annotation.Nonnull + public Integer getAssetVersion() { + return assetVersion; + } + + public void setAssetVersion(@javax.annotation.Nonnull Integer assetVersion) { + this.assetVersion = assetVersion; + } + + + public CreatePropRequest description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public CreatePropRequest id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public CreatePropRequest imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public CreatePropRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + } + + + public CreatePropRequest propSignature(@javax.annotation.Nullable String propSignature) { + this.propSignature = propSignature; + return this; + } + + /** + * Get propSignature + * @return propSignature + */ + @javax.annotation.Nullable + public String getPropSignature() { + return propSignature; + } + + public void setPropSignature(@javax.annotation.Nullable String propSignature) { + this.propSignature = propSignature; + } + + + 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 + public Integer getSpawnType() { + return spawnType; + } + + public void setSpawnType(@javax.annotation.Nonnull Integer spawnType) { + this.spawnType = spawnType; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public CreatePropRequest unityVersion(@javax.annotation.Nonnull String unityVersion) { + this.unityVersion = unityVersion; + return this; + } + + /** + * Get unityVersion + * @return unityVersion + */ + @javax.annotation.Nonnull + public String getUnityVersion() { + return unityVersion; + } + + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { + this.unityVersion = unityVersion; + } + + + 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 + public Integer getWorldPlacementMask() { + return worldPlacementMask; + } + + public void setWorldPlacementMask(@javax.annotation.Nonnull Integer worldPlacementMask) { + this.worldPlacementMask = worldPlacementMask; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePropRequest createPropRequest = (CreatePropRequest) o; + return Objects.equals(this.assetUrl, createPropRequest.assetUrl) && + Objects.equals(this.assetVersion, createPropRequest.assetVersion) && + Objects.equals(this.description, createPropRequest.description) && + Objects.equals(this.id, createPropRequest.id) && + Objects.equals(this.imageUrl, createPropRequest.imageUrl) && + Objects.equals(this.name, createPropRequest.name) && + Objects.equals(this.platform, createPropRequest.platform) && + Objects.equals(this.propSignature, createPropRequest.propSignature) && + Objects.equals(this.spawnType, createPropRequest.spawnType) && + Objects.equals(this.tags, createPropRequest.tags) && + Objects.equals(this.unityVersion, createPropRequest.unityVersion) && + Objects.equals(this.worldPlacementMask, createPropRequest.worldPlacementMask); + } + + @Override + public int hashCode() { + return Objects.hash(assetUrl, assetVersion, description, id, imageUrl, name, platform, propSignature, spawnType, tags, unityVersion, worldPlacementMask); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatePropRequest {\n"); + sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); + sb.append(" assetVersion: ").append(toIndentedString(assetVersion)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" propSignature: ").append(toIndentedString(propSignature)).append("\n"); + sb.append(" spawnType: ").append(toIndentedString(spawnType)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); + sb.append(" worldPlacementMask: ").append(toIndentedString(worldPlacementMask)).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("assetUrl", "assetVersion", "description", "id", "imageUrl", "name", "platform", "propSignature", "spawnType", "tags", "unityVersion", "worldPlacementMask")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreatePropRequest.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 `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 (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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatePropRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatePropRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreatePropRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatePropRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreatePropRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 1b3c6f98..a7af3538 100644 --- a/src/main/java/io/github/vrchatapi/model/CreateWorldRequest.java +++ b/src/main/java/io/github/vrchatapi/model/CreateWorldRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,414 +13,396 @@ package io.github.vrchatapi.model; import 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; +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; + /** * 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_ba913a96-fac4-4048-a062-9aa5db092812", 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. + /** + * 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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; } public CreateWorldRequest addTagsItem(String tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(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 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 = "2018.4.20f1", value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; } + @Override public boolean equals(Object o) { if (this == o) { @@ -478,11 +460,136 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateWorldRequest.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 `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 (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(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(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(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(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(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(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(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(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").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(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(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateWorldRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateWorldRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateWorldRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateWorldRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateWorldRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 2303d056..2a827109 100644 --- a/src/main/java/io/github/vrchatapi/model/CurrentUser.java +++ b/src/main/java/io/github/vrchatapi/model/CurrentUser.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,1330 +13,2161 @@ package io.github.vrchatapi.model; import 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.AccountDeletionLog; +import io.github.vrchatapi.model.AgeVerificationStatus; +import io.github.vrchatapi.model.Badge; +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.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; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; + +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; /** * 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) + @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) + @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) - private List bioLinks = new ArrayList(); + @javax.annotation.Nonnull + private List bioLinks = new ArrayList<>(); + + public static final String SERIALIZED_NAME_CONTENT_FILTERS = "contentFilters"; + @SerializedName(SERIALIZED_NAME_CONTENT_FILTERS) + @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_ASSET_URL = "currentAvatarAssetUrl"; - @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_ASSET_URL) - private String currentAvatarAssetUrl; - 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) - private List friendGroupNames = new ArrayList(); + @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) - private List friends = new ArrayList(); + @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) - private List pastDisplayNames = new ArrayList(); + @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) + @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) - private List statusHistory = new ArrayList(); + @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) - private List tags = new ArrayList(); + @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(@javax.annotation.Nullable Integer acceptedPrivacyVersion) { + this.acceptedPrivacyVersion = acceptedPrivacyVersion; + return this; + } + + /** + * Get acceptedPrivacyVersion + * minimum: 0 + * @return acceptedPrivacyVersion + */ + @javax.annotation.Nullable + public Integer getAcceptedPrivacyVersion() { + return 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 activeFriends(List activeFriends) { - + public CurrentUser accountDeletionLog(@javax.annotation.Nullable List accountDeletionLog) { + this.accountDeletionLog = accountDeletionLog; + return this; + } + + public CurrentUser addAccountDeletionLogItem(AccountDeletionLog accountDeletionLogItem) { + if (this.accountDeletionLog == null) { + this.accountDeletionLog = new ArrayList<>(); + } + this.accountDeletionLog.add(accountDeletionLogItem); + return this; + } + + /** + * + * @return accountDeletionLog + */ + @javax.annotation.Nullable + public List getAccountDeletionLog() { + return accountDeletionLog; + } + + public void setAccountDeletionLog(@javax.annotation.Nullable List accountDeletionLog) { + this.accountDeletionLog = accountDeletionLog; + } + + + public CurrentUser activeFriends(@javax.annotation.Nullable List activeFriends) { this.activeFriends = activeFriends; return this; } public CurrentUser addActiveFriendsItem(String activeFriendsItem) { if (this.activeFriends == null) { - this.activeFriends = new ArrayList(); + this.activeFriends = new ArrayList<>(); } this.activeFriends.add(activeFriendsItem); return this; } - /** - * Get activeFriends + /** + * * @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 allowAvatarCopying(Boolean allowAvatarCopying) { - - this.allowAvatarCopying = allowAvatarCopying; + public CurrentUser ageVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; return this; } - /** - * Get allowAvatarCopying - * @return allowAvatarCopying - **/ + /** + * Get ageVerificationStatus + * @return ageVerificationStatus + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Boolean getAllowAvatarCopying() { - return allowAvatarCopying; + public AgeVerificationStatus getAgeVerificationStatus() { + return ageVerificationStatus; } - - public void setAllowAvatarCopying(Boolean allowAvatarCopying) { - this.allowAvatarCopying = allowAvatarCopying; + public void setAgeVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; } - public CurrentUser bio(String bio) { - - this.bio = bio; + public CurrentUser ageVerified(@javax.annotation.Nonnull Boolean ageVerified) { + this.ageVerified = ageVerified; return this; } - /** - * Get bio - * @return bio - **/ + /** + * `true` if, user is age verified (not 18+). + * @return ageVerified + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getBio() { - return bio; + public Boolean getAgeVerified() { + return ageVerified; } - - public void setBio(String bio) { - this.bio = bio; + public void setAgeVerified(@javax.annotation.Nonnull Boolean ageVerified) { + this.ageVerified = ageVerified; } - public CurrentUser bioLinks(List bioLinks) { - - this.bioLinks = bioLinks; - return this; - } - - public CurrentUser addBioLinksItem(String bioLinksItem) { - this.bioLinks.add(bioLinksItem); + public CurrentUser allowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { + this.allowAvatarCopying = allowAvatarCopying; return this; } - /** - * Get bioLinks - * @return bioLinks - **/ + /** + * Get allowAvatarCopying + * @return allowAvatarCopying + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public List getBioLinks() { - return bioLinks; + public Boolean getAllowAvatarCopying() { + return allowAvatarCopying; } - - public void setBioLinks(List bioLinks) { - this.bioLinks = bioLinks; + public void setAllowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { + this.allowAvatarCopying = allowAvatarCopying; } - public CurrentUser currentAvatar(String currentAvatar) { - - this.currentAvatar = currentAvatar; + public CurrentUser appleDetails(@javax.annotation.Nullable Object appleDetails) { + this.appleDetails = appleDetails; 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; + /** + * Get appleDetails + * @return appleDetails + */ + @javax.annotation.Nullable + public Object getAppleDetails() { + return appleDetails; } - - public void setCurrentAvatar(String currentAvatar) { - this.currentAvatar = currentAvatar; + public void setAppleDetails(@javax.annotation.Nullable Object appleDetails) { + this.appleDetails = appleDetails; } - public CurrentUser currentAvatarAssetUrl(String currentAvatarAssetUrl) { - - this.currentAvatarAssetUrl = currentAvatarAssetUrl; + public CurrentUser appleId(@javax.annotation.Nullable String appleId) { + this.appleId = appleId; return this; } - /** - * Get currentAvatarAssetUrl - * @return currentAvatarAssetUrl - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getCurrentAvatarAssetUrl() { - return currentAvatarAssetUrl; + /** + * Get appleId + * @return appleId + */ + @javax.annotation.Nullable + public String getAppleId() { + return appleId; } - - public void setCurrentAvatarAssetUrl(String currentAvatarAssetUrl) { - this.currentAvatarAssetUrl = currentAvatarAssetUrl; + public void setAppleId(@javax.annotation.Nullable String appleId) { + this.appleId = appleId; } - public CurrentUser currentAvatarImageUrl(String currentAvatarImageUrl) { - - this.currentAvatarImageUrl = currentAvatarImageUrl; + public CurrentUser authToken(@javax.annotation.Nullable String authToken) { + this.authToken = authToken; 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; + /** + * The auth token for NEWLY REGISTERED ACCOUNTS ONLY (/auth/register) + * @return authToken + */ + @javax.annotation.Nullable + public String getAuthToken() { + return authToken; } - - public void setCurrentAvatarImageUrl(String currentAvatarImageUrl) { - this.currentAvatarImageUrl = currentAvatarImageUrl; + public void setAuthToken(@javax.annotation.Nullable String authToken) { + this.authToken = authToken; } - public CurrentUser currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - - this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + public CurrentUser badges(@javax.annotation.Nullable List badges) { + this.badges = badges; 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 CurrentUser addBadgesItem(Badge badgesItem) { + if (this.badges == null) { + this.badges = new ArrayList<>(); + } + this.badges.add(badgesItem); + return this; } + /** + * + * @return badges + */ + @javax.annotation.Nullable + public List getBadges() { + return badges; + } - public void setCurrentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + public void setBadges(@javax.annotation.Nullable List badges) { + this.badges = badges; } - public CurrentUser dateJoined(LocalDate dateJoined) { - + public CurrentUser bio(@javax.annotation.Nonnull String bio) { + this.bio = bio; + return this; + } + + /** + * Get bio + * @return bio + */ + @javax.annotation.Nonnull + public String getBio() { + return bio; + } + + public void setBio(@javax.annotation.Nonnull String bio) { + this.bio = bio; + } + + + 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 + public List getBioLinks() { + return bioLinks; + } + + public void setBioLinks(@javax.annotation.Nonnull List bioLinks) { + this.bioLinks = bioLinks; + } + + + public CurrentUser contentFilters(@javax.annotation.Nullable List contentFilters) { + this.contentFilters = contentFilters; + return this; + } + + public CurrentUser addContentFiltersItem(String contentFiltersItem) { + if (this.contentFilters == null) { + this.contentFilters = new ArrayList<>(); + } + this.contentFilters.add(contentFiltersItem); + return this; + } + + /** + * These tags begin with `content_` and control content gating + * @return contentFilters + */ + @javax.annotation.Nullable + public List getContentFilters() { + return contentFilters; + } + + public void setContentFilters(@javax.annotation.Nullable List contentFilters) { + this.contentFilters = contentFilters; + } + + + public CurrentUser currentAvatar(@javax.annotation.Nonnull String currentAvatar) { + this.currentAvatar = currentAvatar; + return this; + } + + /** + * Get currentAvatar + * @return currentAvatar + */ + @javax.annotation.Nonnull + public String getCurrentAvatar() { + return currentAvatar; + } + + public void setCurrentAvatar(@javax.annotation.Nonnull String currentAvatar) { + this.currentAvatar = currentAvatar; + } + + + 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 + public String getCurrentAvatarImageUrl() { + return currentAvatarImageUrl; + } + + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { + this.currentAvatarImageUrl = currentAvatarImageUrl; + } + + + 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 + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + 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 + public String getCurrentAvatarThumbnailImageUrl() { + return currentAvatarThumbnailImageUrl; + } + + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + } + + + 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 displayName(String displayName) { - + public CurrentUser discordDetails(@javax.annotation.Nullable DiscordDetails discordDetails) { + this.discordDetails = discordDetails; + return this; + } + + /** + * Get discordDetails + * @return discordDetails + */ + @javax.annotation.Nullable + public DiscordDetails getDiscordDetails() { + return discordDetails; + } + + public void setDiscordDetails(@javax.annotation.Nullable DiscordDetails discordDetails) { + this.discordDetails = discordDetails; + } + + + 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 + public String getDiscordId() { + return discordId; + } + + public void setDiscordId(@javax.annotation.Nullable String discordId) { + this.discordId = discordId; + } + + + 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 hasBirthday(Boolean hasBirthday) { - + public CurrentUser googleDetails(@javax.annotation.Nullable Object googleDetails) { + this.googleDetails = googleDetails; + return this; + } + + /** + * Get googleDetails + * @return googleDetails + */ + @javax.annotation.Nullable + public Object getGoogleDetails() { + return googleDetails; + } + + public void setGoogleDetails(@javax.annotation.Nullable Object googleDetails) { + this.googleDetails = googleDetails; + } + + + public CurrentUser googleId(@javax.annotation.Nullable String googleId) { + this.googleId = googleId; + return this; + } + + /** + * Get googleId + * @return googleId + */ + @javax.annotation.Nullable + public String getGoogleId() { + return googleId; + } + + public void setGoogleId(@javax.annotation.Nullable String googleId) { + this.googleId = googleId; + } + + + 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 homeLocation(String homeLocation) { - + 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 + public Boolean getHideContentFilterSettings() { + return hideContentFilterSettings; + } + + public void setHideContentFilterSettings(@javax.annotation.Nullable Boolean hideContentFilterSettings) { + this.hideContentFilterSettings = hideContentFilterSettings; + } + + + 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_ba913a96-fac4-4048-a062-9aa5db092812", 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 isFriend(Boolean isFriend) { - + public CurrentUser isAdult(@javax.annotation.Nonnull Boolean isAdult) { + this.isAdult = isAdult; + return this; + } + + /** + * Get isAdult + * @return isAdult + */ + @javax.annotation.Nonnull + public Boolean getIsAdult() { + return isAdult; + } + + public void setIsAdult(@javax.annotation.Nonnull Boolean isAdult) { + this.isAdult = isAdult; + } + + + public CurrentUser isBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { + this.isBoopingEnabled = isBoopingEnabled; + return this; + } + + /** + * Get isBoopingEnabled + * @return isBoopingEnabled + */ + @javax.annotation.Nullable + public Boolean getIsBoopingEnabled() { + return isBoopingEnabled; + } + + public void setIsBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { + this.isBoopingEnabled = isBoopingEnabled; + } + + + 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 lastLogin(OffsetDateTime lastLogin) { - + public CurrentUser lastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { + this.lastActivity = lastActivity; + return this; + } + + /** + * Get lastActivity + * @return lastActivity + */ + @javax.annotation.Nullable + public OffsetDateTime getLastActivity() { + return lastActivity; + } + + public void setLastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { + this.lastActivity = lastActivity; + } + + + 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 lastPlatform(String lastPlatform) { - + public CurrentUser lastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { + this.lastMobile = lastMobile; + return this; + } + + /** + * Get lastMobile + * @return lastMobile + */ + @javax.annotation.Nullable + public OffsetDateTime getLastMobile() { + return lastMobile; + } + + public void setLastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { + this.lastMobile = lastMobile; + } + + + public CurrentUser lastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; return this; } - /** - * This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. + /** + * 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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) { - this.obfuscatedEmail = obfuscatedEmail; + public void setObfuscatedEmail(@javax.annotation.Nonnull String obfuscatedEmail) { + this.obfuscatedEmail = obfuscatedEmail; + } + + + public CurrentUser obfuscatedPendingEmail(@javax.annotation.Nonnull String obfuscatedPendingEmail) { + this.obfuscatedPendingEmail = obfuscatedPendingEmail; + return this; + } + + /** + * Get obfuscatedPendingEmail + * @return obfuscatedPendingEmail + */ + @javax.annotation.Nonnull + public String getObfuscatedPendingEmail() { + return obfuscatedPendingEmail; + } + + public void setObfuscatedPendingEmail(@javax.annotation.Nonnull String obfuscatedPendingEmail) { + this.obfuscatedPendingEmail = obfuscatedPendingEmail; + } + + + public CurrentUser oculusId(@javax.annotation.Nonnull String oculusId) { + this.oculusId = oculusId; + return this; + } + + /** + * Get oculusId + * @return oculusId + */ + @javax.annotation.Nonnull + public String getOculusId() { + return oculusId; + } + + public void setOculusId(@javax.annotation.Nonnull String oculusId) { + this.oculusId = oculusId; + } + + + public CurrentUser offlineFriends(@javax.annotation.Nullable List offlineFriends) { + this.offlineFriends = offlineFriends; + return this; + } + + public CurrentUser addOfflineFriendsItem(String offlineFriendsItem) { + if (this.offlineFriends == null) { + this.offlineFriends = new ArrayList<>(); + } + this.offlineFriends.add(offlineFriendsItem); + return this; + } + + /** + * Get offlineFriends + * @return offlineFriends + */ + @javax.annotation.Nullable + public List getOfflineFriends() { + return offlineFriends; + } + + public void setOfflineFriends(@javax.annotation.Nullable List offlineFriends) { + this.offlineFriends = offlineFriends; + } + + + public CurrentUser onlineFriends(@javax.annotation.Nullable List onlineFriends) { + this.onlineFriends = onlineFriends; + return this; + } + + public CurrentUser addOnlineFriendsItem(String onlineFriendsItem) { + if (this.onlineFriends == null) { + this.onlineFriends = new ArrayList<>(); + } + this.onlineFriends.add(onlineFriendsItem); + return this; + } + + /** + * Get onlineFriends + * @return onlineFriends + */ + @javax.annotation.Nullable + public List getOnlineFriends() { + return onlineFriends; + } + + public void setOnlineFriends(@javax.annotation.Nullable List onlineFriends) { + this.onlineFriends = onlineFriends; + } + + + 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 + public List getPastDisplayNames() { + return pastDisplayNames; + } + + public void setPastDisplayNames(@javax.annotation.Nonnull List pastDisplayNames) { + this.pastDisplayNames = pastDisplayNames; + } + + + public CurrentUser picoId(@javax.annotation.Nullable String picoId) { + this.picoId = picoId; + return this; + } + + /** + * Get picoId + * @return picoId + */ + @javax.annotation.Nullable + public String getPicoId() { + return picoId; + } + + public void setPicoId(@javax.annotation.Nullable String picoId) { + this.picoId = picoId; + } + + + public CurrentUser platformHistory(@javax.annotation.Nullable List platformHistory) { + this.platformHistory = platformHistory; + return this; + } + + public CurrentUser addPlatformHistoryItem(CurrentUserPlatformHistoryInner platformHistoryItem) { + if (this.platformHistory == null) { + this.platformHistory = new ArrayList<>(); + } + this.platformHistory.add(platformHistoryItem); + return this; + } + + /** + * Get platformHistory + * @return platformHistory + */ + @javax.annotation.Nullable + public List getPlatformHistory() { + return platformHistory; + } + + public void setPlatformHistory(@javax.annotation.Nullable List platformHistory) { + this.platformHistory = platformHistory; } - public CurrentUser obfuscatedPendingEmail(String obfuscatedPendingEmail) { - - this.obfuscatedPendingEmail = obfuscatedPendingEmail; + public CurrentUser presence(@javax.annotation.Nullable CurrentUserPresence presence) { + this.presence = presence; return this; } - /** - * Get obfuscatedPendingEmail - * @return obfuscatedPendingEmail - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getObfuscatedPendingEmail() { - return obfuscatedPendingEmail; + /** + * Get presence + * @return presence + */ + @javax.annotation.Nullable + public CurrentUserPresence getPresence() { + return presence; } - - public void setObfuscatedPendingEmail(String obfuscatedPendingEmail) { - this.obfuscatedPendingEmail = obfuscatedPendingEmail; + public void setPresence(@javax.annotation.Nullable CurrentUserPresence presence) { + this.presence = presence; } - public CurrentUser oculusId(String oculusId) { - - this.oculusId = oculusId; + public CurrentUser profilePicOverride(@javax.annotation.Nonnull String profilePicOverride) { + this.profilePicOverride = profilePicOverride; return this; } - /** - * Get oculusId - * @return oculusId - **/ + /** + * Get profilePicOverride + * @return profilePicOverride + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getOculusId() { - return oculusId; + public String getProfilePicOverride() { + return profilePicOverride; } - - public void setOculusId(String oculusId) { - this.oculusId = oculusId; + public void setProfilePicOverride(@javax.annotation.Nonnull String profilePicOverride) { + this.profilePicOverride = profilePicOverride; } - public CurrentUser offlineFriends(List offlineFriends) { - - this.offlineFriends = offlineFriends; + public CurrentUser profilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; return this; } - public CurrentUser addOfflineFriendsItem(String offlineFriendsItem) { - if (this.offlineFriends == null) { - this.offlineFriends = new ArrayList(); - } - this.offlineFriends.add(offlineFriendsItem); - return this; + /** + * Get profilePicOverrideThumbnail + * @return profilePicOverrideThumbnail + */ + @javax.annotation.Nonnull + public String getProfilePicOverrideThumbnail() { + return profilePicOverrideThumbnail; } - /** - * Get offlineFriends - * @return offlineFriends - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + public void setProfilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; + } - public List getOfflineFriends() { - return offlineFriends; + + public CurrentUser pronouns(@javax.annotation.Nonnull String pronouns) { + this.pronouns = pronouns; + return this; } + /** + * Get pronouns + * @return pronouns + */ + @javax.annotation.Nonnull + public String getPronouns() { + return pronouns; + } - public void setOfflineFriends(List offlineFriends) { - this.offlineFriends = offlineFriends; + public void setPronouns(@javax.annotation.Nonnull String pronouns) { + this.pronouns = pronouns; } - public CurrentUser onlineFriends(List onlineFriends) { - - this.onlineFriends = onlineFriends; + public CurrentUser pronounsHistory(@javax.annotation.Nonnull List pronounsHistory) { + this.pronounsHistory = pronounsHistory; return this; } - public CurrentUser addOnlineFriendsItem(String onlineFriendsItem) { - if (this.onlineFriends == null) { - this.onlineFriends = new ArrayList(); + public CurrentUser addPronounsHistoryItem(String pronounsHistoryItem) { + if (this.pronounsHistory == null) { + this.pronounsHistory = new ArrayList<>(); } - this.onlineFriends.add(onlineFriendsItem); + this.pronounsHistory.add(pronounsHistoryItem); return this; } - /** - * Get onlineFriends - * @return onlineFriends - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getOnlineFriends() { - return onlineFriends; + /** + * Get pronounsHistory + * @return pronounsHistory + */ + @javax.annotation.Nonnull + public List getPronounsHistory() { + return pronounsHistory; } - - public void setOnlineFriends(List onlineFriends) { - this.onlineFriends = onlineFriends; + public void setPronounsHistory(@javax.annotation.Nonnull List pronounsHistory) { + this.pronounsHistory = pronounsHistory; } - public CurrentUser pastDisplayNames(List pastDisplayNames) { - - this.pastDisplayNames = pastDisplayNames; - return this; - } - - public CurrentUser addPastDisplayNamesItem(PastDisplayName pastDisplayNamesItem) { - this.pastDisplayNames.add(pastDisplayNamesItem); + public CurrentUser queuedInstance(@javax.annotation.Nullable String queuedInstance) { + this.queuedInstance = queuedInstance; return this; } - /** - * Get pastDisplayNames - * @return pastDisplayNames - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public List getPastDisplayNames() { - return pastDisplayNames; + /** + * Get queuedInstance + * @return queuedInstance + */ + @javax.annotation.Nullable + public String getQueuedInstance() { + return queuedInstance; } - - public void setPastDisplayNames(List pastDisplayNames) { - this.pastDisplayNames = pastDisplayNames; + public void setQueuedInstance(@javax.annotation.Nullable String queuedInstance) { + this.queuedInstance = queuedInstance; } - public CurrentUser profilePicOverride(String profilePicOverride) { - - this.profilePicOverride = profilePicOverride; + public CurrentUser receiveMobileInvitations(@javax.annotation.Nullable Boolean receiveMobileInvitations) { + this.receiveMobileInvitations = receiveMobileInvitations; return this; } - /** - * Get profilePicOverride - * @return profilePicOverride - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getProfilePicOverride() { - return profilePicOverride; + /** + * Get receiveMobileInvitations + * @return receiveMobileInvitations + */ + @javax.annotation.Nullable + public Boolean getReceiveMobileInvitations() { + return receiveMobileInvitations; } - - public void setProfilePicOverride(String profilePicOverride) { - this.profilePicOverride = profilePicOverride; + 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 unsubscribe(Boolean unsubscribe) { - + public CurrentUser twoFactorAuthEnabledDate(@javax.annotation.Nullable OffsetDateTime twoFactorAuthEnabledDate) { + this.twoFactorAuthEnabledDate = twoFactorAuthEnabledDate; + return this; + } + + /** + * Get twoFactorAuthEnabledDate + * @return twoFactorAuthEnabledDate + */ + @javax.annotation.Nullable + public OffsetDateTime getTwoFactorAuthEnabledDate() { + return twoFactorAuthEnabledDate; + } + + public void setTwoFactorAuthEnabledDate(@javax.annotation.Nullable OffsetDateTime twoFactorAuthEnabledDate) { + this.twoFactorAuthEnabledDate = twoFactorAuthEnabledDate; + } + + + 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 userIcon(String userIcon) { - + public CurrentUser updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + 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 username(String username) { - + public CurrentUser userLanguage(@javax.annotation.Nullable String userLanguage) { + this.userLanguage = userLanguage; + return this; + } + + /** + * Get userLanguage + * @return userLanguage + */ + @javax.annotation.Nullable + public String getUserLanguage() { + return userLanguage; + } + + public void setUserLanguage(@javax.annotation.Nullable String userLanguage) { + this.userLanguage = userLanguage; + } + + + public CurrentUser userLanguageCode(@javax.annotation.Nullable String userLanguageCode) { + this.userLanguageCode = userLanguageCode; + return this; + } + + /** + * Get userLanguageCode + * @return userLanguageCode + */ + @javax.annotation.Nullable + public String getUserLanguageCode() { + return userLanguageCode; + } + + public void setUserLanguageCode(@javax.annotation.Nullable String userLanguageCode) { + this.userLanguageCode = userLanguageCode; + } + + + @Deprecated + public CurrentUser username(@javax.annotation.Nullable String username) { this.username = username; return this; } - /** - * Get username + /** + * -| **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 - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable 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(@javax.annotation.Nonnull Boolean usesGeneratedPassword) { + this.usesGeneratedPassword = usesGeneratedPassword; + return this; + } + + /** + * Get usesGeneratedPassword + * @return usesGeneratedPassword + */ + @javax.annotation.Nonnull + public Boolean getUsesGeneratedPassword() { + return usesGeneratedPassword; + } + + public void setUsesGeneratedPassword(@javax.annotation.Nonnull Boolean usesGeneratedPassword) { + this.usesGeneratedPassword = usesGeneratedPassword; + } + + + public CurrentUser viveId(@javax.annotation.Nullable String viveId) { + this.viveId = viveId; + return this; + } + + /** + * Get viveId + * @return viveId + */ + @javax.annotation.Nullable + public String getViveId() { + return viveId; + } + + public void setViveId(@javax.annotation.Nullable String viveId) { + this.viveId = viveId; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -1346,32 +2177,52 @@ public boolean equals(Object o) { return false; } CurrentUser currentUser = (CurrentUser) o; - return Objects.equals(this.acceptedTOSVersion, currentUser.acceptedTOSVersion) && + return Objects.equals(this.acceptedPrivacyVersion, currentUser.acceptedPrivacyVersion) && + Objects.equals(this.acceptedTOSVersion, currentUser.acceptedTOSVersion) && Objects.equals(this.accountDeletionDate, currentUser.accountDeletionDate) && + Objects.equals(this.accountDeletionLog, currentUser.accountDeletionLog) && Objects.equals(this.activeFriends, currentUser.activeFriends) && + 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) && Objects.equals(this.bioLinks, currentUser.bioLinks) && + Objects.equals(this.contentFilters, currentUser.contentFilters) && Objects.equals(this.currentAvatar, currentUser.currentAvatar) && - Objects.equals(this.currentAvatarAssetUrl, currentUser.currentAvatarAssetUrl) && Objects.equals(this.currentAvatarImageUrl, currentUser.currentAvatarImageUrl) && + Objects.equals(this.currentAvatarTags, currentUser.currentAvatarTags) && Objects.equals(this.currentAvatarThumbnailImageUrl, currentUser.currentAvatarThumbnailImageUrl) && Objects.equals(this.dateJoined, currentUser.dateJoined) && Objects.equals(this.developerType, currentUser.developerType) && + Objects.equals(this.discordDetails, currentUser.discordDetails) && + Objects.equals(this.discordId, currentUser.discordId) && Objects.equals(this.displayName, currentUser.displayName) && Objects.equals(this.emailVerified, currentUser.emailVerified) && Objects.equals(this.fallbackAvatar, currentUser.fallbackAvatar) && Objects.equals(this.friendGroupNames, currentUser.friendGroupNames) && Objects.equals(this.friendKey, currentUser.friendKey) && Objects.equals(this.friends, currentUser.friends) && + 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) && + Objects.equals(this.isAdult, currentUser.isAdult) && + Objects.equals(this.isBoopingEnabled, currentUser.isBoopingEnabled) && Objects.equals(this.isFriend, currentUser.isFriend) && + Objects.equals(this.lastActivity, currentUser.lastActivity) && Objects.equals(this.lastLogin, currentUser.lastLogin) && + Objects.equals(this.lastMobile, currentUser.lastMobile) && Objects.equals(this.lastPlatform, currentUser.lastPlatform) && Objects.equals(this.obfuscatedEmail, currentUser.obfuscatedEmail) && Objects.equals(this.obfuscatedPendingEmail, currentUser.obfuscatedPendingEmail) && @@ -1379,7 +2230,15 @@ public boolean equals(Object o) { Objects.equals(this.offlineFriends, currentUser.offlineFriends) && Objects.equals(this.onlineFriends, currentUser.onlineFriends) && Objects.equals(this.pastDisplayNames, currentUser.pastDisplayNames) && + Objects.equals(this.picoId, currentUser.picoId) && + Objects.equals(this.platformHistory, currentUser.platformHistory) && + Objects.equals(this.presence, currentUser.presence) && Objects.equals(this.profilePicOverride, currentUser.profilePicOverride) && + Objects.equals(this.profilePicOverrideThumbnail, currentUser.profilePicOverrideThumbnail) && + Objects.equals(this.pronouns, currentUser.pronouns) && + Objects.equals(this.pronounsHistory, currentUser.pronounsHistory) && + Objects.equals(this.queuedInstance, currentUser.queuedInstance) && + Objects.equals(this.receiveMobileInvitations, currentUser.receiveMobileInvitations) && Objects.equals(this.state, currentUser.state) && Objects.equals(this.status, currentUser.status) && Objects.equals(this.statusDescription, currentUser.statusDescription) && @@ -1388,10 +2247,18 @@ 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) && + Objects.equals(this.updatedAt, currentUser.updatedAt) && Objects.equals(this.userIcon, currentUser.userIcon) && - Objects.equals(this.username, currentUser.username); + Objects.equals(this.userLanguage, currentUser.userLanguage) && + Objects.equals(this.userLanguageCode, currentUser.userLanguageCode) && + Objects.equals(this.username, currentUser.username) && + Objects.equals(this.usesGeneratedPassword, currentUser.usesGeneratedPassword) && + Objects.equals(this.viveId, currentUser.viveId); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1400,7 +2267,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(acceptedTOSVersion, accountDeletionDate, activeFriends, allowAvatarCopying, bio, bioLinks, currentAvatar, currentAvatarAssetUrl, currentAvatarImageUrl, currentAvatarThumbnailImageUrl, dateJoined, developerType, displayName, emailVerified, fallbackAvatar, friendGroupNames, friendKey, friends, hasBirthday, hasEmail, hasLoggedInFromClient, hasPendingEmail, homeLocation, id, isFriend, lastLogin, lastPlatform, obfuscatedEmail, obfuscatedPendingEmail, oculusId, offlineFriends, onlineFriends, pastDisplayNames, profilePicOverride, state, status, statusDescription, statusFirstTime, statusHistory, steamDetails, steamId, tags, twoFactorAuthEnabled, unsubscribe, userIcon, username); + 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) { @@ -1414,32 +2281,52 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CurrentUser {\n"); + sb.append(" acceptedPrivacyVersion: ").append(toIndentedString(acceptedPrivacyVersion)).append("\n"); sb.append(" acceptedTOSVersion: ").append(toIndentedString(acceptedTOSVersion)).append("\n"); sb.append(" accountDeletionDate: ").append(toIndentedString(accountDeletionDate)).append("\n"); + sb.append(" accountDeletionLog: ").append(toIndentedString(accountDeletionLog)).append("\n"); sb.append(" activeFriends: ").append(toIndentedString(activeFriends)).append("\n"); + 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"); sb.append(" bioLinks: ").append(toIndentedString(bioLinks)).append("\n"); + sb.append(" contentFilters: ").append(toIndentedString(contentFilters)).append("\n"); sb.append(" currentAvatar: ").append(toIndentedString(currentAvatar)).append("\n"); - sb.append(" currentAvatarAssetUrl: ").append(toIndentedString(currentAvatarAssetUrl)).append("\n"); sb.append(" currentAvatarImageUrl: ").append(toIndentedString(currentAvatarImageUrl)).append("\n"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); sb.append(" currentAvatarThumbnailImageUrl: ").append(toIndentedString(currentAvatarThumbnailImageUrl)).append("\n"); sb.append(" dateJoined: ").append(toIndentedString(dateJoined)).append("\n"); sb.append(" developerType: ").append(toIndentedString(developerType)).append("\n"); + sb.append(" discordDetails: ").append(toIndentedString(discordDetails)).append("\n"); + sb.append(" discordId: ").append(toIndentedString(discordId)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" emailVerified: ").append(toIndentedString(emailVerified)).append("\n"); sb.append(" fallbackAvatar: ").append(toIndentedString(fallbackAvatar)).append("\n"); sb.append(" friendGroupNames: ").append(toIndentedString(friendGroupNames)).append("\n"); sb.append(" friendKey: ").append(toIndentedString(friendKey)).append("\n"); sb.append(" friends: ").append(toIndentedString(friends)).append("\n"); + 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"); + sb.append(" isAdult: ").append(toIndentedString(isAdult)).append("\n"); + sb.append(" isBoopingEnabled: ").append(toIndentedString(isBoopingEnabled)).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(" obfuscatedEmail: ").append(toIndentedString(obfuscatedEmail)).append("\n"); sb.append(" obfuscatedPendingEmail: ").append(toIndentedString(obfuscatedPendingEmail)).append("\n"); @@ -1447,7 +2334,15 @@ public String toString() { sb.append(" offlineFriends: ").append(toIndentedString(offlineFriends)).append("\n"); sb.append(" onlineFriends: ").append(toIndentedString(onlineFriends)).append("\n"); sb.append(" pastDisplayNames: ").append(toIndentedString(pastDisplayNames)).append("\n"); + sb.append(" picoId: ").append(toIndentedString(picoId)).append("\n"); + sb.append(" platformHistory: ").append(toIndentedString(platformHistory)).append("\n"); + sb.append(" presence: ").append(toIndentedString(presence)).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"); + sb.append(" pronounsHistory: ").append(toIndentedString(pronounsHistory)).append("\n"); + sb.append(" queuedInstance: ").append(toIndentedString(queuedInstance)).append("\n"); + sb.append(" receiveMobileInvitations: ").append(toIndentedString(receiveMobileInvitations)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); @@ -1456,10 +2351,18 @@ 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"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" userIcon: ").append(toIndentedString(userIcon)).append("\n"); + sb.append(" userLanguage: ").append(toIndentedString(userLanguage)).append("\n"); + sb.append(" userLanguageCode: ").append(toIndentedString(userLanguageCode)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" usesGeneratedPassword: ").append(toIndentedString(usesGeneratedPassword)).append("\n"); + sb.append(" viveId: ").append(toIndentedString(viveId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1469,11 +2372,314 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CurrentUser.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 `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 (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(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.validateJsonElement(jsonArrayaccountDeletionLog.get(i)); + }; + } + } + // ensure the optional json data is an array if present + 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(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(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("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 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(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").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(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(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(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(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.validateJsonElement(jsonObj.get("discordDetails")); + } + if ((jsonObj.get("discordId") != null && !jsonObj.get("discordId").isJsonNull()) && !jsonObj.get("discordId").isJsonPrimitive()) { + 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(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(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(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(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(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(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(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(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(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(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(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(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").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").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())); + } + 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)); + } + } + if ((jsonObj.get("picoId") != null && !jsonObj.get("picoId").isJsonNull()) && !jsonObj.get("picoId").isJsonPrimitive()) { + 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(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.validateJsonElement(jsonArrayplatformHistory.get(i)); + }; + } + } + // validate the optional field `presence` + if (jsonObj.get("presence") != null && !jsonObj.get("presence").isJsonNull()) { + CurrentUserPresence.validateJsonElement(jsonObj.get("presence")); + } + if (!jsonObj.get("profilePicOverride").isJsonPrimitive()) { + 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(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(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(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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `viveId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("viveId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CurrentUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CurrentUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CurrentUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CurrentUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CurrentUser read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..b0778774 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CurrentUserPlatformHistoryInner.java @@ -0,0 +1,254 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * CurrentUserPlatformHistoryInner + */ +@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(@javax.annotation.Nullable Boolean isMobile) { + this.isMobile = isMobile; + return this; + } + + /** + * Get isMobile + * @return isMobile + */ + @javax.annotation.Nullable + public Boolean getIsMobile() { + return isMobile; + } + + public void setIsMobile(@javax.annotation.Nullable Boolean isMobile) { + this.isMobile = isMobile; + } + + + 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nullable String platform) { + this.platform = platform; + } + + + public CurrentUserPlatformHistoryInner recorded(@javax.annotation.Nullable OffsetDateTime recorded) { + this.recorded = recorded; + return this; + } + + /** + * Get recorded + * @return recorded + */ + @javax.annotation.Nullable + public OffsetDateTime getRecorded() { + return recorded; + } + + public void setRecorded(@javax.annotation.Nullable OffsetDateTime recorded) { + this.recorded = recorded; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CurrentUserPlatformHistoryInner currentUserPlatformHistoryInner = (CurrentUserPlatformHistoryInner) o; + return Objects.equals(this.isMobile, currentUserPlatformHistoryInner.isMobile) && + Objects.equals(this.platform, currentUserPlatformHistoryInner.platform) && + Objects.equals(this.recorded, currentUserPlatformHistoryInner.recorded); + } + + @Override + public int hashCode() { + return Objects.hash(isMobile, platform, recorded); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CurrentUserPlatformHistoryInner {\n"); + sb.append(" isMobile: ").append(toIndentedString(isMobile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" recorded: ").append(toIndentedString(recorded)).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("isMobile", "platform", "recorded")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CurrentUserPlatformHistoryInner.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 `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(java.util.Locale.ROOT, "Expected the field `platform` to be a primitive type in the JSON string but got `%s`", jsonObj.get("platform").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CurrentUserPlatformHistoryInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CurrentUserPlatformHistoryInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CurrentUserPlatformHistoryInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CurrentUserPlatformHistoryInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CurrentUserPlatformHistoryInner read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..09d97a32 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/CurrentUserPresence.java @@ -0,0 +1,668 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * CurrentUserPresence + */ +@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) + @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) + @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(@javax.annotation.Nullable String avatarThumbnail) { + this.avatarThumbnail = avatarThumbnail; + return this; + } + + /** + * Get avatarThumbnail + * @return avatarThumbnail + */ + @javax.annotation.Nullable + public String getAvatarThumbnail() { + return avatarThumbnail; + } + + public void setAvatarThumbnail(@javax.annotation.Nullable String avatarThumbnail) { + this.avatarThumbnail = avatarThumbnail; + } + + + public CurrentUserPresence currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + return this; + } + + public CurrentUserPresence addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } + this.currentAvatarTags.add(currentAvatarTagsItem); + return this; + } + + /** + * Get currentAvatarTags + * @return currentAvatarTags + */ + @javax.annotation.Nullable + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + public CurrentUserPresence debugflag(@javax.annotation.Nullable String debugflag) { + this.debugflag = debugflag; + return this; + } + + /** + * Get debugflag + * @return debugflag + */ + @javax.annotation.Nullable + public String getDebugflag() { + return debugflag; + } + + public void setDebugflag(@javax.annotation.Nullable String debugflag) { + this.debugflag = debugflag; + } + + + public CurrentUserPresence 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 CurrentUserPresence groups(@javax.annotation.Nullable List groups) { + this.groups = groups; + return this; + } + + public CurrentUserPresence addGroupsItem(String groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Get groups + * @return groups + */ + @javax.annotation.Nullable + public List getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nullable List groups) { + this.groups = groups; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public CurrentUserPresence instance(@javax.annotation.Nullable String instance) { + this.instance = instance; + return this; + } + + /** + * Get instance + * @return instance + */ + @javax.annotation.Nullable + public String getInstance() { + return instance; + } + + public void setInstance(@javax.annotation.Nullable String instance) { + this.instance = instance; + } + + + 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 + public String getInstanceType() { + return instanceType; + } + + public void setInstanceType(@javax.annotation.Nullable String instanceType) { + this.instanceType = instanceType; + } + + + public CurrentUserPresence isRejoining(@javax.annotation.Nullable String isRejoining) { + this.isRejoining = isRejoining; + return this; + } + + /** + * Get isRejoining + * @return isRejoining + */ + @javax.annotation.Nullable + public String getIsRejoining() { + return isRejoining; + } + + public void setIsRejoining(@javax.annotation.Nullable String isRejoining) { + this.isRejoining = isRejoining; + } + + + 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nullable String platform) { + this.platform = platform; + } + + + public CurrentUserPresence profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + return this; + } + + /** + * Get profilePicOverride + * @return profilePicOverride + */ + @javax.annotation.Nullable + public String getProfilePicOverride() { + return profilePicOverride; + } + + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + } + + + public CurrentUserPresence status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * either a UserStatus or empty string + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + + public CurrentUserPresence 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 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 + public String getTravelingToWorld() { + return travelingToWorld; + } + + public void setTravelingToWorld(@javax.annotation.Nullable String travelingToWorld) { + this.travelingToWorld = travelingToWorld; + } + + + public CurrentUserPresence userIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + return this; + } + + /** + * Get userIcon + * @return userIcon + */ + @javax.annotation.Nullable + public String getUserIcon() { + return userIcon; + } + + public void setUserIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + } + + + 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 + public String getWorld() { + return world; + } + + public void setWorld(@javax.annotation.Nullable String world) { + this.world = world; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CurrentUserPresence currentUserPresence = (CurrentUserPresence) o; + return Objects.equals(this.avatarThumbnail, currentUserPresence.avatarThumbnail) && + Objects.equals(this.currentAvatarTags, currentUserPresence.currentAvatarTags) && + Objects.equals(this.debugflag, currentUserPresence.debugflag) && + Objects.equals(this.displayName, currentUserPresence.displayName) && + Objects.equals(this.groups, currentUserPresence.groups) && + Objects.equals(this.id, currentUserPresence.id) && + Objects.equals(this.instance, currentUserPresence.instance) && + Objects.equals(this.instanceType, currentUserPresence.instanceType) && + Objects.equals(this.isRejoining, currentUserPresence.isRejoining) && + Objects.equals(this.platform, currentUserPresence.platform) && + Objects.equals(this.profilePicOverride, currentUserPresence.profilePicOverride) && + Objects.equals(this.status, currentUserPresence.status) && + Objects.equals(this.travelingToInstance, currentUserPresence.travelingToInstance) && + Objects.equals(this.travelingToWorld, currentUserPresence.travelingToWorld) && + Objects.equals(this.userIcon, currentUserPresence.userIcon) && + Objects.equals(this.world, currentUserPresence.world); + } + + 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(avatarThumbnail, currentAvatarTags, debugflag, displayName, groups, id, instance, instanceType, isRejoining, platform, profilePicOverride, status, travelingToInstance, travelingToWorld, userIcon, world); + } + + 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 CurrentUserPresence {\n"); + sb.append(" avatarThumbnail: ").append(toIndentedString(avatarThumbnail)).append("\n"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); + sb.append(" debugflag: ").append(toIndentedString(debugflag)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" instanceType: ").append(toIndentedString(instanceType)).append("\n"); + sb.append(" isRejoining: ").append(toIndentedString(isRejoining)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" travelingToInstance: ").append(toIndentedString(travelingToInstance)).append("\n"); + sb.append(" travelingToWorld: ").append(toIndentedString(travelingToWorld)).append("\n"); + sb.append(" userIcon: ").append(toIndentedString(userIcon)).append("\n"); + sb.append(" world: ").append(toIndentedString(world)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CurrentUserPresence.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 `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(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").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(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(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").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(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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `world` to be a primitive type in the JSON string but got `%s`", jsonObj.get("world").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CurrentUserPresence.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CurrentUserPresence' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CurrentUserPresence.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CurrentUserPresence value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CurrentUserPresence read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..9f0c2e64 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/DeclineGroupInviteRequest.java @@ -0,0 +1,198 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * DeclineGroupInviteRequest + */ +@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(@javax.annotation.Nullable Boolean block) { + this.block = block; + return this; + } + + /** + * Get block + * @return block + */ + @javax.annotation.Nullable + public Boolean getBlock() { + return block; + } + + public void setBlock(@javax.annotation.Nullable Boolean block) { + this.block = block; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeclineGroupInviteRequest declineGroupInviteRequest = (DeclineGroupInviteRequest) o; + return Objects.equals(this.block, declineGroupInviteRequest.block); + } + + @Override + public int hashCode() { + return Objects.hash(block); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeclineGroupInviteRequest {\n"); + sb.append(" block: ").append(toIndentedString(block)).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("block")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DeclineGroupInviteRequest.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 `DeclineGroupInviteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeclineGroupInviteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeclineGroupInviteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeclineGroupInviteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeclineGroupInviteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DeclineGroupInviteRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 a2787067..cc302212 100644 --- a/src/main/java/io/github/vrchatapi/model/DeveloperType.java +++ b/src/main/java/io/github/vrchatapi/model/DeveloperType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,13 +28,13 @@ @JsonAdapter(DeveloperType.Adapter.class) public enum DeveloperType { - NONE("none"), + INTERNAL("internal"), - TRUSTED("trusted"), + MODERATOR("moderator"), - INTERNAL("internal"), + NONE("none"), - MODERATOR("moderator"); + TRUSTED("trusted"); private String value; @@ -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 new file mode 100644 index 00000000..395a0e2e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Disable2FAResult.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Disable2FAResult + */ +@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(@javax.annotation.Nonnull Boolean removed) { + this.removed = removed; + return this; + } + + /** + * Get removed + * @return removed + */ + @javax.annotation.Nonnull + public Boolean getRemoved() { + return removed; + } + + public void setRemoved(@javax.annotation.Nonnull Boolean removed) { + this.removed = removed; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Disable2FAResult disable2FAResult = (Disable2FAResult) o; + return Objects.equals(this.removed, disable2FAResult.removed); + } + + @Override + public int hashCode() { + return Objects.hash(removed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Disable2FAResult {\n"); + sb.append(" removed: ").append(toIndentedString(removed)).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("removed")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("removed")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Disable2FAResult.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Disable2FAResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Disable2FAResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Disable2FAResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Disable2FAResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Disable2FAResult read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..20474875 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/DiscordDetails.java @@ -0,0 +1,230 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * + */ +@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(@javax.annotation.Nullable String globalName) { + this.globalName = globalName; + return this; + } + + /** + * Get globalName + * @return globalName + */ + @javax.annotation.Nullable + public String getGlobalName() { + return globalName; + } + + public void setGlobalName(@javax.annotation.Nullable String globalName) { + this.globalName = globalName; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiscordDetails discordDetails = (DiscordDetails) o; + return Objects.equals(this.globalName, discordDetails.globalName) && + Objects.equals(this.id, discordDetails.id); + } + + @Override + public int hashCode() { + return Objects.hash(globalName, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DiscordDetails {\n"); + sb.append(" globalName: ").append(toIndentedString(globalName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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("global_name", "id")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DiscordDetails.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 `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(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(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DiscordDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DiscordDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DiscordDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DiscordDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DiscordDetails read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/DownloadURLList.java b/src/main/java/io/github/vrchatapi/model/DownloadURLList.java deleted file mode 100644 index 5359f29f..00000000 --- a/src/main/java/io/github/vrchatapi/model/DownloadURLList.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * VRChat API Documentation - * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org - * - * 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; - -/** - * Download links for various development assets. - */ -@ApiModel(description = "Download links for various development assets.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DownloadURLList { - public static final String SERIALIZED_NAME_SDK2 = "sdk2"; - @SerializedName(SERIALIZED_NAME_SDK2) - private String sdk2; - - public static final String SERIALIZED_NAME_SDK3_AVATARS = "sdk3-avatars"; - @SerializedName(SERIALIZED_NAME_SDK3_AVATARS) - private String sdk3Avatars; - - public static final String SERIALIZED_NAME_SDK3_WORLDS = "sdk3-worlds"; - @SerializedName(SERIALIZED_NAME_SDK3_WORLDS) - private String sdk3Worlds; - - - public DownloadURLList sdk2(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) { - this.sdk2 = sdk2; - } - - - public DownloadURLList sdk3Avatars(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) { - this.sdk3Avatars = sdk3Avatars; - } - - - public DownloadURLList sdk3Worlds(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) { - this.sdk3Worlds = sdk3Worlds; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DownloadURLList downloadURLList = (DownloadURLList) o; - return Objects.equals(this.sdk2, downloadURLList.sdk2) && - Objects.equals(this.sdk3Avatars, downloadURLList.sdk3Avatars) && - Objects.equals(this.sdk3Worlds, downloadURLList.sdk3Worlds); - } - - @Override - public int hashCode() { - return Objects.hash(sdk2, sdk3Avatars, sdk3Worlds); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DownloadURLList {\n"); - sb.append(" sdk2: ").append(toIndentedString(sdk2)).append("\n"); - sb.append(" sdk3Avatars: ").append(toIndentedString(sdk3Avatars)).append("\n"); - sb.append(" sdk3Worlds: ").append(toIndentedString(sdk3Worlds)).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 "); - } - -} - diff --git a/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java b/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java index aed878d5..c7008103 100644 --- a/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java +++ b/src/main/java/io/github/vrchatapi/model/DynamicContentRow.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,239 +13,239 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } - /** - * Usually \"ThisPlatformSupported\", but can also be other values such as \"all\" or platform specific identifiers. + /** + * 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(required = true, value = "Usually \"ThisPlatformSupported\", but can also be other values such as \"all\" or platform specific identifiers.") - 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; } - /** - * Tag to filter content for this row. + /** + * 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 = "Tag to filter content for this row.") - 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -291,11 +291,119 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("index", "name", "platform", "sortHeading", "sortOrder", "sortOwnership", "tag", "type")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!DynamicContentRow.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 `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 (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(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(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(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(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(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(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(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 (!DynamicContentRow.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DynamicContentRow' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DynamicContentRow.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DynamicContentRow value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DynamicContentRow read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..936073c4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EarningsMetrics.java @@ -0,0 +1,279 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.EarningsMetricsTotals; +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; + +/** + * EarningsMetrics + */ +@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(@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 + public List getBreakdown() { + return breakdown; + } + + public void setBreakdown(@javax.annotation.Nonnull List breakdown) { + this.breakdown = breakdown; + } + + + 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 + public String getSellerId() { + return sellerId; + } + + public void setSellerId(@javax.annotation.Nonnull String sellerId) { + this.sellerId = sellerId; + } + + + public EarningsMetrics totals(@javax.annotation.Nonnull EarningsMetricsTotals totals) { + this.totals = totals; + return this; + } + + /** + * Get totals + * @return totals + */ + @javax.annotation.Nonnull + public EarningsMetricsTotals getTotals() { + return totals; + } + + public void setTotals(@javax.annotation.Nonnull EarningsMetricsTotals totals) { + this.totals = totals; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EarningsMetrics earningsMetrics = (EarningsMetrics) o; + return Objects.equals(this.breakdown, earningsMetrics.breakdown) && + Objects.equals(this.sellerId, earningsMetrics.sellerId) && + Objects.equals(this.totals, earningsMetrics.totals); + } + + @Override + public int hashCode() { + return Objects.hash(breakdown, sellerId, totals); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EarningsMetrics {\n"); + sb.append(" breakdown: ").append(toIndentedString(breakdown)).append("\n"); + sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n"); + sb.append(" totals: ").append(toIndentedString(totals)).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("breakdown", "sellerId", "totals")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("breakdown", "sellerId", "totals")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EarningsMetrics.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 `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 (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(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(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.validateJsonElement(jsonObj.get("totals")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EarningsMetrics.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EarningsMetrics' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EarningsMetrics.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EarningsMetrics value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EarningsMetrics read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..8160c242 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EarningsMetricsTotals.java @@ -0,0 +1,314 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * EarningsMetricsTotals + */ +@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(@javax.annotation.Nonnull Integer otpEarnings) { + this.otpEarnings = otpEarnings; + return this; + } + + /** + * Get otpEarnings + * minimum: 0 + * @return otpEarnings + */ + @javax.annotation.Nonnull + public Integer getOtpEarnings() { + return otpEarnings; + } + + public void setOtpEarnings(@javax.annotation.Nonnull Integer otpEarnings) { + this.otpEarnings = otpEarnings; + } + + + public EarningsMetricsTotals otpPurchaseCount(@javax.annotation.Nonnull Integer otpPurchaseCount) { + this.otpPurchaseCount = otpPurchaseCount; + return this; + } + + /** + * Get otpPurchaseCount + * minimum: 0 + * @return otpPurchaseCount + */ + @javax.annotation.Nonnull + public Integer getOtpPurchaseCount() { + return otpPurchaseCount; + } + + public void setOtpPurchaseCount(@javax.annotation.Nonnull Integer otpPurchaseCount) { + this.otpPurchaseCount = otpPurchaseCount; + } + + + public EarningsMetricsTotals subscriberEarnings(@javax.annotation.Nonnull Integer subscriberEarnings) { + this.subscriberEarnings = subscriberEarnings; + return this; + } + + /** + * Get subscriberEarnings + * minimum: 0 + * @return subscriberEarnings + */ + @javax.annotation.Nonnull + public Integer getSubscriberEarnings() { + return subscriberEarnings; + } + + public void setSubscriberEarnings(@javax.annotation.Nonnull Integer subscriberEarnings) { + this.subscriberEarnings = subscriberEarnings; + } + + + public EarningsMetricsTotals subscriberMonths(@javax.annotation.Nonnull Integer subscriberMonths) { + this.subscriberMonths = subscriberMonths; + return this; + } + + /** + * Get subscriberMonths + * minimum: 0 + * @return subscriberMonths + */ + @javax.annotation.Nonnull + public Integer getSubscriberMonths() { + return subscriberMonths; + } + + public void setSubscriberMonths(@javax.annotation.Nonnull Integer subscriberMonths) { + this.subscriberMonths = subscriberMonths; + } + + + public EarningsMetricsTotals totalEarnings(@javax.annotation.Nonnull Integer totalEarnings) { + this.totalEarnings = totalEarnings; + return this; + } + + /** + * Get totalEarnings + * minimum: 0 + * @return totalEarnings + */ + @javax.annotation.Nonnull + public Integer getTotalEarnings() { + return totalEarnings; + } + + public void setTotalEarnings(@javax.annotation.Nonnull Integer totalEarnings) { + this.totalEarnings = totalEarnings; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EarningsMetricsTotals earningsMetricsTotals = (EarningsMetricsTotals) o; + return Objects.equals(this.otpEarnings, earningsMetricsTotals.otpEarnings) && + Objects.equals(this.otpPurchaseCount, earningsMetricsTotals.otpPurchaseCount) && + Objects.equals(this.subscriberEarnings, earningsMetricsTotals.subscriberEarnings) && + Objects.equals(this.subscriberMonths, earningsMetricsTotals.subscriberMonths) && + Objects.equals(this.totalEarnings, earningsMetricsTotals.totalEarnings); + } + + @Override + public int hashCode() { + return Objects.hash(otpEarnings, otpPurchaseCount, subscriberEarnings, subscriberMonths, totalEarnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EarningsMetricsTotals {\n"); + sb.append(" otpEarnings: ").append(toIndentedString(otpEarnings)).append("\n"); + sb.append(" otpPurchaseCount: ").append(toIndentedString(otpPurchaseCount)).append("\n"); + sb.append(" subscriberEarnings: ").append(toIndentedString(subscriberEarnings)).append("\n"); + sb.append(" subscriberMonths: ").append(toIndentedString(subscriberMonths)).append("\n"); + sb.append(" totalEarnings: ").append(toIndentedString(totalEarnings)).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("otpEarnings", "otpPurchaseCount", "subscriberEarnings", "subscriberMonths", "totalEarnings")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("otpEarnings", "otpPurchaseCount", "subscriberEarnings", "subscriberMonths", "totalEarnings")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EarningsMetricsTotals.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EarningsMetricsTotals.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EarningsMetricsTotals' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EarningsMetricsTotals.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EarningsMetricsTotals value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EarningsMetricsTotals read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..cd126098 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EconomyAccount.java @@ -0,0 +1,551 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * EconomyAccount + */ +@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(@javax.annotation.Nullable OffsetDateTime accountActivatedOn) { + this.accountActivatedOn = accountActivatedOn; + return this; + } + + /** + * Get accountActivatedOn + * @return accountActivatedOn + */ + @javax.annotation.Nullable + public OffsetDateTime getAccountActivatedOn() { + return accountActivatedOn; + } + + public void setAccountActivatedOn(@javax.annotation.Nullable OffsetDateTime accountActivatedOn) { + this.accountActivatedOn = accountActivatedOn; + } + + + public EconomyAccount accountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + */ + @javax.annotation.Nullable + public String getAccountId() { + return accountId; + } + + public void setAccountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; + } + + + public EconomyAccount accountSellerRegisteredOn(@javax.annotation.Nullable OffsetDateTime accountSellerRegisteredOn) { + this.accountSellerRegisteredOn = accountSellerRegisteredOn; + return this; + } + + /** + * Get accountSellerRegisteredOn + * @return accountSellerRegisteredOn + */ + @javax.annotation.Nullable + public OffsetDateTime getAccountSellerRegisteredOn() { + return accountSellerRegisteredOn; + } + + public void setAccountSellerRegisteredOn(@javax.annotation.Nullable OffsetDateTime accountSellerRegisteredOn) { + this.accountSellerRegisteredOn = accountSellerRegisteredOn; + } + + + public EconomyAccount accountSellerStatus(@javax.annotation.Nullable String accountSellerStatus) { + this.accountSellerStatus = accountSellerStatus; + return this; + } + + /** + * Get accountSellerStatus + * @return accountSellerStatus + */ + @javax.annotation.Nullable + public String getAccountSellerStatus() { + return accountSellerStatus; + } + + public void setAccountSellerStatus(@javax.annotation.Nullable String accountSellerStatus) { + this.accountSellerStatus = accountSellerStatus; + } + + + public EconomyAccount blocked(@javax.annotation.Nonnull Boolean blocked) { + this.blocked = blocked; + return this; + } + + /** + * Get blocked + * @return blocked + */ + @javax.annotation.Nonnull + public Boolean getBlocked() { + return blocked; + } + + public void setBlocked(@javax.annotation.Nonnull Boolean blocked) { + this.blocked = blocked; + } + + + public EconomyAccount canEarn(@javax.annotation.Nullable Boolean canEarn) { + this.canEarn = canEarn; + return this; + } + + /** + * Get canEarn + * @return canEarn + */ + @javax.annotation.Nullable + public Boolean getCanEarn() { + return canEarn; + } + + public void setCanEarn(@javax.annotation.Nullable Boolean canEarn) { + this.canEarn = canEarn; + } + + + public EconomyAccount canPayout(@javax.annotation.Nullable Boolean canPayout) { + this.canPayout = canPayout; + return this; + } + + /** + * Get canPayout + * @return canPayout + */ + @javax.annotation.Nullable + public Boolean getCanPayout() { + return canPayout; + } + + public void setCanPayout(@javax.annotation.Nullable Boolean canPayout) { + this.canPayout = canPayout; + } + + + public EconomyAccount canSpend(@javax.annotation.Nonnull Boolean canSpend) { + this.canSpend = canSpend; + return this; + } + + /** + * Get canSpend + * @return canSpend + */ + @javax.annotation.Nonnull + public Boolean getCanSpend() { + return canSpend; + } + + public void setCanSpend(@javax.annotation.Nonnull Boolean canSpend) { + this.canSpend = canSpend; + } + + + public EconomyAccount skrillEmail(@javax.annotation.Nullable String skrillEmail) { + this.skrillEmail = skrillEmail; + return this; + } + + /** + * Get skrillEmail + * @return skrillEmail + */ + @javax.annotation.Nullable + public String getSkrillEmail() { + return skrillEmail; + } + + public void setSkrillEmail(@javax.annotation.Nullable String skrillEmail) { + this.skrillEmail = skrillEmail; + } + + + public EconomyAccount source(@javax.annotation.Nonnull String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @javax.annotation.Nonnull + public String getSource() { + return source; + } + + public void setSource(@javax.annotation.Nonnull String source) { + this.source = source; + } + + + public EconomyAccount tiliaId(@javax.annotation.Nullable String tiliaId) { + this.tiliaId = tiliaId; + return this; + } + + /** + * Get tiliaId + * @return tiliaId + */ + @javax.annotation.Nullable + public String getTiliaId() { + return tiliaId; + } + + public void setTiliaId(@javax.annotation.Nullable String tiliaId) { + this.tiliaId = tiliaId; + } + + + public EconomyAccount tiliaType(@javax.annotation.Nullable String tiliaType) { + this.tiliaType = tiliaType; + return this; + } + + /** + * Get tiliaType + * @return tiliaType + */ + @javax.annotation.Nullable + public String getTiliaType() { + return tiliaType; + } + + public void setTiliaType(@javax.annotation.Nullable String tiliaType) { + this.tiliaType = tiliaType; + } + + + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EconomyAccount economyAccount = (EconomyAccount) o; + return Objects.equals(this.accountActivatedOn, economyAccount.accountActivatedOn) && + Objects.equals(this.accountId, economyAccount.accountId) && + Objects.equals(this.accountSellerRegisteredOn, economyAccount.accountSellerRegisteredOn) && + Objects.equals(this.accountSellerStatus, economyAccount.accountSellerStatus) && + Objects.equals(this.blocked, economyAccount.blocked) && + Objects.equals(this.canEarn, economyAccount.canEarn) && + Objects.equals(this.canPayout, economyAccount.canPayout) && + Objects.equals(this.canSpend, economyAccount.canSpend) && + Objects.equals(this.skrillEmail, economyAccount.skrillEmail) && + Objects.equals(this.source, economyAccount.source) && + Objects.equals(this.tiliaId, economyAccount.tiliaId) && + Objects.equals(this.tiliaType, economyAccount.tiliaType) && + Objects.equals(this.userId, economyAccount.userId); + } + + 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(accountActivatedOn, accountId, accountSellerRegisteredOn, accountSellerStatus, blocked, canEarn, canPayout, canSpend, skrillEmail, source, tiliaId, tiliaType, userId); + } + + 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 EconomyAccount {\n"); + sb.append(" accountActivatedOn: ").append(toIndentedString(accountActivatedOn)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" accountSellerRegisteredOn: ").append(toIndentedString(accountSellerRegisteredOn)).append("\n"); + sb.append(" accountSellerStatus: ").append(toIndentedString(accountSellerStatus)).append("\n"); + sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n"); + sb.append(" canEarn: ").append(toIndentedString(canEarn)).append("\n"); + sb.append(" canPayout: ").append(toIndentedString(canPayout)).append("\n"); + sb.append(" canSpend: ").append(toIndentedString(canSpend)).append("\n"); + sb.append(" skrillEmail: ").append(toIndentedString(skrillEmail)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" tiliaId: ").append(toIndentedString(tiliaId)).append("\n"); + sb.append(" tiliaType: ").append(toIndentedString(tiliaType)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EconomyAccount.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 `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 (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("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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EconomyAccount.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EconomyAccount' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EconomyAccount.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EconomyAccount value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EconomyAccount read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..38fb3ee4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EconomyBalances.java @@ -0,0 +1,257 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * EconomyBalances + */ +@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(@javax.annotation.Nonnull Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + */ + @javax.annotation.Nonnull + public Integer getBalance() { + return balance; + } + + public void setBalance(@javax.annotation.Nonnull Integer balance) { + this.balance = balance; + } + + + public EconomyBalances earnings(@javax.annotation.Nonnull Integer earnings) { + this.earnings = earnings; + return this; + } + + /** + * Get earnings + * @return earnings + */ + @javax.annotation.Nonnull + public Integer getEarnings() { + return earnings; + } + + public void setEarnings(@javax.annotation.Nonnull Integer earnings) { + this.earnings = earnings; + } + + + public EconomyBalances standard(@javax.annotation.Nonnull Integer standard) { + this.standard = standard; + return this; + } + + /** + * Get standard + * @return standard + */ + @javax.annotation.Nonnull + public Integer getStandard() { + return standard; + } + + public void setStandard(@javax.annotation.Nonnull Integer standard) { + this.standard = standard; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EconomyBalances economyBalances = (EconomyBalances) o; + return Objects.equals(this.balance, economyBalances.balance) && + Objects.equals(this.earnings, economyBalances.earnings) && + Objects.equals(this.standard, economyBalances.standard); + } + + @Override + public int hashCode() { + return Objects.hash(balance, earnings, standard); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EconomyBalances {\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" earnings: ").append(toIndentedString(earnings)).append("\n"); + sb.append(" standard: ").append(toIndentedString(standard)).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("balance", "earnings", "standard")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("balance", "earnings", "standard")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EconomyBalances.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EconomyBalances.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EconomyBalances' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EconomyBalances.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EconomyBalances value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EconomyBalances read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..0de6635d --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayout.java @@ -0,0 +1,623 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * EconomyPayout + */ +@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(@javax.annotation.Nonnull Integer paymentAmountTokens) { + this.paymentAmountTokens = paymentAmountTokens; + return this; + } + + /** + * Get paymentAmountTokens + * @return paymentAmountTokens + */ + @javax.annotation.Nonnull + public Integer getPaymentAmountTokens() { + return paymentAmountTokens; + } + + public void setPaymentAmountTokens(@javax.annotation.Nonnull Integer paymentAmountTokens) { + this.paymentAmountTokens = paymentAmountTokens; + } + + + public EconomyPayout paymentAmountUsd(@javax.annotation.Nonnull Integer paymentAmountUsd) { + this.paymentAmountUsd = paymentAmountUsd; + return this; + } + + /** + * Get paymentAmountUsd + * @return paymentAmountUsd + */ + @javax.annotation.Nonnull + public Integer getPaymentAmountUsd() { + return paymentAmountUsd; + } + + public void setPaymentAmountUsd(@javax.annotation.Nonnull Integer paymentAmountUsd) { + this.paymentAmountUsd = paymentAmountUsd; + } + + + public EconomyPayout paymentCreated(@javax.annotation.Nonnull OffsetDateTime paymentCreated) { + this.paymentCreated = paymentCreated; + return this; + } + + /** + * Get paymentCreated + * @return paymentCreated + */ + @javax.annotation.Nonnull + public OffsetDateTime getPaymentCreated() { + return paymentCreated; + } + + public void setPaymentCreated(@javax.annotation.Nonnull OffsetDateTime paymentCreated) { + this.paymentCreated = paymentCreated; + } + + + public EconomyPayout paymentOutId(@javax.annotation.Nonnull Integer paymentOutId) { + this.paymentOutId = paymentOutId; + return this; + } + + /** + * Get paymentOutId + * @return paymentOutId + */ + @javax.annotation.Nonnull + public Integer getPaymentOutId() { + return paymentOutId; + } + + public void setPaymentOutId(@javax.annotation.Nonnull Integer paymentOutId) { + this.paymentOutId = paymentOutId; + } + + + public EconomyPayout paymentPlatform(@javax.annotation.Nonnull String paymentPlatform) { + this.paymentPlatform = paymentPlatform; + return this; + } + + /** + * Get paymentPlatform + * @return paymentPlatform + */ + @javax.annotation.Nonnull + public String getPaymentPlatform() { + return paymentPlatform; + } + + public void setPaymentPlatform(@javax.annotation.Nonnull String paymentPlatform) { + this.paymentPlatform = paymentPlatform; + } + + + public EconomyPayout paymentPlatformCode(@javax.annotation.Nonnull Integer paymentPlatformCode) { + this.paymentPlatformCode = paymentPlatformCode; + return this; + } + + /** + * Get paymentPlatformCode + * @return paymentPlatformCode + */ + @javax.annotation.Nonnull + public Integer getPaymentPlatformCode() { + return paymentPlatformCode; + } + + public void setPaymentPlatformCode(@javax.annotation.Nonnull Integer paymentPlatformCode) { + this.paymentPlatformCode = paymentPlatformCode; + } + + + public EconomyPayout paymentStatus(@javax.annotation.Nonnull String paymentStatus) { + this.paymentStatus = paymentStatus; + return this; + } + + /** + * Get paymentStatus + * @return paymentStatus + */ + @javax.annotation.Nonnull + public String getPaymentStatus() { + return paymentStatus; + } + + public void setPaymentStatus(@javax.annotation.Nonnull String paymentStatus) { + this.paymentStatus = paymentStatus; + } + + + public EconomyPayout paymentStatusCode(@javax.annotation.Nonnull Integer paymentStatusCode) { + this.paymentStatusCode = paymentStatusCode; + return this; + } + + /** + * Get paymentStatusCode + * @return paymentStatusCode + */ + @javax.annotation.Nonnull + public Integer getPaymentStatusCode() { + return paymentStatusCode; + } + + public void setPaymentStatusCode(@javax.annotation.Nonnull Integer paymentStatusCode) { + this.paymentStatusCode = paymentStatusCode; + } + + + public EconomyPayout paymentUpdated(@javax.annotation.Nonnull OffsetDateTime paymentUpdated) { + this.paymentUpdated = paymentUpdated; + return this; + } + + /** + * Get paymentUpdated + * @return paymentUpdated + */ + @javax.annotation.Nonnull + public OffsetDateTime getPaymentUpdated() { + return paymentUpdated; + } + + public void setPaymentUpdated(@javax.annotation.Nonnull OffsetDateTime paymentUpdated) { + this.paymentUpdated = paymentUpdated; + } + + + public EconomyPayout platformPaymentGuid(@javax.annotation.Nullable String platformPaymentGuid) { + this.platformPaymentGuid = platformPaymentGuid; + return this; + } + + /** + * Get platformPaymentGuid + * @return platformPaymentGuid + */ + @javax.annotation.Nullable + public String getPlatformPaymentGuid() { + return platformPaymentGuid; + } + + public void setPlatformPaymentGuid(@javax.annotation.Nullable String platformPaymentGuid) { + this.platformPaymentGuid = platformPaymentGuid; + } + + + public EconomyPayout platformPaymentMethod(@javax.annotation.Nullable String platformPaymentMethod) { + this.platformPaymentMethod = platformPaymentMethod; + return this; + } + + /** + * Get platformPaymentMethod + * @return platformPaymentMethod + */ + @javax.annotation.Nullable + public String getPlatformPaymentMethod() { + return platformPaymentMethod; + } + + public void setPlatformPaymentMethod(@javax.annotation.Nullable String platformPaymentMethod) { + this.platformPaymentMethod = platformPaymentMethod; + } + + + public EconomyPayout reversalDate(@javax.annotation.Nullable OffsetDateTime reversalDate) { + this.reversalDate = reversalDate; + return this; + } + + /** + * Get reversalDate + * @return reversalDate + */ + @javax.annotation.Nullable + public OffsetDateTime getReversalDate() { + return reversalDate; + } + + public void setReversalDate(@javax.annotation.Nullable OffsetDateTime reversalDate) { + this.reversalDate = reversalDate; + } + + + public EconomyPayout reversalReason(@javax.annotation.Nullable String reversalReason) { + this.reversalReason = reversalReason; + return this; + } + + /** + * Get reversalReason + * @return reversalReason + */ + @javax.annotation.Nullable + public String getReversalReason() { + return reversalReason; + } + + public void setReversalReason(@javax.annotation.Nullable String reversalReason) { + this.reversalReason = reversalReason; + } + + + public EconomyPayout reversalReasonCode(@javax.annotation.Nullable Integer reversalReasonCode) { + this.reversalReasonCode = reversalReasonCode; + return this; + } + + /** + * Get reversalReasonCode + * @return reversalReasonCode + */ + @javax.annotation.Nullable + public Integer getReversalReasonCode() { + return reversalReasonCode; + } + + public void setReversalReasonCode(@javax.annotation.Nullable Integer reversalReasonCode) { + this.reversalReasonCode = reversalReasonCode; + } + + + public EconomyPayout reversalTransactionId(@javax.annotation.Nullable Integer reversalTransactionId) { + this.reversalTransactionId = reversalTransactionId; + return this; + } + + /** + * Get reversalTransactionId + * @return reversalTransactionId + */ + @javax.annotation.Nullable + public Integer getReversalTransactionId() { + return reversalTransactionId; + } + + public void setReversalTransactionId(@javax.annotation.Nullable Integer reversalTransactionId) { + this.reversalTransactionId = reversalTransactionId; + } + + + public EconomyPayout transactionId(@javax.annotation.Nonnull Integer transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * Get transactionId + * @return transactionId + */ + @javax.annotation.Nonnull + public Integer getTransactionId() { + return transactionId; + } + + public void setTransactionId(@javax.annotation.Nonnull Integer transactionId) { + this.transactionId = transactionId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EconomyPayout economyPayout = (EconomyPayout) o; + return Objects.equals(this.paymentAmountTokens, economyPayout.paymentAmountTokens) && + Objects.equals(this.paymentAmountUsd, economyPayout.paymentAmountUsd) && + Objects.equals(this.paymentCreated, economyPayout.paymentCreated) && + Objects.equals(this.paymentOutId, economyPayout.paymentOutId) && + Objects.equals(this.paymentPlatform, economyPayout.paymentPlatform) && + Objects.equals(this.paymentPlatformCode, economyPayout.paymentPlatformCode) && + Objects.equals(this.paymentStatus, economyPayout.paymentStatus) && + Objects.equals(this.paymentStatusCode, economyPayout.paymentStatusCode) && + Objects.equals(this.paymentUpdated, economyPayout.paymentUpdated) && + Objects.equals(this.platformPaymentGuid, economyPayout.platformPaymentGuid) && + Objects.equals(this.platformPaymentMethod, economyPayout.platformPaymentMethod) && + Objects.equals(this.reversalDate, economyPayout.reversalDate) && + Objects.equals(this.reversalReason, economyPayout.reversalReason) && + Objects.equals(this.reversalReasonCode, economyPayout.reversalReasonCode) && + Objects.equals(this.reversalTransactionId, economyPayout.reversalTransactionId) && + Objects.equals(this.transactionId, economyPayout.transactionId); + } + + 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(paymentAmountTokens, paymentAmountUsd, paymentCreated, paymentOutId, paymentPlatform, paymentPlatformCode, paymentStatus, paymentStatusCode, paymentUpdated, platformPaymentGuid, platformPaymentMethod, reversalDate, reversalReason, reversalReasonCode, reversalTransactionId, transactionId); + } + + 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 EconomyPayout {\n"); + sb.append(" paymentAmountTokens: ").append(toIndentedString(paymentAmountTokens)).append("\n"); + sb.append(" paymentAmountUsd: ").append(toIndentedString(paymentAmountUsd)).append("\n"); + sb.append(" paymentCreated: ").append(toIndentedString(paymentCreated)).append("\n"); + sb.append(" paymentOutId: ").append(toIndentedString(paymentOutId)).append("\n"); + sb.append(" paymentPlatform: ").append(toIndentedString(paymentPlatform)).append("\n"); + sb.append(" paymentPlatformCode: ").append(toIndentedString(paymentPlatformCode)).append("\n"); + sb.append(" paymentStatus: ").append(toIndentedString(paymentStatus)).append("\n"); + sb.append(" paymentStatusCode: ").append(toIndentedString(paymentStatusCode)).append("\n"); + sb.append(" paymentUpdated: ").append(toIndentedString(paymentUpdated)).append("\n"); + sb.append(" platformPaymentGuid: ").append(toIndentedString(platformPaymentGuid)).append("\n"); + sb.append(" platformPaymentMethod: ").append(toIndentedString(platformPaymentMethod)).append("\n"); + sb.append(" reversalDate: ").append(toIndentedString(reversalDate)).append("\n"); + sb.append(" reversalReason: ").append(toIndentedString(reversalReason)).append("\n"); + sb.append(" reversalReasonCode: ").append(toIndentedString(reversalReasonCode)).append("\n"); + sb.append(" reversalTransactionId: ").append(toIndentedString(reversalTransactionId)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EconomyPayout.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `reversalReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reversalReason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EconomyPayout.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EconomyPayout' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EconomyPayout.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EconomyPayout value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EconomyPayout read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..bb0d9e45 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayoutEligibility.java @@ -0,0 +1,312 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * EconomyPayoutEligibility + */ +@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(@javax.annotation.Nonnull String issue) { + this.issue = issue; + return this; + } + + /** + * Get issue + * @return issue + */ + @javax.annotation.Nonnull + public String getIssue() { + return issue; + } + + public void setIssue(@javax.annotation.Nonnull String issue) { + this.issue = issue; + } + + + public EconomyPayoutEligibility okBalance(@javax.annotation.Nonnull Boolean okBalance) { + this.okBalance = okBalance; + return this; + } + + /** + * Get okBalance + * @return okBalance + */ + @javax.annotation.Nonnull + public Boolean getOkBalance() { + return okBalance; + } + + public void setOkBalance(@javax.annotation.Nonnull Boolean okBalance) { + this.okBalance = okBalance; + } + + + public EconomyPayoutEligibility okFrequency(@javax.annotation.Nonnull Boolean okFrequency) { + this.okFrequency = okFrequency; + return this; + } + + /** + * Get okFrequency + * @return okFrequency + */ + @javax.annotation.Nonnull + public Boolean getOkFrequency() { + return okFrequency; + } + + public void setOkFrequency(@javax.annotation.Nonnull Boolean okFrequency) { + this.okFrequency = okFrequency; + } + + + public EconomyPayoutEligibility okNotOngoing(@javax.annotation.Nonnull Boolean okNotOngoing) { + this.okNotOngoing = okNotOngoing; + return this; + } + + /** + * Get okNotOngoing + * @return okNotOngoing + */ + @javax.annotation.Nonnull + public Boolean getOkNotOngoing() { + return okNotOngoing; + } + + public void setOkNotOngoing(@javax.annotation.Nonnull Boolean okNotOngoing) { + this.okNotOngoing = okNotOngoing; + } + + + public EconomyPayoutEligibility okStanding(@javax.annotation.Nonnull Boolean okStanding) { + this.okStanding = okStanding; + return this; + } + + /** + * Get okStanding + * @return okStanding + */ + @javax.annotation.Nonnull + public Boolean getOkStanding() { + return okStanding; + } + + public void setOkStanding(@javax.annotation.Nonnull Boolean okStanding) { + this.okStanding = okStanding; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EconomyPayoutEligibility economyPayoutEligibility = (EconomyPayoutEligibility) o; + return Objects.equals(this.issue, economyPayoutEligibility.issue) && + Objects.equals(this.okBalance, economyPayoutEligibility.okBalance) && + Objects.equals(this.okFrequency, economyPayoutEligibility.okFrequency) && + Objects.equals(this.okNotOngoing, economyPayoutEligibility.okNotOngoing) && + Objects.equals(this.okStanding, economyPayoutEligibility.okStanding); + } + + @Override + public int hashCode() { + return Objects.hash(issue, okBalance, okFrequency, okNotOngoing, okStanding); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EconomyPayoutEligibility {\n"); + sb.append(" issue: ").append(toIndentedString(issue)).append("\n"); + sb.append(" okBalance: ").append(toIndentedString(okBalance)).append("\n"); + sb.append(" okFrequency: ").append(toIndentedString(okFrequency)).append("\n"); + sb.append(" okNotOngoing: ").append(toIndentedString(okNotOngoing)).append("\n"); + sb.append(" okStanding: ").append(toIndentedString(okStanding)).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("issue", "okBalance", "okFrequency", "okNotOngoing", "okStanding")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("issue", "okBalance", "okFrequency", "okNotOngoing", "okStanding")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EconomyPayoutEligibility.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 `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 (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(java.util.Locale.ROOT, "Expected the field `issue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EconomyPayoutEligibility.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EconomyPayoutEligibility' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EconomyPayoutEligibility.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EconomyPayoutEligibility value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EconomyPayoutEligibility read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ae6fb1d8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayoutList.java @@ -0,0 +1,226 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.EconomyPayout; +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; + +/** + * EconomyPayoutList + */ +@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(@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 + public List getPayouts() { + return payouts; + } + + public void setPayouts(@javax.annotation.Nonnull List payouts) { + this.payouts = payouts; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EconomyPayoutList economyPayoutList = (EconomyPayoutList) o; + return Objects.equals(this.payouts, economyPayoutList.payouts); + } + + @Override + public int hashCode() { + return Objects.hash(payouts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EconomyPayoutList {\n"); + sb.append(" payouts: ").append(toIndentedString(payouts)).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("payouts")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("payouts")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EconomyPayoutList.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 `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 (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("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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EconomyPayoutList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EconomyPayoutList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EconomyPayoutList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EconomyPayoutList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EconomyPayoutList read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..28b546c9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EconomyPayoutStatus.java @@ -0,0 +1,398 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.EconomyPayout; +import io.github.vrchatapi.model.EconomyPayoutEligibility; +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; + +/** + * EconomyPayoutStatus + */ +@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(@javax.annotation.Nonnull Integer accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * @return accountId + */ + @javax.annotation.Nonnull + public Integer getAccountId() { + return accountId; + } + + public void setAccountId(@javax.annotation.Nonnull Integer accountId) { + this.accountId = accountId; + } + + + public EconomyPayoutStatus activePayout(@javax.annotation.Nullable EconomyPayout activePayout) { + this.activePayout = activePayout; + return this; + } + + /** + * Get activePayout + * @return activePayout + */ + @javax.annotation.Nullable + public EconomyPayout getActivePayout() { + return activePayout; + } + + public void setActivePayout(@javax.annotation.Nullable EconomyPayout activePayout) { + this.activePayout = activePayout; + } + + + public EconomyPayoutStatus activePayoutCancellable(@javax.annotation.Nonnull Boolean activePayoutCancellable) { + this.activePayoutCancellable = activePayoutCancellable; + return this; + } + + /** + * Get activePayoutCancellable + * @return activePayoutCancellable + */ + @javax.annotation.Nonnull + public Boolean getActivePayoutCancellable() { + return activePayoutCancellable; + } + + public void setActivePayoutCancellable(@javax.annotation.Nonnull Boolean activePayoutCancellable) { + this.activePayoutCancellable = activePayoutCancellable; + } + + + public EconomyPayoutStatus activePayoutTiliaAmount(@javax.annotation.Nonnull Integer activePayoutTiliaAmount) { + this.activePayoutTiliaAmount = activePayoutTiliaAmount; + return this; + } + + /** + * Get activePayoutTiliaAmount + * @return activePayoutTiliaAmount + */ + @javax.annotation.Nonnull + public Integer getActivePayoutTiliaAmount() { + return activePayoutTiliaAmount; + } + + public void setActivePayoutTiliaAmount(@javax.annotation.Nonnull Integer activePayoutTiliaAmount) { + this.activePayoutTiliaAmount = activePayoutTiliaAmount; + } + + + public EconomyPayoutStatus earningsBalance(@javax.annotation.Nonnull Integer earningsBalance) { + this.earningsBalance = earningsBalance; + return this; + } + + /** + * Get earningsBalance + * @return earningsBalance + */ + @javax.annotation.Nonnull + public Integer getEarningsBalance() { + return earningsBalance; + } + + public void setEarningsBalance(@javax.annotation.Nonnull Integer earningsBalance) { + this.earningsBalance = earningsBalance; + } + + + public EconomyPayoutStatus eligibility(@javax.annotation.Nonnull EconomyPayoutEligibility eligibility) { + this.eligibility = eligibility; + return this; + } + + /** + * Get eligibility + * @return eligibility + */ + @javax.annotation.Nonnull + public EconomyPayoutEligibility getEligibility() { + return eligibility; + } + + public void setEligibility(@javax.annotation.Nonnull EconomyPayoutEligibility eligibility) { + this.eligibility = eligibility; + } + + + public EconomyPayoutStatus payoutEligible(@javax.annotation.Nonnull Boolean payoutEligible) { + this.payoutEligible = payoutEligible; + return this; + } + + /** + * Get payoutEligible + * @return payoutEligible + */ + @javax.annotation.Nonnull + public Boolean getPayoutEligible() { + return payoutEligible; + } + + public void setPayoutEligible(@javax.annotation.Nonnull Boolean payoutEligible) { + this.payoutEligible = payoutEligible; + } + + + public EconomyPayoutStatus tiliaId(@javax.annotation.Nonnull String tiliaId) { + this.tiliaId = tiliaId; + return this; + } + + /** + * Get tiliaId + * @return tiliaId + */ + @javax.annotation.Nonnull + public String getTiliaId() { + return tiliaId; + } + + public void setTiliaId(@javax.annotation.Nonnull String tiliaId) { + this.tiliaId = tiliaId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EconomyPayoutStatus economyPayoutStatus = (EconomyPayoutStatus) o; + return Objects.equals(this.accountId, economyPayoutStatus.accountId) && + Objects.equals(this.activePayout, economyPayoutStatus.activePayout) && + Objects.equals(this.activePayoutCancellable, economyPayoutStatus.activePayoutCancellable) && + Objects.equals(this.activePayoutTiliaAmount, economyPayoutStatus.activePayoutTiliaAmount) && + Objects.equals(this.earningsBalance, economyPayoutStatus.earningsBalance) && + Objects.equals(this.eligibility, economyPayoutStatus.eligibility) && + Objects.equals(this.payoutEligible, economyPayoutStatus.payoutEligible) && + Objects.equals(this.tiliaId, economyPayoutStatus.tiliaId); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, activePayout, activePayoutCancellable, activePayoutTiliaAmount, earningsBalance, eligibility, payoutEligible, tiliaId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EconomyPayoutStatus {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" activePayout: ").append(toIndentedString(activePayout)).append("\n"); + sb.append(" activePayoutCancellable: ").append(toIndentedString(activePayoutCancellable)).append("\n"); + sb.append(" activePayoutTiliaAmount: ").append(toIndentedString(activePayoutTiliaAmount)).append("\n"); + sb.append(" earningsBalance: ").append(toIndentedString(earningsBalance)).append("\n"); + sb.append(" eligibility: ").append(toIndentedString(eligibility)).append("\n"); + sb.append(" payoutEligible: ").append(toIndentedString(payoutEligible)).append("\n"); + sb.append(" tiliaId: ").append(toIndentedString(tiliaId)).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("accountId", "activePayout", "activePayoutCancellable", "activePayoutTiliaAmount", "earningsBalance", "eligibility", "payoutEligible", "tiliaId")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EconomyPayoutStatus.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 `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 (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.validateJsonElement(jsonObj.get("activePayout")); + } + // validate the required field `eligibility` + EconomyPayoutEligibility.validateJsonElement(jsonObj.get("eligibility")); + if (!jsonObj.get("tiliaId").isJsonPrimitive()) { + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EconomyPayoutStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EconomyPayoutStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EconomyPayoutStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EconomyPayoutStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EconomyPayoutStatus read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..bd6a408e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EditPrintRequest.java @@ -0,0 +1,235 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.File; +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; + +/** + * EditPrintRequest + */ +@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(@javax.annotation.Nonnull File image) { + this.image = image; + return this; + } + + /** + * The binary blob of the png file. + * @return image + */ + @javax.annotation.Nonnull + public File getImage() { + return image; + } + + public void setImage(@javax.annotation.Nonnull File image) { + this.image = image; + } + + + public EditPrintRequest note(@javax.annotation.Nullable String note) { + this.note = note; + return this; + } + + /** + * The caption for the image. + * @return note + */ + @javax.annotation.Nullable + public String getNote() { + return note; + } + + public void setNote(@javax.annotation.Nullable String note) { + this.note = note; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditPrintRequest editPrintRequest = (EditPrintRequest) o; + return Objects.equals(this.image, editPrintRequest.image) && + Objects.equals(this.note, editPrintRequest.note); + } + + @Override + public int hashCode() { + return Objects.hash(image, note); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EditPrintRequest {\n"); + sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).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("image", "note")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EditPrintRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `note` to be a primitive type in the JSON string but got `%s`", jsonObj.get("note").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EditPrintRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EditPrintRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EditPrintRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EditPrintRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EditPrintRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..1fd5a005 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/EquipInventoryItemRequest.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryEquipSlot; +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; + +/** + * EquipInventoryItemRequest + */ +@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(@javax.annotation.Nonnull InventoryEquipSlot equipSlot) { + this.equipSlot = equipSlot; + return this; + } + + /** + * Get equipSlot + * @return equipSlot + */ + @javax.annotation.Nonnull + public InventoryEquipSlot getEquipSlot() { + return equipSlot; + } + + public void setEquipSlot(@javax.annotation.Nonnull InventoryEquipSlot equipSlot) { + this.equipSlot = equipSlot; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EquipInventoryItemRequest equipInventoryItemRequest = (EquipInventoryItemRequest) o; + return Objects.equals(this.equipSlot, equipInventoryItemRequest.equipSlot); + } + + @Override + public int hashCode() { + return Objects.hash(equipSlot); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EquipInventoryItemRequest {\n"); + sb.append(" equipSlot: ").append(toIndentedString(equipSlot)).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("equipSlot")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("equipSlot")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!EquipInventoryItemRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!EquipInventoryItemRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EquipInventoryItemRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EquipInventoryItemRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, EquipInventoryItemRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public EquipInventoryItemRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 70cb0fdb..2145231a 100644 --- a/src/main/java/io/github/vrchatapi/model/Error.java +++ b/src/main/java/io/github/vrchatapi/model/Error.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,50 +13,71 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -88,11 +109,95 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("error")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Error.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 `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.validateJsonElement(jsonObj.get("error")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Error.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Error' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Error.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Error value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Error read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 2637273e..bb1d81c9 100644 --- a/src/main/java/io/github/vrchatapi/model/Favorite.java +++ b/src/main/java/io/github/vrchatapi/model/Favorite.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,138 +13,153 @@ package io.github.vrchatapi.model; import 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; +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; + /** - * Favorite + * */ -@javax.annotation.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) - private List tags = new ArrayList(); + @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; } - /** - * 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 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -182,11 +197,112 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("favoriteId", "id", "tags", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("favoriteId", "id", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Favorite.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 `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 (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(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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Favorite.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Favorite' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Favorite.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Favorite value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Favorite read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 8be53fdf..d4704258 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteGroup.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteGroup.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,239 +20,243 @@ 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; +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; /** - * FavoriteGroup + * */ -@javax.annotation.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) - private List tags = new ArrayList(); + @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; } - /** - * 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 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -299,11 +302,123 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("displayName", "id", "name", "ownerDisplayName", "ownerId", "tags", "type", "visibility")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FavoriteGroup.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 `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 (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(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(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(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(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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FavoriteGroup.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FavoriteGroup read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..3f88c060 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/FavoriteGroupLimits.java @@ -0,0 +1,283 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * FavoriteGroupLimits + */ +@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(@javax.annotation.Nonnull Integer avatar) { + this.avatar = avatar; + return this; + } + + /** + * Get avatar + * @return avatar + */ + @javax.annotation.Nonnull + public Integer getAvatar() { + return avatar; + } + + public void setAvatar(@javax.annotation.Nonnull Integer avatar) { + this.avatar = avatar; + } + + + public FavoriteGroupLimits friend(@javax.annotation.Nonnull Integer friend) { + this.friend = friend; + return this; + } + + /** + * Get friend + * @return friend + */ + @javax.annotation.Nonnull + public Integer getFriend() { + return friend; + } + + public void setFriend(@javax.annotation.Nonnull Integer friend) { + this.friend = friend; + } + + + public FavoriteGroupLimits vrcPlusWorld(@javax.annotation.Nonnull Integer vrcPlusWorld) { + this.vrcPlusWorld = vrcPlusWorld; + return this; + } + + /** + * Get vrcPlusWorld + * @return vrcPlusWorld + */ + @javax.annotation.Nonnull + public Integer getVrcPlusWorld() { + return vrcPlusWorld; + } + + public void setVrcPlusWorld(@javax.annotation.Nonnull Integer vrcPlusWorld) { + this.vrcPlusWorld = vrcPlusWorld; + } + + + public FavoriteGroupLimits world(@javax.annotation.Nonnull Integer world) { + this.world = world; + return this; + } + + /** + * Get world + * @return world + */ + @javax.annotation.Nonnull + public Integer getWorld() { + return world; + } + + public void setWorld(@javax.annotation.Nonnull Integer world) { + this.world = world; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoriteGroupLimits favoriteGroupLimits = (FavoriteGroupLimits) o; + return Objects.equals(this.avatar, favoriteGroupLimits.avatar) && + Objects.equals(this.friend, favoriteGroupLimits.friend) && + Objects.equals(this.vrcPlusWorld, favoriteGroupLimits.vrcPlusWorld) && + Objects.equals(this.world, favoriteGroupLimits.world); + } + + @Override + public int hashCode() { + return Objects.hash(avatar, friend, vrcPlusWorld, world); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteGroupLimits {\n"); + sb.append(" avatar: ").append(toIndentedString(avatar)).append("\n"); + sb.append(" friend: ").append(toIndentedString(friend)).append("\n"); + sb.append(" vrcPlusWorld: ").append(toIndentedString(vrcPlusWorld)).append("\n"); + sb.append(" world: ").append(toIndentedString(world)).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("avatar", "friend", "vrcPlusWorld", "world")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("avatar", "friend", "vrcPlusWorld", "world")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FavoriteGroupLimits.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteGroupLimits.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteGroupLimits' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FavoriteGroupLimits.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteGroupLimits value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FavoriteGroupLimits read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 ab839b37..59fdf968 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteGroupVisibility.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteGroupVisibility.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,10 +28,10 @@ @JsonAdapter(FavoriteGroupVisibility.Adapter.class) public enum FavoriteGroupVisibility { - PRIVATE("private"), - FRIENDS("friends"), + PRIVATE("private"), + PUBLIC("public"); private String value; @@ -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 new file mode 100644 index 00000000..d3326325 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/FavoriteLimits.java @@ -0,0 +1,288 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.FavoriteGroupLimits; +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; + +/** + * FavoriteLimits + */ +@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(@javax.annotation.Nonnull Integer defaultMaxFavoriteGroups) { + this.defaultMaxFavoriteGroups = defaultMaxFavoriteGroups; + return this; + } + + /** + * Get defaultMaxFavoriteGroups + * @return defaultMaxFavoriteGroups + */ + @javax.annotation.Nonnull + public Integer getDefaultMaxFavoriteGroups() { + return defaultMaxFavoriteGroups; + } + + public void setDefaultMaxFavoriteGroups(@javax.annotation.Nonnull Integer defaultMaxFavoriteGroups) { + this.defaultMaxFavoriteGroups = defaultMaxFavoriteGroups; + } + + + public FavoriteLimits defaultMaxFavoritesPerGroup(@javax.annotation.Nonnull Integer defaultMaxFavoritesPerGroup) { + this.defaultMaxFavoritesPerGroup = defaultMaxFavoritesPerGroup; + return this; + } + + /** + * Get defaultMaxFavoritesPerGroup + * @return defaultMaxFavoritesPerGroup + */ + @javax.annotation.Nonnull + public Integer getDefaultMaxFavoritesPerGroup() { + return defaultMaxFavoritesPerGroup; + } + + public void setDefaultMaxFavoritesPerGroup(@javax.annotation.Nonnull Integer defaultMaxFavoritesPerGroup) { + this.defaultMaxFavoritesPerGroup = defaultMaxFavoritesPerGroup; + } + + + public FavoriteLimits maxFavoriteGroups(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoriteGroups) { + this.maxFavoriteGroups = maxFavoriteGroups; + return this; + } + + /** + * Get maxFavoriteGroups + * @return maxFavoriteGroups + */ + @javax.annotation.Nonnull + public FavoriteGroupLimits getMaxFavoriteGroups() { + return maxFavoriteGroups; + } + + public void setMaxFavoriteGroups(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoriteGroups) { + this.maxFavoriteGroups = maxFavoriteGroups; + } + + + public FavoriteLimits maxFavoritesPerGroup(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoritesPerGroup) { + this.maxFavoritesPerGroup = maxFavoritesPerGroup; + return this; + } + + /** + * Get maxFavoritesPerGroup + * @return maxFavoritesPerGroup + */ + @javax.annotation.Nonnull + public FavoriteGroupLimits getMaxFavoritesPerGroup() { + return maxFavoritesPerGroup; + } + + public void setMaxFavoritesPerGroup(@javax.annotation.Nonnull FavoriteGroupLimits maxFavoritesPerGroup) { + this.maxFavoritesPerGroup = maxFavoritesPerGroup; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoriteLimits favoriteLimits = (FavoriteLimits) o; + return Objects.equals(this.defaultMaxFavoriteGroups, favoriteLimits.defaultMaxFavoriteGroups) && + Objects.equals(this.defaultMaxFavoritesPerGroup, favoriteLimits.defaultMaxFavoritesPerGroup) && + Objects.equals(this.maxFavoriteGroups, favoriteLimits.maxFavoriteGroups) && + Objects.equals(this.maxFavoritesPerGroup, favoriteLimits.maxFavoritesPerGroup); + } + + @Override + public int hashCode() { + return Objects.hash(defaultMaxFavoriteGroups, defaultMaxFavoritesPerGroup, maxFavoriteGroups, maxFavoritesPerGroup); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavoriteLimits {\n"); + sb.append(" defaultMaxFavoriteGroups: ").append(toIndentedString(defaultMaxFavoriteGroups)).append("\n"); + sb.append(" defaultMaxFavoritesPerGroup: ").append(toIndentedString(defaultMaxFavoritesPerGroup)).append("\n"); + sb.append(" maxFavoriteGroups: ").append(toIndentedString(maxFavoriteGroups)).append("\n"); + sb.append(" maxFavoritesPerGroup: ").append(toIndentedString(maxFavoritesPerGroup)).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("defaultMaxFavoriteGroups", "defaultMaxFavoritesPerGroup", "maxFavoriteGroups", "maxFavoritesPerGroup")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("defaultMaxFavoriteGroups", "defaultMaxFavoritesPerGroup", "maxFavoriteGroups", "maxFavoritesPerGroup")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FavoriteLimits.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 `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 (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.validateJsonElement(jsonObj.get("maxFavoriteGroups")); + // validate the required field `maxFavoritesPerGroup` + FavoriteGroupLimits.validateJsonElement(jsonObj.get("maxFavoritesPerGroup")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoriteLimits.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoriteLimits' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FavoriteLimits.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoriteLimits value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FavoriteLimits read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 4d153109..0745e753 100644 --- a/src/main/java/io/github/vrchatapi/model/FavoriteType.java +++ b/src/main/java/io/github/vrchatapi/model/FavoriteType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,11 +28,13 @@ @JsonAdapter(FavoriteType.Adapter.class) public enum FavoriteType { - WORLD("world"), + AVATAR("avatar"), FRIEND("friend"), - AVATAR("avatar"); + VRC_PLUS_WORLD("vrcPlusWorld"), + + WORLD("world"); private String value; @@ -70,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 new file mode 100644 index 00000000..40b3071f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/FavoritedWorld.java @@ -0,0 +1,1086 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InstanceContentSettings; +import io.github.vrchatapi.model.ReleaseStatus; +import io.github.vrchatapi.model.UnityPackage; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * + */ +@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) + @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) + @javax.annotation.Nullable + private List udonProducts = new ArrayList<>(); + + public static final String SERIALIZED_NAME_UNITY_PACKAGES = "unityPackages"; + @SerializedName(SERIALIZED_NAME_UNITY_PACKAGES) + @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) + @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(@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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public FavoritedWorld authorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Get authorName + * @return authorName + */ + @javax.annotation.Nonnull + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + } + + + public FavoritedWorld capacity(@javax.annotation.Nonnull Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get capacity + * @return capacity + */ + @javax.annotation.Nonnull + public Integer getCapacity() { + return capacity; + } + + public void setCapacity(@javax.annotation.Nonnull Integer capacity) { + this.capacity = capacity; + } + + + public FavoritedWorld createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public FavoritedWorld defaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { + this.defaultContentSettings = defaultContentSettings; + return this; + } + + /** + * Get defaultContentSettings + * @return defaultContentSettings + */ + @javax.annotation.Nullable + public InstanceContentSettings getDefaultContentSettings() { + return defaultContentSettings; + } + + public void setDefaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { + this.defaultContentSettings = defaultContentSettings; + } + + + public FavoritedWorld description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public FavoritedWorld favoriteGroup(@javax.annotation.Nonnull String favoriteGroup) { + this.favoriteGroup = favoriteGroup; + return this; + } + + /** + * Get favoriteGroup + * @return favoriteGroup + */ + @javax.annotation.Nonnull + public String getFavoriteGroup() { + return favoriteGroup; + } + + public void setFavoriteGroup(@javax.annotation.Nonnull String favoriteGroup) { + this.favoriteGroup = favoriteGroup; + } + + + public FavoritedWorld favoriteId(@javax.annotation.Nonnull String favoriteId) { + this.favoriteId = favoriteId; + return this; + } + + /** + * Get favoriteId + * @return favoriteId + */ + @javax.annotation.Nonnull + public String getFavoriteId() { + return favoriteId; + } + + public void setFavoriteId(@javax.annotation.Nonnull String favoriteId) { + this.favoriteId = favoriteId; + } + + + public FavoritedWorld favorites(@javax.annotation.Nullable Integer favorites) { + this.favorites = favorites; + return this; + } + + /** + * Get favorites + * minimum: 0 + * @return favorites + */ + @javax.annotation.Nullable + public Integer getFavorites() { + return favorites; + } + + public void setFavorites(@javax.annotation.Nullable Integer favorites) { + this.favorites = favorites; + } + + + public FavoritedWorld featured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + return this; + } + + /** + * Get featured + * @return featured + */ + @javax.annotation.Nullable + public Boolean getFeatured() { + return featured; + } + + public void setFeatured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + } + + + public FavoritedWorld heat(@javax.annotation.Nullable Integer heat) { + this.heat = heat; + return this; + } + + /** + * Get heat + * minimum: 0 + * @return heat + */ + @javax.annotation.Nullable + public Integer getHeat() { + return heat; + } + + public void setHeat(@javax.annotation.Nullable Integer heat) { + this.heat = heat; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public FavoritedWorld imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public FavoritedWorld labsPublicationDate(@javax.annotation.Nullable String labsPublicationDate) { + this.labsPublicationDate = labsPublicationDate; + return this; + } + + /** + * Get labsPublicationDate + * @return labsPublicationDate + */ + @javax.annotation.Nullable + public String getLabsPublicationDate() { + return labsPublicationDate; + } + + public void setLabsPublicationDate(@javax.annotation.Nullable String labsPublicationDate) { + this.labsPublicationDate = labsPublicationDate; + } + + + public FavoritedWorld name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public FavoritedWorld occupants(@javax.annotation.Nonnull Integer occupants) { + this.occupants = occupants; + return this; + } + + /** + * Get occupants + * minimum: 0 + * @return occupants + */ + @javax.annotation.Nonnull + public Integer getOccupants() { + return occupants; + } + + public void setOccupants(@javax.annotation.Nonnull Integer occupants) { + this.occupants = occupants; + } + + + public FavoritedWorld organization(@javax.annotation.Nullable String organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + */ + @javax.annotation.Nullable + public String getOrganization() { + return organization; + } + + public void setOrganization(@javax.annotation.Nullable String organization) { + this.organization = organization; + } + + + public FavoritedWorld popularity(@javax.annotation.Nullable Integer popularity) { + this.popularity = popularity; + return this; + } + + /** + * Get popularity + * minimum: 0 + * @return popularity + */ + @javax.annotation.Nullable + public Integer getPopularity() { + return popularity; + } + + public void setPopularity(@javax.annotation.Nullable Integer popularity) { + this.popularity = popularity; + } + + + public FavoritedWorld previewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { + this.previewYoutubeId = previewYoutubeId; + return this; + } + + /** + * Get previewYoutubeId + * @return previewYoutubeId + */ + @javax.annotation.Nullable + public String getPreviewYoutubeId() { + return previewYoutubeId; + } + + public void setPreviewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { + this.previewYoutubeId = previewYoutubeId; + } + + + public FavoritedWorld publicationDate(@javax.annotation.Nullable String publicationDate) { + this.publicationDate = publicationDate; + return this; + } + + /** + * Get publicationDate + * @return publicationDate + */ + @javax.annotation.Nullable + public String getPublicationDate() { + return publicationDate; + } + + public void setPublicationDate(@javax.annotation.Nullable String publicationDate) { + this.publicationDate = publicationDate; + } + + + public FavoritedWorld recommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + return this; + } + + /** + * Get recommendedCapacity + * @return recommendedCapacity + */ + @javax.annotation.Nullable + public Integer getRecommendedCapacity() { + return recommendedCapacity; + } + + public void setRecommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + } + + + public FavoritedWorld releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; + return this; + } + + /** + * Get releaseStatus + * @return releaseStatus + */ + @javax.annotation.Nonnull + public ReleaseStatus getReleaseStatus() { + return releaseStatus; + } + + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; + } + + + public FavoritedWorld tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public FavoritedWorld addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public FavoritedWorld thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; + return this; + } + + /** + * Get thumbnailImageUrl + * @return thumbnailImageUrl + */ + @javax.annotation.Nonnull + public String getThumbnailImageUrl() { + return thumbnailImageUrl; + } + + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; + } + + + public FavoritedWorld udonProducts(@javax.annotation.Nullable List udonProducts) { + this.udonProducts = udonProducts; + return this; + } + + public FavoritedWorld addUdonProductsItem(String udonProductsItem) { + if (this.udonProducts == null) { + this.udonProducts = new ArrayList<>(); + } + this.udonProducts.add(udonProductsItem); + return this; + } + + /** + * Get udonProducts + * @return udonProducts + */ + @javax.annotation.Nullable + public List getUdonProducts() { + return udonProducts; + } + + public void setUdonProducts(@javax.annotation.Nullable List udonProducts) { + this.udonProducts = udonProducts; + } + + + public FavoritedWorld unityPackages(@javax.annotation.Nullable List unityPackages) { + this.unityPackages = unityPackages; + return this; + } + + public FavoritedWorld addUnityPackagesItem(UnityPackage unityPackagesItem) { + if (this.unityPackages == null) { + this.unityPackages = new ArrayList<>(); + } + this.unityPackages.add(unityPackagesItem); + return this; + } + + /** + * + * @return unityPackages + */ + @javax.annotation.Nullable + public List getUnityPackages() { + return unityPackages; + } + + public void setUnityPackages(@javax.annotation.Nullable List unityPackages) { + this.unityPackages = unityPackages; + } + + + public FavoritedWorld updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public FavoritedWorld urlList(@javax.annotation.Nullable List urlList) { + this.urlList = urlList; + return this; + } + + public FavoritedWorld addUrlListItem(String urlListItem) { + if (this.urlList == null) { + this.urlList = new ArrayList<>(); + } + this.urlList.add(urlListItem); + return this; + } + + /** + * Get urlList + * @return urlList + */ + @javax.annotation.Nullable + public List getUrlList() { + return urlList; + } + + public void setUrlList(@javax.annotation.Nullable List urlList) { + this.urlList = urlList; + } + + + public FavoritedWorld version(@javax.annotation.Nullable Integer version) { + this.version = version; + return this; + } + + /** + * Get version + * minimum: 1 + * @return version + */ + @javax.annotation.Nullable + public Integer getVersion() { + return version; + } + + public void setVersion(@javax.annotation.Nullable Integer version) { + this.version = version; + } + + + public FavoritedWorld visits(@javax.annotation.Nullable Integer visits) { + this.visits = visits; + return this; + } + + /** + * Get visits + * minimum: 0 + * @return visits + */ + @javax.annotation.Nullable + public Integer getVisits() { + return visits; + } + + public void setVisits(@javax.annotation.Nullable Integer visits) { + this.visits = visits; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FavoritedWorld favoritedWorld = (FavoritedWorld) o; + return Objects.equals(this.authorId, favoritedWorld.authorId) && + Objects.equals(this.authorName, favoritedWorld.authorName) && + Objects.equals(this.capacity, favoritedWorld.capacity) && + Objects.equals(this.createdAt, favoritedWorld.createdAt) && + Objects.equals(this.defaultContentSettings, favoritedWorld.defaultContentSettings) && + Objects.equals(this.description, favoritedWorld.description) && + Objects.equals(this.favoriteGroup, favoritedWorld.favoriteGroup) && + Objects.equals(this.favoriteId, favoritedWorld.favoriteId) && + Objects.equals(this.favorites, favoritedWorld.favorites) && + Objects.equals(this.featured, favoritedWorld.featured) && + Objects.equals(this.heat, favoritedWorld.heat) && + Objects.equals(this.id, favoritedWorld.id) && + Objects.equals(this.imageUrl, favoritedWorld.imageUrl) && + Objects.equals(this.labsPublicationDate, favoritedWorld.labsPublicationDate) && + Objects.equals(this.name, favoritedWorld.name) && + Objects.equals(this.occupants, favoritedWorld.occupants) && + Objects.equals(this.organization, favoritedWorld.organization) && + Objects.equals(this.popularity, favoritedWorld.popularity) && + Objects.equals(this.previewYoutubeId, favoritedWorld.previewYoutubeId) && + Objects.equals(this.publicationDate, favoritedWorld.publicationDate) && + Objects.equals(this.recommendedCapacity, favoritedWorld.recommendedCapacity) && + Objects.equals(this.releaseStatus, favoritedWorld.releaseStatus) && + Objects.equals(this.tags, favoritedWorld.tags) && + Objects.equals(this.thumbnailImageUrl, favoritedWorld.thumbnailImageUrl) && + Objects.equals(this.udonProducts, favoritedWorld.udonProducts) && + Objects.equals(this.unityPackages, favoritedWorld.unityPackages) && + Objects.equals(this.updatedAt, favoritedWorld.updatedAt) && + Objects.equals(this.urlList, favoritedWorld.urlList) && + Objects.equals(this.version, favoritedWorld.version) && + Objects.equals(this.visits, favoritedWorld.visits); + } + + 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(authorId, authorName, capacity, createdAt, defaultContentSettings, description, favoriteGroup, favoriteId, favorites, featured, heat, id, imageUrl, labsPublicationDate, name, occupants, organization, popularity, previewYoutubeId, publicationDate, recommendedCapacity, releaseStatus, tags, thumbnailImageUrl, udonProducts, unityPackages, updatedAt, urlList, version, visits); + } + + 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 FavoritedWorld {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" capacity: ").append(toIndentedString(capacity)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" defaultContentSettings: ").append(toIndentedString(defaultContentSettings)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" favoriteGroup: ").append(toIndentedString(favoriteGroup)).append("\n"); + sb.append(" favoriteId: ").append(toIndentedString(favoriteId)).append("\n"); + sb.append(" favorites: ").append(toIndentedString(favorites)).append("\n"); + sb.append(" featured: ").append(toIndentedString(featured)).append("\n"); + sb.append(" heat: ").append(toIndentedString(heat)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" labsPublicationDate: ").append(toIndentedString(labsPublicationDate)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" occupants: ").append(toIndentedString(occupants)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); + sb.append(" popularity: ").append(toIndentedString(popularity)).append("\n"); + sb.append(" previewYoutubeId: ").append(toIndentedString(previewYoutubeId)).append("\n"); + sb.append(" publicationDate: ").append(toIndentedString(publicationDate)).append("\n"); + sb.append(" recommendedCapacity: ").append(toIndentedString(recommendedCapacity)).append("\n"); + sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" thumbnailImageUrl: ").append(toIndentedString(thumbnailImageUrl)).append("\n"); + sb.append(" udonProducts: ").append(toIndentedString(udonProducts)).append("\n"); + sb.append(" unityPackages: ").append(toIndentedString(unityPackages)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" urlList: ").append(toIndentedString(urlList)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" visits: ").append(toIndentedString(visits)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FavoritedWorld.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 `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 (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(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(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.validateJsonElement(jsonObj.get("defaultContentSettings")); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + 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(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(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(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(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(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(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(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(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(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").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(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").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(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.validateJsonElement(jsonArrayunityPackages.get(i)); + }; + } + } + // ensure the optional json data is an array if present + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FavoritedWorld.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FavoritedWorld' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FavoritedWorld.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FavoritedWorld value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FavoritedWorld read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..01bdf2b9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Feedback.java @@ -0,0 +1,578 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * Feedback + */ +@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(@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 + public String getCommenterId() { + return commenterId; + } + + public void setCommenterId(@javax.annotation.Nonnull String commenterId) { + this.commenterId = commenterId; + } + + + public Feedback commenterName(@javax.annotation.Nonnull String commenterName) { + this.commenterName = commenterName; + return this; + } + + /** + * Get commenterName + * @return commenterName + */ + @javax.annotation.Nonnull + public String getCommenterName() { + return commenterName; + } + + public void setCommenterName(@javax.annotation.Nonnull String commenterName) { + this.commenterName = commenterName; + } + + + 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 + public String getContentAuthorId() { + return contentAuthorId; + } + + public void setContentAuthorId(@javax.annotation.Nonnull String contentAuthorId) { + this.contentAuthorId = contentAuthorId; + } + + + public Feedback contentAuthorName(@javax.annotation.Nullable String contentAuthorName) { + this.contentAuthorName = contentAuthorName; + return this; + } + + /** + * Get contentAuthorName + * @return contentAuthorName + */ + @javax.annotation.Nullable + public String getContentAuthorName() { + return contentAuthorName; + } + + public void setContentAuthorName(@javax.annotation.Nullable String contentAuthorName) { + this.contentAuthorName = contentAuthorName; + } + + + public Feedback contentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + return this; + } + + /** + * Get contentId + * @return contentId + */ + @javax.annotation.Nonnull + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + public Feedback contentName(@javax.annotation.Nullable String contentName) { + this.contentName = contentName; + return this; + } + + /** + * Get contentName + * @return contentName + */ + @javax.annotation.Nullable + public String getContentName() { + return contentName; + } + + public void setContentName(@javax.annotation.Nullable String contentName) { + this.contentName = contentName; + } + + + public Feedback contentType(@javax.annotation.Nonnull String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get contentType + * @return contentType + */ + @javax.annotation.Nonnull + public String getContentType() { + return contentType; + } + + public void setContentType(@javax.annotation.Nonnull String contentType) { + this.contentType = contentType; + } + + + public Feedback contentVersion(@javax.annotation.Nullable Integer contentVersion) { + this.contentVersion = contentVersion; + return this; + } + + /** + * Get contentVersion + * @return contentVersion + */ + @javax.annotation.Nullable + public Integer getContentVersion() { + return contentVersion; + } + + public void setContentVersion(@javax.annotation.Nullable Integer contentVersion) { + this.contentVersion = contentVersion; + } + + + public Feedback description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public Feedback id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Feedback reason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nonnull + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public Feedback type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Feedback feedback = (Feedback) o; + return Objects.equals(this.commenterId, feedback.commenterId) && + Objects.equals(this.commenterName, feedback.commenterName) && + Objects.equals(this.contentAuthorId, feedback.contentAuthorId) && + Objects.equals(this.contentAuthorName, feedback.contentAuthorName) && + Objects.equals(this.contentId, feedback.contentId) && + Objects.equals(this.contentName, feedback.contentName) && + Objects.equals(this.contentType, feedback.contentType) && + Objects.equals(this.contentVersion, feedback.contentVersion) && + Objects.equals(this.description, feedback.description) && + Objects.equals(this.id, feedback.id) && + Objects.equals(this.reason, feedback.reason) && + Objects.equals(this.tags, feedback.tags) && + Objects.equals(this.type, feedback.type); + } + + 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(commenterId, commenterName, contentAuthorId, contentAuthorName, contentId, contentName, contentType, contentVersion, description, id, reason, tags, type); + } + + 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 Feedback {\n"); + sb.append(" commenterId: ").append(toIndentedString(commenterId)).append("\n"); + sb.append(" commenterName: ").append(toIndentedString(commenterName)).append("\n"); + sb.append(" contentAuthorId: ").append(toIndentedString(contentAuthorId)).append("\n"); + sb.append(" contentAuthorName: ").append(toIndentedString(contentAuthorName)).append("\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" contentName: ").append(toIndentedString(contentName)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append(" contentVersion: ").append(toIndentedString(contentVersion)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Feedback.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 `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 (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(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(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(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") != 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(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(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(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(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(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(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(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(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 (!Feedback.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Feedback' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Feedback.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Feedback value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Feedback read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..37d41946 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/FileAnalysis.java @@ -0,0 +1,371 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.FileAnalysisAvatarStats; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * FileAnalysis + */ +@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(@javax.annotation.Nonnull FileAnalysisAvatarStats avatarStats) { + this.avatarStats = avatarStats; + return this; + } + + /** + * Get avatarStats + * @return avatarStats + */ + @javax.annotation.Nonnull + public FileAnalysisAvatarStats getAvatarStats() { + return avatarStats; + } + + public void setAvatarStats(@javax.annotation.Nonnull FileAnalysisAvatarStats avatarStats) { + this.avatarStats = avatarStats; + } + + + public FileAnalysis createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public FileAnalysis encryptionKey(@javax.annotation.Nullable String encryptionKey) { + this.encryptionKey = encryptionKey; + return this; + } + + /** + * Get encryptionKey + * @return encryptionKey + */ + @javax.annotation.Nullable + public String getEncryptionKey() { + return encryptionKey; + } + + public void setEncryptionKey(@javax.annotation.Nullable String encryptionKey) { + this.encryptionKey = encryptionKey; + } + + + public FileAnalysis fileSize(@javax.annotation.Nonnull Integer fileSize) { + this.fileSize = fileSize; + return this; + } + + /** + * Get fileSize + * @return fileSize + */ + @javax.annotation.Nonnull + public Integer getFileSize() { + return fileSize; + } + + public void setFileSize(@javax.annotation.Nonnull Integer fileSize) { + this.fileSize = fileSize; + } + + + public FileAnalysis performanceRating(@javax.annotation.Nullable String performanceRating) { + this.performanceRating = performanceRating; + return this; + } + + /** + * Get performanceRating + * @return performanceRating + */ + @javax.annotation.Nullable + public String getPerformanceRating() { + return performanceRating; + } + + public void setPerformanceRating(@javax.annotation.Nullable String performanceRating) { + this.performanceRating = performanceRating; + } + + + public FileAnalysis success(@javax.annotation.Nonnull Boolean success) { + this.success = success; + return this; + } + + /** + * Get success + * @return success + */ + @javax.annotation.Nonnull + public Boolean getSuccess() { + return success; + } + + public void setSuccess(@javax.annotation.Nonnull Boolean success) { + this.success = success; + } + + + public FileAnalysis uncompressedSize(@javax.annotation.Nonnull Integer uncompressedSize) { + this.uncompressedSize = uncompressedSize; + return this; + } + + /** + * Get uncompressedSize + * @return uncompressedSize + */ + @javax.annotation.Nonnull + public Integer getUncompressedSize() { + return uncompressedSize; + } + + public void setUncompressedSize(@javax.annotation.Nonnull Integer uncompressedSize) { + this.uncompressedSize = uncompressedSize; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileAnalysis fileAnalysis = (FileAnalysis) o; + return Objects.equals(this.avatarStats, fileAnalysis.avatarStats) && + Objects.equals(this.createdAt, fileAnalysis.createdAt) && + Objects.equals(this.encryptionKey, fileAnalysis.encryptionKey) && + Objects.equals(this.fileSize, fileAnalysis.fileSize) && + Objects.equals(this.performanceRating, fileAnalysis.performanceRating) && + Objects.equals(this.success, fileAnalysis.success) && + Objects.equals(this.uncompressedSize, fileAnalysis.uncompressedSize); + } + + @Override + public int hashCode() { + return Objects.hash(avatarStats, createdAt, encryptionKey, fileSize, performanceRating, success, uncompressedSize); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileAnalysis {\n"); + sb.append(" avatarStats: ").append(toIndentedString(avatarStats)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" encryptionKey: ").append(toIndentedString(encryptionKey)).append("\n"); + sb.append(" fileSize: ").append(toIndentedString(fileSize)).append("\n"); + sb.append(" performanceRating: ").append(toIndentedString(performanceRating)).append("\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" uncompressedSize: ").append(toIndentedString(uncompressedSize)).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("avatarStats", "created_at", "encryptionKey", "fileSize", "performanceRating", "success", "uncompressedSize")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("avatarStats", "fileSize", "success", "uncompressedSize")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileAnalysis.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 `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 (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.validateJsonElement(jsonObj.get("avatarStats")); + if ((jsonObj.get("encryptionKey") != null && !jsonObj.get("encryptionKey").isJsonNull()) && !jsonObj.get("encryptionKey").isJsonPrimitive()) { + 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(java.util.Locale.ROOT, "Expected the field `performanceRating` to be a primitive type in the JSON string but got `%s`", jsonObj.get("performanceRating").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FileAnalysis.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FileAnalysis' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FileAnalysis.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FileAnalysis value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FileAnalysis read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..6a435041 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/FileAnalysisAvatarStats.java @@ -0,0 +1,1340 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.math.BigDecimal; +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; + +/** + * FileAnalysisAvatarStats + */ +@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(@javax.annotation.Nonnull Integer animatorCount) { + this.animatorCount = animatorCount; + return this; + } + + /** + * Get animatorCount + * @return animatorCount + */ + @javax.annotation.Nonnull + public Integer getAnimatorCount() { + return animatorCount; + } + + public void setAnimatorCount(@javax.annotation.Nonnull Integer animatorCount) { + this.animatorCount = animatorCount; + } + + + public FileAnalysisAvatarStats audioSourceCount(@javax.annotation.Nonnull Integer audioSourceCount) { + this.audioSourceCount = audioSourceCount; + return this; + } + + /** + * Get audioSourceCount + * @return audioSourceCount + */ + @javax.annotation.Nonnull + public Integer getAudioSourceCount() { + return audioSourceCount; + } + + public void setAudioSourceCount(@javax.annotation.Nonnull Integer audioSourceCount) { + this.audioSourceCount = audioSourceCount; + } + + + public FileAnalysisAvatarStats blendShapeCount(@javax.annotation.Nonnull Integer blendShapeCount) { + this.blendShapeCount = blendShapeCount; + return this; + } + + /** + * Get blendShapeCount + * @return blendShapeCount + */ + @javax.annotation.Nonnull + public Integer getBlendShapeCount() { + return blendShapeCount; + } + + public void setBlendShapeCount(@javax.annotation.Nonnull Integer blendShapeCount) { + this.blendShapeCount = blendShapeCount; + } + + + public FileAnalysisAvatarStats boneCount(@javax.annotation.Nonnull Integer boneCount) { + this.boneCount = boneCount; + return this; + } + + /** + * Get boneCount + * @return boneCount + */ + @javax.annotation.Nonnull + public Integer getBoneCount() { + return boneCount; + } + + public void setBoneCount(@javax.annotation.Nonnull Integer boneCount) { + this.boneCount = boneCount; + } + + + 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 + public List getBounds() { + return bounds; + } + + public void setBounds(@javax.annotation.Nonnull List bounds) { + this.bounds = bounds; + } + + + public FileAnalysisAvatarStats cameraCount(@javax.annotation.Nullable Integer cameraCount) { + this.cameraCount = cameraCount; + return this; + } + + /** + * Get cameraCount + * @return cameraCount + */ + @javax.annotation.Nullable + public Integer getCameraCount() { + return cameraCount; + } + + public void setCameraCount(@javax.annotation.Nullable Integer cameraCount) { + this.cameraCount = cameraCount; + } + + + public FileAnalysisAvatarStats clothCount(@javax.annotation.Nonnull Integer clothCount) { + this.clothCount = clothCount; + return this; + } + + /** + * Get clothCount + * @return clothCount + */ + @javax.annotation.Nonnull + public Integer getClothCount() { + return clothCount; + } + + public void setClothCount(@javax.annotation.Nonnull Integer clothCount) { + this.clothCount = clothCount; + } + + + public FileAnalysisAvatarStats constraintCount(@javax.annotation.Nonnull Integer constraintCount) { + this.constraintCount = constraintCount; + return this; + } + + /** + * Get constraintCount + * @return constraintCount + */ + @javax.annotation.Nonnull + public Integer getConstraintCount() { + return constraintCount; + } + + public void setConstraintCount(@javax.annotation.Nonnull Integer constraintCount) { + this.constraintCount = constraintCount; + } + + + public FileAnalysisAvatarStats constraintDepth(@javax.annotation.Nonnull Integer constraintDepth) { + this.constraintDepth = constraintDepth; + return this; + } + + /** + * Get constraintDepth + * @return constraintDepth + */ + @javax.annotation.Nonnull + public Integer getConstraintDepth() { + return constraintDepth; + } + + public void setConstraintDepth(@javax.annotation.Nonnull Integer constraintDepth) { + this.constraintDepth = constraintDepth; + } + + + public FileAnalysisAvatarStats contactCount(@javax.annotation.Nonnull Integer contactCount) { + this.contactCount = contactCount; + return this; + } + + /** + * Get contactCount + * @return contactCount + */ + @javax.annotation.Nonnull + public Integer getContactCount() { + return contactCount; + } + + public void setContactCount(@javax.annotation.Nonnull Integer contactCount) { + this.contactCount = contactCount; + } + + + public FileAnalysisAvatarStats customExpressions(@javax.annotation.Nonnull Boolean customExpressions) { + this.customExpressions = customExpressions; + return this; + } + + /** + * Get customExpressions + * @return customExpressions + */ + @javax.annotation.Nonnull + public Boolean getCustomExpressions() { + return customExpressions; + } + + public void setCustomExpressions(@javax.annotation.Nonnull Boolean customExpressions) { + this.customExpressions = customExpressions; + } + + + public FileAnalysisAvatarStats customizeAnimationLayers(@javax.annotation.Nonnull Boolean customizeAnimationLayers) { + this.customizeAnimationLayers = customizeAnimationLayers; + return this; + } + + /** + * Get customizeAnimationLayers + * @return customizeAnimationLayers + */ + @javax.annotation.Nonnull + public Boolean getCustomizeAnimationLayers() { + return customizeAnimationLayers; + } + + public void setCustomizeAnimationLayers(@javax.annotation.Nonnull Boolean customizeAnimationLayers) { + this.customizeAnimationLayers = customizeAnimationLayers; + } + + + public FileAnalysisAvatarStats enableEyeLook(@javax.annotation.Nonnull Boolean enableEyeLook) { + this.enableEyeLook = enableEyeLook; + return this; + } + + /** + * Get enableEyeLook + * @return enableEyeLook + */ + @javax.annotation.Nonnull + public Boolean getEnableEyeLook() { + return enableEyeLook; + } + + public void setEnableEyeLook(@javax.annotation.Nonnull Boolean enableEyeLook) { + this.enableEyeLook = enableEyeLook; + } + + + public FileAnalysisAvatarStats lightCount(@javax.annotation.Nonnull Integer lightCount) { + this.lightCount = lightCount; + return this; + } + + /** + * Get lightCount + * @return lightCount + */ + @javax.annotation.Nonnull + public Integer getLightCount() { + return lightCount; + } + + public void setLightCount(@javax.annotation.Nonnull Integer lightCount) { + this.lightCount = lightCount; + } + + + public FileAnalysisAvatarStats lineRendererCount(@javax.annotation.Nonnull Integer lineRendererCount) { + this.lineRendererCount = lineRendererCount; + return this; + } + + /** + * Get lineRendererCount + * @return lineRendererCount + */ + @javax.annotation.Nonnull + public Integer getLineRendererCount() { + return lineRendererCount; + } + + public void setLineRendererCount(@javax.annotation.Nonnull Integer lineRendererCount) { + this.lineRendererCount = lineRendererCount; + } + + + public FileAnalysisAvatarStats lipSync(@javax.annotation.Nonnull Integer lipSync) { + this.lipSync = lipSync; + return this; + } + + /** + * Get lipSync + * @return lipSync + */ + @javax.annotation.Nonnull + public Integer getLipSync() { + return lipSync; + } + + public void setLipSync(@javax.annotation.Nonnull Integer lipSync) { + this.lipSync = lipSync; + } + + + public FileAnalysisAvatarStats materialCount(@javax.annotation.Nonnull Integer materialCount) { + this.materialCount = materialCount; + return this; + } + + /** + * Get materialCount + * @return materialCount + */ + @javax.annotation.Nonnull + public Integer getMaterialCount() { + return materialCount; + } + + public void setMaterialCount(@javax.annotation.Nonnull Integer materialCount) { + this.materialCount = materialCount; + } + + + public FileAnalysisAvatarStats materialSlotsUsed(@javax.annotation.Nonnull Integer materialSlotsUsed) { + this.materialSlotsUsed = materialSlotsUsed; + return this; + } + + /** + * Get materialSlotsUsed + * @return materialSlotsUsed + */ + @javax.annotation.Nonnull + public Integer getMaterialSlotsUsed() { + return materialSlotsUsed; + } + + public void setMaterialSlotsUsed(@javax.annotation.Nonnull Integer materialSlotsUsed) { + this.materialSlotsUsed = materialSlotsUsed; + } + + + public FileAnalysisAvatarStats meshCount(@javax.annotation.Nonnull Integer meshCount) { + this.meshCount = meshCount; + return this; + } + + /** + * Get meshCount + * @return meshCount + */ + @javax.annotation.Nonnull + public Integer getMeshCount() { + return meshCount; + } + + public void setMeshCount(@javax.annotation.Nonnull Integer meshCount) { + this.meshCount = meshCount; + } + + + public FileAnalysisAvatarStats meshIndices(@javax.annotation.Nonnull Integer meshIndices) { + this.meshIndices = meshIndices; + return this; + } + + /** + * Get meshIndices + * @return meshIndices + */ + @javax.annotation.Nonnull + public Integer getMeshIndices() { + return meshIndices; + } + + public void setMeshIndices(@javax.annotation.Nonnull Integer meshIndices) { + this.meshIndices = meshIndices; + } + + + public FileAnalysisAvatarStats meshParticleMaxPolygons(@javax.annotation.Nonnull Integer meshParticleMaxPolygons) { + this.meshParticleMaxPolygons = meshParticleMaxPolygons; + return this; + } + + /** + * Get meshParticleMaxPolygons + * @return meshParticleMaxPolygons + */ + @javax.annotation.Nonnull + public Integer getMeshParticleMaxPolygons() { + return meshParticleMaxPolygons; + } + + public void setMeshParticleMaxPolygons(@javax.annotation.Nonnull Integer meshParticleMaxPolygons) { + this.meshParticleMaxPolygons = meshParticleMaxPolygons; + } + + + public FileAnalysisAvatarStats meshPolygons(@javax.annotation.Nonnull Integer meshPolygons) { + this.meshPolygons = meshPolygons; + return this; + } + + /** + * Get meshPolygons + * @return meshPolygons + */ + @javax.annotation.Nonnull + public Integer getMeshPolygons() { + return meshPolygons; + } + + public void setMeshPolygons(@javax.annotation.Nonnull Integer meshPolygons) { + this.meshPolygons = meshPolygons; + } + + + public FileAnalysisAvatarStats meshVertices(@javax.annotation.Nonnull Integer meshVertices) { + this.meshVertices = meshVertices; + return this; + } + + /** + * Get meshVertices + * @return meshVertices + */ + @javax.annotation.Nonnull + public Integer getMeshVertices() { + return meshVertices; + } + + public void setMeshVertices(@javax.annotation.Nonnull Integer meshVertices) { + this.meshVertices = meshVertices; + } + + + public FileAnalysisAvatarStats particleCollisionEnabled(@javax.annotation.Nonnull Boolean particleCollisionEnabled) { + this.particleCollisionEnabled = particleCollisionEnabled; + return this; + } + + /** + * Get particleCollisionEnabled + * @return particleCollisionEnabled + */ + @javax.annotation.Nonnull + public Boolean getParticleCollisionEnabled() { + return particleCollisionEnabled; + } + + public void setParticleCollisionEnabled(@javax.annotation.Nonnull Boolean particleCollisionEnabled) { + this.particleCollisionEnabled = particleCollisionEnabled; + } + + + public FileAnalysisAvatarStats particleSystemCount(@javax.annotation.Nonnull Integer particleSystemCount) { + this.particleSystemCount = particleSystemCount; + return this; + } + + /** + * Get particleSystemCount + * @return particleSystemCount + */ + @javax.annotation.Nonnull + public Integer getParticleSystemCount() { + return particleSystemCount; + } + + public void setParticleSystemCount(@javax.annotation.Nonnull Integer particleSystemCount) { + this.particleSystemCount = particleSystemCount; + } + + + public FileAnalysisAvatarStats particleTrailsEnabled(@javax.annotation.Nonnull Boolean particleTrailsEnabled) { + this.particleTrailsEnabled = particleTrailsEnabled; + return this; + } + + /** + * Get particleTrailsEnabled + * @return particleTrailsEnabled + */ + @javax.annotation.Nonnull + public Boolean getParticleTrailsEnabled() { + return particleTrailsEnabled; + } + + public void setParticleTrailsEnabled(@javax.annotation.Nonnull Boolean particleTrailsEnabled) { + this.particleTrailsEnabled = particleTrailsEnabled; + } + + + public FileAnalysisAvatarStats physBoneColliderCount(@javax.annotation.Nonnull Integer physBoneColliderCount) { + this.physBoneColliderCount = physBoneColliderCount; + return this; + } + + /** + * Get physBoneColliderCount + * @return physBoneColliderCount + */ + @javax.annotation.Nonnull + public Integer getPhysBoneColliderCount() { + return physBoneColliderCount; + } + + public void setPhysBoneColliderCount(@javax.annotation.Nonnull Integer physBoneColliderCount) { + this.physBoneColliderCount = physBoneColliderCount; + } + + + public FileAnalysisAvatarStats physBoneCollisionCheckCount(@javax.annotation.Nonnull Integer physBoneCollisionCheckCount) { + this.physBoneCollisionCheckCount = physBoneCollisionCheckCount; + return this; + } + + /** + * Get physBoneCollisionCheckCount + * @return physBoneCollisionCheckCount + */ + @javax.annotation.Nonnull + public Integer getPhysBoneCollisionCheckCount() { + return physBoneCollisionCheckCount; + } + + public void setPhysBoneCollisionCheckCount(@javax.annotation.Nonnull Integer physBoneCollisionCheckCount) { + this.physBoneCollisionCheckCount = physBoneCollisionCheckCount; + } + + + public FileAnalysisAvatarStats physBoneComponentCount(@javax.annotation.Nonnull Integer physBoneComponentCount) { + this.physBoneComponentCount = physBoneComponentCount; + return this; + } + + /** + * Get physBoneComponentCount + * @return physBoneComponentCount + */ + @javax.annotation.Nonnull + public Integer getPhysBoneComponentCount() { + return physBoneComponentCount; + } + + public void setPhysBoneComponentCount(@javax.annotation.Nonnull Integer physBoneComponentCount) { + this.physBoneComponentCount = physBoneComponentCount; + } + + + public FileAnalysisAvatarStats physBoneTransformCount(@javax.annotation.Nonnull Integer physBoneTransformCount) { + this.physBoneTransformCount = physBoneTransformCount; + return this; + } + + /** + * Get physBoneTransformCount + * @return physBoneTransformCount + */ + @javax.annotation.Nonnull + public Integer getPhysBoneTransformCount() { + return physBoneTransformCount; + } + + public void setPhysBoneTransformCount(@javax.annotation.Nonnull Integer physBoneTransformCount) { + this.physBoneTransformCount = physBoneTransformCount; + } + + + public FileAnalysisAvatarStats physicsColliders(@javax.annotation.Nonnull Integer physicsColliders) { + this.physicsColliders = physicsColliders; + return this; + } + + /** + * Get physicsColliders + * @return physicsColliders + */ + @javax.annotation.Nonnull + public Integer getPhysicsColliders() { + return physicsColliders; + } + + public void setPhysicsColliders(@javax.annotation.Nonnull Integer physicsColliders) { + this.physicsColliders = physicsColliders; + } + + + public FileAnalysisAvatarStats physicsRigidbodies(@javax.annotation.Nonnull Integer physicsRigidbodies) { + this.physicsRigidbodies = physicsRigidbodies; + return this; + } + + /** + * Get physicsRigidbodies + * @return physicsRigidbodies + */ + @javax.annotation.Nonnull + public Integer getPhysicsRigidbodies() { + return physicsRigidbodies; + } + + public void setPhysicsRigidbodies(@javax.annotation.Nonnull Integer physicsRigidbodies) { + this.physicsRigidbodies = physicsRigidbodies; + } + + + public FileAnalysisAvatarStats skinnedMeshCount(@javax.annotation.Nonnull Integer skinnedMeshCount) { + this.skinnedMeshCount = skinnedMeshCount; + return this; + } + + /** + * Get skinnedMeshCount + * @return skinnedMeshCount + */ + @javax.annotation.Nonnull + public Integer getSkinnedMeshCount() { + return skinnedMeshCount; + } + + public void setSkinnedMeshCount(@javax.annotation.Nonnull Integer skinnedMeshCount) { + this.skinnedMeshCount = skinnedMeshCount; + } + + + public FileAnalysisAvatarStats skinnedMeshIndices(@javax.annotation.Nonnull Integer skinnedMeshIndices) { + this.skinnedMeshIndices = skinnedMeshIndices; + return this; + } + + /** + * Get skinnedMeshIndices + * @return skinnedMeshIndices + */ + @javax.annotation.Nonnull + public Integer getSkinnedMeshIndices() { + return skinnedMeshIndices; + } + + public void setSkinnedMeshIndices(@javax.annotation.Nonnull Integer skinnedMeshIndices) { + this.skinnedMeshIndices = skinnedMeshIndices; + } + + + public FileAnalysisAvatarStats skinnedMeshPolygons(@javax.annotation.Nonnull Integer skinnedMeshPolygons) { + this.skinnedMeshPolygons = skinnedMeshPolygons; + return this; + } + + /** + * Get skinnedMeshPolygons + * @return skinnedMeshPolygons + */ + @javax.annotation.Nonnull + public Integer getSkinnedMeshPolygons() { + return skinnedMeshPolygons; + } + + public void setSkinnedMeshPolygons(@javax.annotation.Nonnull Integer skinnedMeshPolygons) { + this.skinnedMeshPolygons = skinnedMeshPolygons; + } + + + public FileAnalysisAvatarStats skinnedMeshVertices(@javax.annotation.Nonnull Integer skinnedMeshVertices) { + this.skinnedMeshVertices = skinnedMeshVertices; + return this; + } + + /** + * Get skinnedMeshVertices + * @return skinnedMeshVertices + */ + @javax.annotation.Nonnull + public Integer getSkinnedMeshVertices() { + return skinnedMeshVertices; + } + + public void setSkinnedMeshVertices(@javax.annotation.Nonnull Integer skinnedMeshVertices) { + this.skinnedMeshVertices = skinnedMeshVertices; + } + + + public FileAnalysisAvatarStats totalClothVertices(@javax.annotation.Nonnull Integer totalClothVertices) { + this.totalClothVertices = totalClothVertices; + return this; + } + + /** + * Get totalClothVertices + * @return totalClothVertices + */ + @javax.annotation.Nonnull + public Integer getTotalClothVertices() { + return totalClothVertices; + } + + public void setTotalClothVertices(@javax.annotation.Nonnull Integer totalClothVertices) { + this.totalClothVertices = totalClothVertices; + } + + + public FileAnalysisAvatarStats totalIndices(@javax.annotation.Nonnull Integer totalIndices) { + this.totalIndices = totalIndices; + return this; + } + + /** + * Get totalIndices + * @return totalIndices + */ + @javax.annotation.Nonnull + public Integer getTotalIndices() { + return totalIndices; + } + + public void setTotalIndices(@javax.annotation.Nonnull Integer totalIndices) { + this.totalIndices = totalIndices; + } + + + public FileAnalysisAvatarStats totalMaxParticles(@javax.annotation.Nonnull Integer totalMaxParticles) { + this.totalMaxParticles = totalMaxParticles; + return this; + } + + /** + * Get totalMaxParticles + * @return totalMaxParticles + */ + @javax.annotation.Nonnull + public Integer getTotalMaxParticles() { + return totalMaxParticles; + } + + public void setTotalMaxParticles(@javax.annotation.Nonnull Integer totalMaxParticles) { + this.totalMaxParticles = totalMaxParticles; + } + + + public FileAnalysisAvatarStats totalPolygons(@javax.annotation.Nonnull Integer totalPolygons) { + this.totalPolygons = totalPolygons; + return this; + } + + /** + * Get totalPolygons + * @return totalPolygons + */ + @javax.annotation.Nonnull + public Integer getTotalPolygons() { + return totalPolygons; + } + + public void setTotalPolygons(@javax.annotation.Nonnull Integer totalPolygons) { + this.totalPolygons = totalPolygons; + } + + + public FileAnalysisAvatarStats totalTextureUsage(@javax.annotation.Nonnull Integer totalTextureUsage) { + this.totalTextureUsage = totalTextureUsage; + return this; + } + + /** + * Get totalTextureUsage + * @return totalTextureUsage + */ + @javax.annotation.Nonnull + public Integer getTotalTextureUsage() { + return totalTextureUsage; + } + + public void setTotalTextureUsage(@javax.annotation.Nonnull Integer totalTextureUsage) { + this.totalTextureUsage = totalTextureUsage; + } + + + public FileAnalysisAvatarStats totalVertices(@javax.annotation.Nonnull Integer totalVertices) { + this.totalVertices = totalVertices; + return this; + } + + /** + * Get totalVertices + * @return totalVertices + */ + @javax.annotation.Nonnull + public Integer getTotalVertices() { + return totalVertices; + } + + public void setTotalVertices(@javax.annotation.Nonnull Integer totalVertices) { + this.totalVertices = totalVertices; + } + + + public FileAnalysisAvatarStats trailRendererCount(@javax.annotation.Nonnull Integer trailRendererCount) { + this.trailRendererCount = trailRendererCount; + return this; + } + + /** + * Get trailRendererCount + * @return trailRendererCount + */ + @javax.annotation.Nonnull + public Integer getTrailRendererCount() { + return trailRendererCount; + } + + public void setTrailRendererCount(@javax.annotation.Nonnull Integer trailRendererCount) { + this.trailRendererCount = trailRendererCount; + } + + + public FileAnalysisAvatarStats writeDefaultsUsed(@javax.annotation.Nonnull Boolean writeDefaultsUsed) { + this.writeDefaultsUsed = writeDefaultsUsed; + return this; + } + + /** + * Get writeDefaultsUsed + * @return writeDefaultsUsed + */ + @javax.annotation.Nonnull + public Boolean getWriteDefaultsUsed() { + return writeDefaultsUsed; + } + + public void setWriteDefaultsUsed(@javax.annotation.Nonnull Boolean writeDefaultsUsed) { + this.writeDefaultsUsed = writeDefaultsUsed; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileAnalysisAvatarStats fileAnalysisAvatarStats = (FileAnalysisAvatarStats) o; + return Objects.equals(this.animatorCount, fileAnalysisAvatarStats.animatorCount) && + Objects.equals(this.audioSourceCount, fileAnalysisAvatarStats.audioSourceCount) && + Objects.equals(this.blendShapeCount, fileAnalysisAvatarStats.blendShapeCount) && + Objects.equals(this.boneCount, fileAnalysisAvatarStats.boneCount) && + Objects.equals(this.bounds, fileAnalysisAvatarStats.bounds) && + Objects.equals(this.cameraCount, fileAnalysisAvatarStats.cameraCount) && + Objects.equals(this.clothCount, fileAnalysisAvatarStats.clothCount) && + Objects.equals(this.constraintCount, fileAnalysisAvatarStats.constraintCount) && + Objects.equals(this.constraintDepth, fileAnalysisAvatarStats.constraintDepth) && + Objects.equals(this.contactCount, fileAnalysisAvatarStats.contactCount) && + Objects.equals(this.customExpressions, fileAnalysisAvatarStats.customExpressions) && + Objects.equals(this.customizeAnimationLayers, fileAnalysisAvatarStats.customizeAnimationLayers) && + Objects.equals(this.enableEyeLook, fileAnalysisAvatarStats.enableEyeLook) && + Objects.equals(this.lightCount, fileAnalysisAvatarStats.lightCount) && + Objects.equals(this.lineRendererCount, fileAnalysisAvatarStats.lineRendererCount) && + Objects.equals(this.lipSync, fileAnalysisAvatarStats.lipSync) && + Objects.equals(this.materialCount, fileAnalysisAvatarStats.materialCount) && + Objects.equals(this.materialSlotsUsed, fileAnalysisAvatarStats.materialSlotsUsed) && + Objects.equals(this.meshCount, fileAnalysisAvatarStats.meshCount) && + Objects.equals(this.meshIndices, fileAnalysisAvatarStats.meshIndices) && + Objects.equals(this.meshParticleMaxPolygons, fileAnalysisAvatarStats.meshParticleMaxPolygons) && + Objects.equals(this.meshPolygons, fileAnalysisAvatarStats.meshPolygons) && + Objects.equals(this.meshVertices, fileAnalysisAvatarStats.meshVertices) && + Objects.equals(this.particleCollisionEnabled, fileAnalysisAvatarStats.particleCollisionEnabled) && + Objects.equals(this.particleSystemCount, fileAnalysisAvatarStats.particleSystemCount) && + Objects.equals(this.particleTrailsEnabled, fileAnalysisAvatarStats.particleTrailsEnabled) && + Objects.equals(this.physBoneColliderCount, fileAnalysisAvatarStats.physBoneColliderCount) && + Objects.equals(this.physBoneCollisionCheckCount, fileAnalysisAvatarStats.physBoneCollisionCheckCount) && + Objects.equals(this.physBoneComponentCount, fileAnalysisAvatarStats.physBoneComponentCount) && + Objects.equals(this.physBoneTransformCount, fileAnalysisAvatarStats.physBoneTransformCount) && + Objects.equals(this.physicsColliders, fileAnalysisAvatarStats.physicsColliders) && + Objects.equals(this.physicsRigidbodies, fileAnalysisAvatarStats.physicsRigidbodies) && + Objects.equals(this.skinnedMeshCount, fileAnalysisAvatarStats.skinnedMeshCount) && + Objects.equals(this.skinnedMeshIndices, fileAnalysisAvatarStats.skinnedMeshIndices) && + Objects.equals(this.skinnedMeshPolygons, fileAnalysisAvatarStats.skinnedMeshPolygons) && + Objects.equals(this.skinnedMeshVertices, fileAnalysisAvatarStats.skinnedMeshVertices) && + Objects.equals(this.totalClothVertices, fileAnalysisAvatarStats.totalClothVertices) && + Objects.equals(this.totalIndices, fileAnalysisAvatarStats.totalIndices) && + Objects.equals(this.totalMaxParticles, fileAnalysisAvatarStats.totalMaxParticles) && + Objects.equals(this.totalPolygons, fileAnalysisAvatarStats.totalPolygons) && + Objects.equals(this.totalTextureUsage, fileAnalysisAvatarStats.totalTextureUsage) && + Objects.equals(this.totalVertices, fileAnalysisAvatarStats.totalVertices) && + Objects.equals(this.trailRendererCount, fileAnalysisAvatarStats.trailRendererCount) && + Objects.equals(this.writeDefaultsUsed, fileAnalysisAvatarStats.writeDefaultsUsed); + } + + @Override + public int hashCode() { + return Objects.hash(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); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileAnalysisAvatarStats {\n"); + sb.append(" animatorCount: ").append(toIndentedString(animatorCount)).append("\n"); + sb.append(" audioSourceCount: ").append(toIndentedString(audioSourceCount)).append("\n"); + sb.append(" blendShapeCount: ").append(toIndentedString(blendShapeCount)).append("\n"); + sb.append(" boneCount: ").append(toIndentedString(boneCount)).append("\n"); + sb.append(" bounds: ").append(toIndentedString(bounds)).append("\n"); + sb.append(" cameraCount: ").append(toIndentedString(cameraCount)).append("\n"); + sb.append(" clothCount: ").append(toIndentedString(clothCount)).append("\n"); + sb.append(" constraintCount: ").append(toIndentedString(constraintCount)).append("\n"); + sb.append(" constraintDepth: ").append(toIndentedString(constraintDepth)).append("\n"); + sb.append(" contactCount: ").append(toIndentedString(contactCount)).append("\n"); + sb.append(" customExpressions: ").append(toIndentedString(customExpressions)).append("\n"); + sb.append(" customizeAnimationLayers: ").append(toIndentedString(customizeAnimationLayers)).append("\n"); + sb.append(" enableEyeLook: ").append(toIndentedString(enableEyeLook)).append("\n"); + sb.append(" lightCount: ").append(toIndentedString(lightCount)).append("\n"); + sb.append(" lineRendererCount: ").append(toIndentedString(lineRendererCount)).append("\n"); + sb.append(" lipSync: ").append(toIndentedString(lipSync)).append("\n"); + sb.append(" materialCount: ").append(toIndentedString(materialCount)).append("\n"); + sb.append(" materialSlotsUsed: ").append(toIndentedString(materialSlotsUsed)).append("\n"); + sb.append(" meshCount: ").append(toIndentedString(meshCount)).append("\n"); + sb.append(" meshIndices: ").append(toIndentedString(meshIndices)).append("\n"); + sb.append(" meshParticleMaxPolygons: ").append(toIndentedString(meshParticleMaxPolygons)).append("\n"); + sb.append(" meshPolygons: ").append(toIndentedString(meshPolygons)).append("\n"); + sb.append(" meshVertices: ").append(toIndentedString(meshVertices)).append("\n"); + sb.append(" particleCollisionEnabled: ").append(toIndentedString(particleCollisionEnabled)).append("\n"); + sb.append(" particleSystemCount: ").append(toIndentedString(particleSystemCount)).append("\n"); + sb.append(" particleTrailsEnabled: ").append(toIndentedString(particleTrailsEnabled)).append("\n"); + sb.append(" physBoneColliderCount: ").append(toIndentedString(physBoneColliderCount)).append("\n"); + sb.append(" physBoneCollisionCheckCount: ").append(toIndentedString(physBoneCollisionCheckCount)).append("\n"); + sb.append(" physBoneComponentCount: ").append(toIndentedString(physBoneComponentCount)).append("\n"); + sb.append(" physBoneTransformCount: ").append(toIndentedString(physBoneTransformCount)).append("\n"); + sb.append(" physicsColliders: ").append(toIndentedString(physicsColliders)).append("\n"); + sb.append(" physicsRigidbodies: ").append(toIndentedString(physicsRigidbodies)).append("\n"); + sb.append(" skinnedMeshCount: ").append(toIndentedString(skinnedMeshCount)).append("\n"); + sb.append(" skinnedMeshIndices: ").append(toIndentedString(skinnedMeshIndices)).append("\n"); + sb.append(" skinnedMeshPolygons: ").append(toIndentedString(skinnedMeshPolygons)).append("\n"); + sb.append(" skinnedMeshVertices: ").append(toIndentedString(skinnedMeshVertices)).append("\n"); + sb.append(" totalClothVertices: ").append(toIndentedString(totalClothVertices)).append("\n"); + sb.append(" totalIndices: ").append(toIndentedString(totalIndices)).append("\n"); + sb.append(" totalMaxParticles: ").append(toIndentedString(totalMaxParticles)).append("\n"); + sb.append(" totalPolygons: ").append(toIndentedString(totalPolygons)).append("\n"); + sb.append(" totalTextureUsage: ").append(toIndentedString(totalTextureUsage)).append("\n"); + sb.append(" totalVertices: ").append(toIndentedString(totalVertices)).append("\n"); + sb.append(" trailRendererCount: ").append(toIndentedString(trailRendererCount)).append("\n"); + sb.append(" writeDefaultsUsed: ").append(toIndentedString(writeDefaultsUsed)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileAnalysisAvatarStats.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 `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 (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(java.util.Locale.ROOT, "Expected the field `bounds` to be an array in the JSON string but got `%s`", jsonObj.get("bounds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FileAnalysisAvatarStats.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FileAnalysisAvatarStats' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FileAnalysisAvatarStats.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FileAnalysisAvatarStats value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FileAnalysisAvatarStats read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 31f00342..45d0f917 100644 --- a/src/main/java/io/github/vrchatapi/model/FileData.java +++ b/src/main/java/io/github/vrchatapi/model/FileData.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,21 +13,42 @@ package io.github.vrchatapi.model; import 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; +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; /** - * FileData + * */ -@javax.annotation.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 @@ -76,199 +97,186 @@ 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.Nonnull - @ApiModelProperty(required = true, value = "") - + */ + @javax.annotation.Nullable 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -312,11 +320,117 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("category", "fileName", "md5", "sizeInBytes", "status", "uploadId", "url")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileData.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FileData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FileData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FileData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FileData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FileData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 5089de79..4f144b35 100644 --- a/src/main/java/io/github/vrchatapi/model/FileStatus.java +++ b/src/main/java/io/github/vrchatapi/model/FileStatus.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,13 +28,13 @@ @JsonAdapter(FileStatus.Adapter.class) public enum FileStatus { - WAITING("waiting"), - COMPLETE("complete"), NONE("none"), - QUEUED("queued"); + QUEUED("queued"), + + WAITING("waiting"); private String value; @@ -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 668004bf..c0be545a 100644 --- a/src/main/java/io/github/vrchatapi/model/FileUploadURL.java +++ b/src/main/java/io/github/vrchatapi/model/FileUploadURL.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,49 +13,70 @@ package io.github.vrchatapi.model; import 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; +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; /** - * FileUploadURL + * */ -@javax.annotation.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; } - /** - * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -87,11 +108,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("url")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileUploadURL.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 `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 (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(java.util.Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FileUploadURL.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FileUploadURL' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FileUploadURL.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FileUploadURL value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FileUploadURL read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 c6f460d2..fc45363b 100644 --- a/src/main/java/io/github/vrchatapi/model/FileVersion.java +++ b/src/main/java/io/github/vrchatapi/model/FileVersion.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,207 +20,211 @@ 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 org.threeten.bp.OffsetDateTime; +import java.time.OffsetDateTime; +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; /** - * FileVersion + * */ -@javax.annotation.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) - private FileData 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) { - - this.file = file; + public FileVersion _file(@javax.annotation.Nullable FileData _file) { + this._file = _file; return this; } - /** - * Get file - * @return file - **/ + /** + * Get _file + * @return _file + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - public FileData getFile() { - return file; + return _file; } - - public void setFile(FileData file) { - this.file = 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -234,7 +237,7 @@ public boolean equals(Object o) { return Objects.equals(this.createdAt, fileVersion.createdAt) && Objects.equals(this.deleted, fileVersion.deleted) && Objects.equals(this.delta, fileVersion.delta) && - Objects.equals(this.file, fileVersion.file) && + Objects.equals(this._file, fileVersion._file) && Objects.equals(this.signature, fileVersion.signature) && Objects.equals(this.status, fileVersion.status) && Objects.equals(this.version, fileVersion.version); @@ -242,7 +245,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(createdAt, deleted, delta, file, signature, status, version); + return Objects.hash(createdAt, deleted, delta, _file, signature, status, version); } @Override @@ -252,7 +255,7 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); sb.append(" delta: ").append(toIndentedString(delta)).append("\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); @@ -265,11 +268,112 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("created_at", "deleted", "delta", "file", "signature", "status", "version")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "status", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileVersion.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 `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 (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.validateJsonElement(jsonObj.get("delta")); + } + // validate the optional field `file` + if (jsonObj.get("file") != null && !jsonObj.get("file").isJsonNull()) { + FileData.validateJsonElement(jsonObj.get("file")); + } + // validate the optional field `signature` + if (jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) { + FileData.validateJsonElement(jsonObj.get("signature")); + } + // validate the required field `status` + FileStatus.validateJsonElement(jsonObj.get("status")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FileVersion.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FileVersion' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FileVersion.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FileVersion value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FileVersion read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 f6b59dc3..6125d339 100644 --- a/src/main/java/io/github/vrchatapi/model/FileVersionUploadStatus.java +++ b/src/main/java/io/github/vrchatapi/model/FileVersionUploadStatus.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,199 +13,210 @@ package io.github.vrchatapi.model; import 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; +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; /** - * FileVersionUploadStatus + * */ -@javax.annotation.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_UPLOAD_ID = "uploadId"; - @SerializedName(SERIALIZED_NAME_UPLOAD_ID) - private String uploadId; + 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_NEXT_PART_NUMBER = "nextPartNumber"; - @SerializedName(SERIALIZED_NAME_NEXT_PART_NUMBER) - private BigDecimal nextPartNumber; - public static final String SERIALIZED_NAME_MAX_PARTS = "maxParts"; @SerializedName(SERIALIZED_NAME_MAX_PARTS) - private BigDecimal maxParts; + @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) - private List parts = new ArrayList(); + @javax.annotation.Nonnull + private List parts = new ArrayList<>(); - public static final String SERIALIZED_NAME_ETAGS = "etags"; - @SerializedName(SERIALIZED_NAME_ETAGS) - private List etags = 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 uploadId(String uploadId) { - - this.uploadId = uploadId; + public FileVersionUploadStatus etags(@javax.annotation.Nonnull List etags) { + this.etags = etags; 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 FileVersionUploadStatus addEtagsItem(Object etagsItem) { + if (this.etags == null) { + this.etags = new ArrayList<>(); + } + this.etags.add(etagsItem); + return this; } + /** + * Unknown + * @return etags + */ + @javax.annotation.Nonnull + public List getEtags() { + return etags; + } - public void setUploadId(String uploadId) { - this.uploadId = uploadId; + 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 nextPartNumber(BigDecimal nextPartNumber) { - - this.nextPartNumber = nextPartNumber; + public FileVersionUploadStatus maxParts(@javax.annotation.Nonnull Integer maxParts) { + this.maxParts = maxParts; return this; } - /** - * Get nextPartNumber - * minimum: 0 - * @return nextPartNumber - **/ + /** + * Get maxParts + * minimum: 1 + * @return maxParts + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "0", required = true, value = "") - - public BigDecimal getNextPartNumber() { - return nextPartNumber; + public Integer getMaxParts() { + return maxParts; } - - public void setNextPartNumber(BigDecimal nextPartNumber) { - this.nextPartNumber = nextPartNumber; + public void setMaxParts(@javax.annotation.Nonnull Integer maxParts) { + this.maxParts = maxParts; } - public FileVersionUploadStatus maxParts(BigDecimal maxParts) { - - this.maxParts = maxParts; + public FileVersionUploadStatus nextPartNumber(@javax.annotation.Nonnull Integer nextPartNumber) { + this.nextPartNumber = nextPartNumber; return this; } - /** - * Get maxParts - * minimum: 1 - * @return maxParts - **/ + /** + * Get nextPartNumber + * minimum: 0 + * @return nextPartNumber + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "1000", required = true, value = "") - - public BigDecimal getMaxParts() { - return maxParts; + public Integer getNextPartNumber() { + return nextPartNumber; } - - public void setMaxParts(BigDecimal maxParts) { - this.maxParts = maxParts; + 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 etags(List etags) { - - this.etags = etags; - return this; - } - - public FileVersionUploadStatus addEtagsItem(Object etagsItem) { - this.etags.add(etagsItem); + public FileVersionUploadStatus uploadId(@javax.annotation.Nonnull String uploadId) { + this.uploadId = uploadId; return this; } - /** - * Unknown - * @return etags - **/ + /** + * Get uploadId + * @return uploadId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown") - - public List getEtags() { - return etags; + public String getUploadId() { + return uploadId; } - - public void setEtags(List etags) { - this.etags = etags; + public void setUploadId(@javax.annotation.Nonnull String uploadId) { + this.uploadId = uploadId; } + @Override public boolean equals(Object o) { if (this == o) { @@ -215,29 +226,29 @@ public boolean equals(Object o) { return false; } FileVersionUploadStatus fileVersionUploadStatus = (FileVersionUploadStatus) o; - return Objects.equals(this.uploadId, fileVersionUploadStatus.uploadId) && + return Objects.equals(this.etags, fileVersionUploadStatus.etags) && Objects.equals(this.fileName, fileVersionUploadStatus.fileName) && - Objects.equals(this.nextPartNumber, fileVersionUploadStatus.nextPartNumber) && Objects.equals(this.maxParts, fileVersionUploadStatus.maxParts) && + Objects.equals(this.nextPartNumber, fileVersionUploadStatus.nextPartNumber) && Objects.equals(this.parts, fileVersionUploadStatus.parts) && - Objects.equals(this.etags, fileVersionUploadStatus.etags); + Objects.equals(this.uploadId, fileVersionUploadStatus.uploadId); } @Override public int hashCode() { - return Objects.hash(uploadId, fileName, nextPartNumber, maxParts, parts, etags); + return Objects.hash(etags, fileName, maxParts, nextPartNumber, parts, uploadId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileVersionUploadStatus {\n"); - sb.append(" uploadId: ").append(toIndentedString(uploadId)).append("\n"); + sb.append(" etags: ").append(toIndentedString(etags)).append("\n"); sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); - sb.append(" nextPartNumber: ").append(toIndentedString(nextPartNumber)).append("\n"); sb.append(" maxParts: ").append(toIndentedString(maxParts)).append("\n"); + sb.append(" nextPartNumber: ").append(toIndentedString(nextPartNumber)).append("\n"); sb.append(" parts: ").append(toIndentedString(parts)).append("\n"); - sb.append(" etags: ").append(toIndentedString(etags)).append("\n"); + sb.append(" uploadId: ").append(toIndentedString(uploadId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -247,11 +258,116 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("etags", "fileName", "maxParts", "nextPartNumber", "parts", "uploadId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("etags", "fileName", "maxParts", "nextPartNumber", "parts", "uploadId")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FileVersionUploadStatus.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 `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 (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(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(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(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(java.util.Locale.ROOT, "Expected the field `uploadId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uploadId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FileVersionUploadStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FileVersionUploadStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FileVersionUploadStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FileVersionUploadStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FileVersionUploadStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 af780850..932b297c 100644 --- a/src/main/java/io/github/vrchatapi/model/FinishFileDataUploadRequest.java +++ b/src/main/java/io/github/vrchatapi/model/FinishFileDataUploadRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,118 +13,138 @@ package io.github.vrchatapi.model; import 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; + +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; + /** - * FinishFileDataUploadRequest + * */ -@javax.annotation.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; - - public static final String SERIALIZED_NAME_NEXT_PART_NUMBER = "nextPartNumber"; - @SerializedName(SERIALIZED_NAME_NEXT_PART_NUMBER) - private String nextPartNumber = "0"; + @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; } public FinishFileDataUploadRequest addEtagsItem(String etagsItem) { if (this.etags == null) { - this.etags = new LinkedHashSet(); + this.etags = new LinkedHashSet<>(); } this.etags.add(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 nextPartNumber(String nextPartNumber) { - - this.nextPartNumber = nextPartNumber; + @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 nextPartNumber + * @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 getNextPartNumber() { - return nextPartNumber; + public String getMaxParts() { + return maxParts; } - - public void setNextPartNumber(String nextPartNumber) { - this.nextPartNumber = nextPartNumber; + @Deprecated + public void setMaxParts(@javax.annotation.Nonnull String maxParts) { + this.maxParts = maxParts; } - public FinishFileDataUploadRequest maxParts(String maxParts) { - - this.maxParts = maxParts; + @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 maxParts + * @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 getMaxParts() { - return maxParts; + public String getNextPartNumber() { + return nextPartNumber; } - - public void setMaxParts(String maxParts) { - this.maxParts = maxParts; + @Deprecated + public void setNextPartNumber(@javax.annotation.Nonnull String nextPartNumber) { + this.nextPartNumber = nextPartNumber; } + @Override public boolean equals(Object o) { if (this == o) { @@ -135,13 +155,13 @@ public boolean equals(Object o) { } FinishFileDataUploadRequest finishFileDataUploadRequest = (FinishFileDataUploadRequest) o; return Objects.equals(this.etags, finishFileDataUploadRequest.etags) && - Objects.equals(this.nextPartNumber, finishFileDataUploadRequest.nextPartNumber) && - Objects.equals(this.maxParts, finishFileDataUploadRequest.maxParts); + Objects.equals(this.maxParts, finishFileDataUploadRequest.maxParts) && + Objects.equals(this.nextPartNumber, finishFileDataUploadRequest.nextPartNumber); } @Override public int hashCode() { - return Objects.hash(etags, nextPartNumber, maxParts); + return Objects.hash(etags, maxParts, nextPartNumber); } @Override @@ -149,8 +169,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FinishFileDataUploadRequest {\n"); sb.append(" etags: ").append(toIndentedString(etags)).append("\n"); - sb.append(" nextPartNumber: ").append(toIndentedString(nextPartNumber)).append("\n"); sb.append(" maxParts: ").append(toIndentedString(maxParts)).append("\n"); + sb.append(" nextPartNumber: ").append(toIndentedString(nextPartNumber)).append("\n"); sb.append("}"); return sb.toString(); } @@ -160,11 +180,108 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("etags", "maxParts", "nextPartNumber")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("maxParts", "nextPartNumber")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FinishFileDataUploadRequest.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 `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 (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").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(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(java.util.Locale.ROOT, "Expected the field `nextPartNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPartNumber").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FinishFileDataUploadRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FinishFileDataUploadRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FinishFileDataUploadRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FinishFileDataUploadRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FinishFileDataUploadRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..79ff59bc --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/FollowCalendarEventRequest.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * FollowCalendarEventRequest + */ +@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(@javax.annotation.Nonnull Boolean isFollowing) { + this.isFollowing = isFollowing; + return this; + } + + /** + * Get isFollowing + * @return isFollowing + */ + @javax.annotation.Nonnull + public Boolean getIsFollowing() { + return isFollowing; + } + + public void setIsFollowing(@javax.annotation.Nonnull Boolean isFollowing) { + this.isFollowing = isFollowing; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FollowCalendarEventRequest followCalendarEventRequest = (FollowCalendarEventRequest) o; + return Objects.equals(this.isFollowing, followCalendarEventRequest.isFollowing); + } + + @Override + public int hashCode() { + return Objects.hash(isFollowing); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FollowCalendarEventRequest {\n"); + sb.append(" isFollowing: ").append(toIndentedString(isFollowing)).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("isFollowing")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("isFollowing")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FollowCalendarEventRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FollowCalendarEventRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FollowCalendarEventRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FollowCalendarEventRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FollowCalendarEventRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FollowCalendarEventRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 1a0bbeca..cc75c484 100644 --- a/src/main/java/io/github/vrchatapi/model/FriendStatus.java +++ b/src/main/java/io/github/vrchatapi/model/FriendStatus.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,103 +13,118 @@ package io.github.vrchatapi.model; import 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; +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; + /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -145,11 +160,98 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("incomingRequest", "isFriend", "outgoingRequest")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("incomingRequest", "isFriend", "outgoingRequest")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FriendStatus.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FriendStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FriendStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FriendStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FriendStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FriendStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..fda0498b --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GetGroupPosts200Response.java @@ -0,0 +1,223 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPost; +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; + +/** + * GetGroupPosts200Response + */ +@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) + @javax.annotation.Nullable + private List posts = new ArrayList<>(); + + public GetGroupPosts200Response() { + } + + public GetGroupPosts200Response posts(@javax.annotation.Nullable List posts) { + this.posts = posts; + return this; + } + + public GetGroupPosts200Response addPostsItem(GroupPost postsItem) { + if (this.posts == null) { + this.posts = new ArrayList<>(); + } + this.posts.add(postsItem); + return this; + } + + /** + * Get posts + * @return posts + */ + @javax.annotation.Nullable + public List getPosts() { + return posts; + } + + public void setPosts(@javax.annotation.Nullable List posts) { + this.posts = posts; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetGroupPosts200Response getGroupPosts200Response = (GetGroupPosts200Response) o; + return Objects.equals(this.posts, getGroupPosts200Response.posts); + } + + @Override + public int hashCode() { + return Objects.hash(posts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetGroupPosts200Response {\n"); + sb.append(" posts: ").append(toIndentedString(posts)).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("posts")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetGroupPosts200Response.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 `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(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.validateJsonElement(jsonArrayposts.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetGroupPosts200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetGroupPosts200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetGroupPosts200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetGroupPosts200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetGroupPosts200Response read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..4a39545b --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GetUserGroupInstances200Response.java @@ -0,0 +1,250 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.Instance; +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; +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; + +/** + * GetUserGroupInstances200Response + */ +@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) + @javax.annotation.Nullable + private List instances = new ArrayList<>(); + + public GetUserGroupInstances200Response() { + } + + public GetUserGroupInstances200Response fetchedAt(@javax.annotation.Nullable OffsetDateTime fetchedAt) { + this.fetchedAt = fetchedAt; + return this; + } + + /** + * Get fetchedAt + * @return fetchedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getFetchedAt() { + return fetchedAt; + } + + public void setFetchedAt(@javax.annotation.Nullable OffsetDateTime fetchedAt) { + this.fetchedAt = fetchedAt; + } + + + public GetUserGroupInstances200Response instances(@javax.annotation.Nullable List instances) { + this.instances = instances; + return this; + } + + public GetUserGroupInstances200Response addInstancesItem(Instance instancesItem) { + if (this.instances == null) { + this.instances = new ArrayList<>(); + } + this.instances.add(instancesItem); + return this; + } + + /** + * Get instances + * @return instances + */ + @javax.annotation.Nullable + public List getInstances() { + return instances; + } + + public void setInstances(@javax.annotation.Nullable List instances) { + this.instances = instances; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUserGroupInstances200Response getUserGroupInstances200Response = (GetUserGroupInstances200Response) o; + return Objects.equals(this.fetchedAt, getUserGroupInstances200Response.fetchedAt) && + Objects.equals(this.instances, getUserGroupInstances200Response.instances); + } + + @Override + public int hashCode() { + return Objects.hash(fetchedAt, instances); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetUserGroupInstances200Response {\n"); + sb.append(" fetchedAt: ").append(toIndentedString(fetchedAt)).append("\n"); + sb.append(" instances: ").append(toIndentedString(instances)).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("fetchedAt", "instances")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GetUserGroupInstances200Response.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 `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(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.validateJsonElement(jsonArrayinstances.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetUserGroupInstances200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetUserGroupInstances200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetUserGroupInstances200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetUserGroupInstances200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetUserGroupInstances200Response read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..3aab1d2f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Group.java @@ -0,0 +1,1199 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupGallery; +import io.github.vrchatapi.model.GroupJoinState; +import io.github.vrchatapi.model.GroupMemberStatus; +import io.github.vrchatapi.model.GroupMyMember; +import io.github.vrchatapi.model.GroupPrivacy; +import io.github.vrchatapi.model.GroupRole; +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; + +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; + +/** + * Group + */ +@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) + @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) + @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) + @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) + @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) + @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) + @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(@javax.annotation.Nullable String ageVerificationBetaCode) { + this.ageVerificationBetaCode = ageVerificationBetaCode; + return this; + } + + /** + * Get ageVerificationBetaCode + * @return ageVerificationBetaCode + */ + @javax.annotation.Nullable + public String getAgeVerificationBetaCode() { + return ageVerificationBetaCode; + } + + public void setAgeVerificationBetaCode(@javax.annotation.Nullable String ageVerificationBetaCode) { + this.ageVerificationBetaCode = ageVerificationBetaCode; + } + + + public Group ageVerificationBetaSlots(@javax.annotation.Nullable BigDecimal ageVerificationBetaSlots) { + this.ageVerificationBetaSlots = ageVerificationBetaSlots; + return this; + } + + /** + * Get ageVerificationBetaSlots + * @return ageVerificationBetaSlots + */ + @javax.annotation.Nullable + public BigDecimal getAgeVerificationBetaSlots() { + return ageVerificationBetaSlots; + } + + public void setAgeVerificationBetaSlots(@javax.annotation.Nullable BigDecimal ageVerificationBetaSlots) { + this.ageVerificationBetaSlots = ageVerificationBetaSlots; + } + + + public Group ageVerificationSlotsAvailable(@javax.annotation.Nullable Boolean ageVerificationSlotsAvailable) { + this.ageVerificationSlotsAvailable = ageVerificationSlotsAvailable; + return this; + } + + /** + * Get ageVerificationSlotsAvailable + * @return ageVerificationSlotsAvailable + */ + @javax.annotation.Nullable + public Boolean getAgeVerificationSlotsAvailable() { + return ageVerificationSlotsAvailable; + } + + public void setAgeVerificationSlotsAvailable(@javax.annotation.Nullable Boolean ageVerificationSlotsAvailable) { + this.ageVerificationSlotsAvailable = ageVerificationSlotsAvailable; + } + + + public Group allowGroupJoinPrompt(@javax.annotation.Nullable Boolean allowGroupJoinPrompt) { + this.allowGroupJoinPrompt = allowGroupJoinPrompt; + return this; + } + + /** + * Get allowGroupJoinPrompt + * @return allowGroupJoinPrompt + */ + @javax.annotation.Nullable + public Boolean getAllowGroupJoinPrompt() { + return allowGroupJoinPrompt; + } + + public void setAllowGroupJoinPrompt(@javax.annotation.Nullable Boolean allowGroupJoinPrompt) { + this.allowGroupJoinPrompt = allowGroupJoinPrompt; + } + + + public Group badges(@javax.annotation.Nullable List badges) { + this.badges = badges; + return this; + } + + public Group addBadgesItem(String 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 Group bannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + return this; + } + + /** + * Get bannerId + * @return bannerId + */ + @javax.annotation.Nullable + public String getBannerId() { + return bannerId; + } + + public void setBannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + } + + + public Group 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 Group createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public Group description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public Group discriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + return this; + } + + /** + * Get discriminator + * @return discriminator + */ + @javax.annotation.Nullable + public String getDiscriminator() { + return discriminator; + } + + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + } + + + public Group galleries(@javax.annotation.Nullable List galleries) { + this.galleries = galleries; + return this; + } + + public Group addGalleriesItem(GroupGallery galleriesItem) { + if (this.galleries == null) { + this.galleries = new ArrayList<>(); + } + this.galleries.add(galleriesItem); + return this; + } + + /** + * Get galleries + * @return galleries + */ + @javax.annotation.Nullable + public List getGalleries() { + return galleries; + } + + public void setGalleries(@javax.annotation.Nullable List galleries) { + this.galleries = galleries; + } + + + public Group iconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + return this; + } + + /** + * Get iconId + * @return iconId + */ + @javax.annotation.Nullable + public String getIconId() { + return iconId; + } + + public void setIconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + } + + + public Group 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 Group 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 Group isVerified(@javax.annotation.Nullable Boolean isVerified) { + this.isVerified = isVerified; + return this; + } + + /** + * Get isVerified + * @return isVerified + */ + @javax.annotation.Nullable + public Boolean getIsVerified() { + return isVerified; + } + + public void setIsVerified(@javax.annotation.Nullable Boolean isVerified) { + this.isVerified = isVerified; + } + + + public Group joinState(@javax.annotation.Nullable GroupJoinState joinState) { + this.joinState = joinState; + return this; + } + + /** + * Get joinState + * @return joinState + */ + @javax.annotation.Nullable + public GroupJoinState getJoinState() { + return joinState; + } + + public void setJoinState(@javax.annotation.Nullable GroupJoinState joinState) { + this.joinState = joinState; + } + + + public Group languages(@javax.annotation.Nullable List languages) { + this.languages = languages; + return this; + } + + public Group 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 Group lastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { + this.lastPostCreatedAt = lastPostCreatedAt; + return this; + } + + /** + * Get lastPostCreatedAt + * @return lastPostCreatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastPostCreatedAt() { + return lastPostCreatedAt; + } + + public void setLastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { + this.lastPostCreatedAt = lastPostCreatedAt; + } + + + public Group links(@javax.annotation.Nullable List links) { + this.links = links; + return this; + } + + public Group addLinksItem(String linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + */ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(@javax.annotation.Nullable List links) { + this.links = links; + } + + + public Group memberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + return this; + } + + /** + * Get memberCount + * @return memberCount + */ + @javax.annotation.Nullable + public Integer getMemberCount() { + return memberCount; + } + + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + } + + + public Group memberCountSyncedAt(@javax.annotation.Nullable OffsetDateTime memberCountSyncedAt) { + this.memberCountSyncedAt = memberCountSyncedAt; + return this; + } + + /** + * Get memberCountSyncedAt + * @return memberCountSyncedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getMemberCountSyncedAt() { + return memberCountSyncedAt; + } + + public void setMemberCountSyncedAt(@javax.annotation.Nullable OffsetDateTime memberCountSyncedAt) { + this.memberCountSyncedAt = memberCountSyncedAt; + } + + + public Group membershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { + this.membershipStatus = membershipStatus; + return this; + } + + /** + * Get membershipStatus + * @return membershipStatus + */ + @javax.annotation.Nullable + public GroupMemberStatus getMembershipStatus() { + return membershipStatus; + } + + public void setMembershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { + this.membershipStatus = membershipStatus; + } + + + public Group myMember(@javax.annotation.Nullable GroupMyMember myMember) { + this.myMember = myMember; + return this; + } + + /** + * Get myMember + * @return myMember + */ + @javax.annotation.Nullable + public GroupMyMember getMyMember() { + return myMember; + } + + public void setMyMember(@javax.annotation.Nullable GroupMyMember myMember) { + this.myMember = myMember; + } + + + public Group name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public Group onlineMemberCount(@javax.annotation.Nullable Integer onlineMemberCount) { + this.onlineMemberCount = onlineMemberCount; + return this; + } + + /** + * Get onlineMemberCount + * @return onlineMemberCount + */ + @javax.annotation.Nullable + public Integer getOnlineMemberCount() { + return onlineMemberCount; + } + + public void setOnlineMemberCount(@javax.annotation.Nullable Integer onlineMemberCount) { + this.onlineMemberCount = onlineMemberCount; + } + + + 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 + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public Group privacy(@javax.annotation.Nullable GroupPrivacy privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public GroupPrivacy getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable GroupPrivacy privacy) { + this.privacy = privacy; + } + + + public Group roles(@javax.annotation.Nullable List roles) { + this.roles = roles; + return this; + } + + public Group addRolesItem(GroupRole rolesItem) { + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.add(rolesItem); + return this; + } + + /** + * Only returned if ?includeRoles=true is specified. + * @return roles + */ + @javax.annotation.Nullable + public List getRoles() { + return roles; + } + + public void setRoles(@javax.annotation.Nullable List roles) { + this.roles = roles; + } + + + public Group rules(@javax.annotation.Nullable String rules) { + this.rules = rules; + return this; + } + + /** + * Get rules + * @return rules + */ + @javax.annotation.Nullable + public String getRules() { + return rules; + } + + public void setRules(@javax.annotation.Nullable String rules) { + this.rules = rules; + } + + + public Group shortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + return this; + } + + /** + * Get shortCode + * @return shortCode + */ + @javax.annotation.Nullable + public String getShortCode() { + return shortCode; + } + + public void setShortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + } + + + public Group tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public Group addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + 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 + public String getTransferTargetId() { + return transferTargetId; + } + + public void setTransferTargetId(@javax.annotation.Nullable String transferTargetId) { + this.transferTargetId = transferTargetId; + } + + + public Group updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Group group = (Group) o; + return Objects.equals(this.ageVerificationBetaCode, group.ageVerificationBetaCode) && + Objects.equals(this.ageVerificationBetaSlots, group.ageVerificationBetaSlots) && + Objects.equals(this.ageVerificationSlotsAvailable, group.ageVerificationSlotsAvailable) && + Objects.equals(this.allowGroupJoinPrompt, group.allowGroupJoinPrompt) && + Objects.equals(this.badges, group.badges) && + Objects.equals(this.bannerId, group.bannerId) && + Objects.equals(this.bannerUrl, group.bannerUrl) && + Objects.equals(this.createdAt, group.createdAt) && + Objects.equals(this.description, group.description) && + Objects.equals(this.discriminator, group.discriminator) && + Objects.equals(this.galleries, group.galleries) && + Objects.equals(this.iconId, group.iconId) && + Objects.equals(this.iconUrl, group.iconUrl) && + Objects.equals(this.id, group.id) && + Objects.equals(this.isVerified, group.isVerified) && + Objects.equals(this.joinState, group.joinState) && + Objects.equals(this.languages, group.languages) && + Objects.equals(this.lastPostCreatedAt, group.lastPostCreatedAt) && + Objects.equals(this.links, group.links) && + Objects.equals(this.memberCount, group.memberCount) && + Objects.equals(this.memberCountSyncedAt, group.memberCountSyncedAt) && + Objects.equals(this.membershipStatus, group.membershipStatus) && + Objects.equals(this.myMember, group.myMember) && + Objects.equals(this.name, group.name) && + Objects.equals(this.onlineMemberCount, group.onlineMemberCount) && + Objects.equals(this.ownerId, group.ownerId) && + Objects.equals(this.privacy, group.privacy) && + Objects.equals(this.roles, group.roles) && + Objects.equals(this.rules, group.rules) && + Objects.equals(this.shortCode, group.shortCode) && + Objects.equals(this.tags, group.tags) && + Objects.equals(this.transferTargetId, group.transferTargetId) && + Objects.equals(this.updatedAt, group.updatedAt); + } + + 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(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); + } + + 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 Group {\n"); + sb.append(" ageVerificationBetaCode: ").append(toIndentedString(ageVerificationBetaCode)).append("\n"); + sb.append(" ageVerificationBetaSlots: ").append(toIndentedString(ageVerificationBetaSlots)).append("\n"); + sb.append(" ageVerificationSlotsAvailable: ").append(toIndentedString(ageVerificationSlotsAvailable)).append("\n"); + sb.append(" allowGroupJoinPrompt: ").append(toIndentedString(allowGroupJoinPrompt)).append("\n"); + sb.append(" badges: ").append(toIndentedString(badges)).append("\n"); + sb.append(" bannerId: ").append(toIndentedString(bannerId)).append("\n"); + sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" discriminator: ").append(toIndentedString(discriminator)).append("\n"); + sb.append(" galleries: ").append(toIndentedString(galleries)).append("\n"); + sb.append(" iconId: ").append(toIndentedString(iconId)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isVerified: ").append(toIndentedString(isVerified)).append("\n"); + sb.append(" joinState: ").append(toIndentedString(joinState)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" lastPostCreatedAt: ").append(toIndentedString(lastPostCreatedAt)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" memberCount: ").append(toIndentedString(memberCount)).append("\n"); + sb.append(" memberCountSyncedAt: ").append(toIndentedString(memberCountSyncedAt)).append("\n"); + sb.append(" membershipStatus: ").append(toIndentedString(membershipStatus)).append("\n"); + sb.append(" myMember: ").append(toIndentedString(myMember)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" onlineMemberCount: ").append(toIndentedString(onlineMemberCount)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" shortCode: ").append(toIndentedString(shortCode)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" transferTargetId: ").append(toIndentedString(transferTargetId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Group.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 `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(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").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(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(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(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(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(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.validateJsonElement(jsonArraygalleries.get(i)); + }; + } + } + if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { + 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(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())); + } + // 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").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").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.validateJsonElement(jsonObj.get("myMember")); + } + 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())); + } + if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !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())); + } + // 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(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.validateJsonElement(jsonArrayroles.get(i)); + }; + } + } + if ((jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) && !jsonObj.get("rules").isJsonPrimitive()) { + 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(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").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(java.util.Locale.ROOT, "Expected the field `transferTargetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTargetId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Group.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Group' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Group.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Group value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Group read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..3c4913e1 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupAccessType.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Group access type when the instance type is \"group\" + */ +@JsonAdapter(GroupAccessType.Adapter.class) +public enum GroupAccessType { + + MEMBERS("members"), + + PLUS("plus"), + + PUBLIC("public"); + + private String value; + + GroupAccessType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupAccessType fromValue(String value) { + for (GroupAccessType b : GroupAccessType.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 GroupAccessType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupAccessType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..0a93b160 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupAnnouncement.java @@ -0,0 +1,440 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * GroupAnnouncement + */ +@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(@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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public GroupAnnouncement createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public GroupAnnouncement groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public GroupAnnouncement 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 GroupAnnouncement imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public GroupAnnouncement imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public GroupAnnouncement text(@javax.annotation.Nullable String text) { + this.text = text; + return this; + } + + /** + * Get text + * @return text + */ + @javax.annotation.Nullable + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nullable String text) { + this.text = text; + } + + + public GroupAnnouncement title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nullable + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + + public GroupAnnouncement updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupAnnouncement groupAnnouncement = (GroupAnnouncement) o; + return Objects.equals(this.authorId, groupAnnouncement.authorId) && + Objects.equals(this.createdAt, groupAnnouncement.createdAt) && + Objects.equals(this.groupId, groupAnnouncement.groupId) && + Objects.equals(this.id, groupAnnouncement.id) && + Objects.equals(this.imageId, groupAnnouncement.imageId) && + Objects.equals(this.imageUrl, groupAnnouncement.imageUrl) && + Objects.equals(this.text, groupAnnouncement.text) && + Objects.equals(this.title, groupAnnouncement.title) && + Objects.equals(this.updatedAt, groupAnnouncement.updatedAt); + } + + 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(authorId, createdAt, groupId, id, imageId, imageUrl, text, title, updatedAt); + } + + 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 GroupAnnouncement {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("authorId", "createdAt", "groupId", "id", "imageId", "imageUrl", "text", "title", "updatedAt")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupAnnouncement.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 `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(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(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(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(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(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(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(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 (!GroupAnnouncement.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupAnnouncement' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupAnnouncement.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupAnnouncement value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupAnnouncement read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..be62648a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupAuditLogEntry.java @@ -0,0 +1,428 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * GroupAuditLogEntry + */ +@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(@javax.annotation.Nullable String actorDisplayName) { + this.actorDisplayName = actorDisplayName; + return this; + } + + /** + * Get actorDisplayName + * @return actorDisplayName + */ + @javax.annotation.Nullable + public String getActorDisplayName() { + return actorDisplayName; + } + + public void setActorDisplayName(@javax.annotation.Nullable String actorDisplayName) { + this.actorDisplayName = actorDisplayName; + } + + + 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 + public String getActorId() { + return actorId; + } + + public void setActorId(@javax.annotation.Nullable String actorId) { + this.actorId = actorId; + } + + + public GroupAuditLogEntry createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + 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 + public Object getData() { + return data; + } + + public void setData(@javax.annotation.Nullable Object data) { + this.data = data; + } + + + 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 + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + 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 + public String getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nullable String eventType) { + this.eventType = eventType; + } + + + public GroupAuditLogEntry groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public GroupAuditLogEntry 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 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 + public String getTargetId() { + return targetId; + } + + public void setTargetId(@javax.annotation.Nullable String targetId) { + this.targetId = targetId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupAuditLogEntry groupAuditLogEntry = (GroupAuditLogEntry) o; + return Objects.equals(this.actorDisplayName, groupAuditLogEntry.actorDisplayName) && + Objects.equals(this.actorId, groupAuditLogEntry.actorId) && + Objects.equals(this.createdAt, groupAuditLogEntry.createdAt) && + Objects.equals(this.data, groupAuditLogEntry.data) && + Objects.equals(this.description, groupAuditLogEntry.description) && + Objects.equals(this.eventType, groupAuditLogEntry.eventType) && + Objects.equals(this.groupId, groupAuditLogEntry.groupId) && + Objects.equals(this.id, groupAuditLogEntry.id) && + Objects.equals(this.targetId, groupAuditLogEntry.targetId); + } + + @Override + public int hashCode() { + return Objects.hash(actorDisplayName, actorId, createdAt, data, description, eventType, groupId, id, targetId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupAuditLogEntry {\n"); + sb.append(" actorDisplayName: ").append(toIndentedString(actorDisplayName)).append("\n"); + sb.append(" actorId: ").append(toIndentedString(actorId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" targetId: ").append(toIndentedString(targetId)).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("actorDisplayName", "actorId", "created_at", "data", "description", "eventType", "groupId", "id", "targetId")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupAuditLogEntry.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 `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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `targetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupAuditLogEntry.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupAuditLogEntry' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupAuditLogEntry.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupAuditLogEntry value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupAuditLogEntry read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..22b53963 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupGallery.java @@ -0,0 +1,504 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * GroupGallery + */ +@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) + @javax.annotation.Nullable + private List roleIdsToAutoApprove; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_MANAGE = "roleIdsToManage"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_MANAGE) + @javax.annotation.Nullable + private List roleIdsToManage; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT = "roleIdsToSubmit"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT) + @javax.annotation.Nullable + private List roleIdsToSubmit; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_VIEW = "roleIdsToView"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_VIEW) + @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(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public GroupGallery description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the gallery. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public GroupGallery 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 GroupGallery membersOnly(@javax.annotation.Nullable Boolean membersOnly) { + this.membersOnly = membersOnly; + return this; + } + + /** + * Whether the gallery is members only. + * @return membersOnly + */ + @javax.annotation.Nullable + public Boolean getMembersOnly() { + return membersOnly; + } + + public void setMembersOnly(@javax.annotation.Nullable Boolean membersOnly) { + this.membersOnly = membersOnly; + } + + + public GroupGallery name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the gallery. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public GroupGallery roleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { + this.roleIdsToAutoApprove = roleIdsToAutoApprove; + return this; + } + + public GroupGallery addRoleIdsToAutoApproveItem(String roleIdsToAutoApproveItem) { + if (this.roleIdsToAutoApprove == null) { + this.roleIdsToAutoApprove = new ArrayList<>(); + } + this.roleIdsToAutoApprove.add(roleIdsToAutoApproveItem); + return this; + } + + /** + * + * @return roleIdsToAutoApprove + */ + @javax.annotation.Nullable + public List getRoleIdsToAutoApprove() { + return roleIdsToAutoApprove; + } + + public void setRoleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { + this.roleIdsToAutoApprove = roleIdsToAutoApprove; + } + + + public GroupGallery roleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { + this.roleIdsToManage = roleIdsToManage; + return this; + } + + public GroupGallery addRoleIdsToManageItem(String roleIdsToManageItem) { + if (this.roleIdsToManage == null) { + this.roleIdsToManage = new ArrayList<>(); + } + this.roleIdsToManage.add(roleIdsToManageItem); + return this; + } + + /** + * + * @return roleIdsToManage + */ + @javax.annotation.Nullable + public List getRoleIdsToManage() { + return roleIdsToManage; + } + + public void setRoleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { + this.roleIdsToManage = roleIdsToManage; + } + + + public GroupGallery roleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { + this.roleIdsToSubmit = roleIdsToSubmit; + return this; + } + + public GroupGallery addRoleIdsToSubmitItem(String roleIdsToSubmitItem) { + if (this.roleIdsToSubmit == null) { + this.roleIdsToSubmit = new ArrayList<>(); + } + this.roleIdsToSubmit.add(roleIdsToSubmitItem); + return this; + } + + /** + * + * @return roleIdsToSubmit + */ + @javax.annotation.Nullable + public List getRoleIdsToSubmit() { + return roleIdsToSubmit; + } + + public void setRoleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { + this.roleIdsToSubmit = roleIdsToSubmit; + } + + + public GroupGallery roleIdsToView(@javax.annotation.Nullable List roleIdsToView) { + this.roleIdsToView = roleIdsToView; + return this; + } + + public GroupGallery addRoleIdsToViewItem(String roleIdsToViewItem) { + if (this.roleIdsToView == null) { + this.roleIdsToView = new ArrayList<>(); + } + this.roleIdsToView.add(roleIdsToViewItem); + return this; + } + + /** + * + * @return roleIdsToView + */ + @javax.annotation.Nullable + public List getRoleIdsToView() { + return roleIdsToView; + } + + public void setRoleIdsToView(@javax.annotation.Nullable List roleIdsToView) { + this.roleIdsToView = roleIdsToView; + } + + + public GroupGallery updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupGallery groupGallery = (GroupGallery) o; + return Objects.equals(this.createdAt, groupGallery.createdAt) && + Objects.equals(this.description, groupGallery.description) && + Objects.equals(this.id, groupGallery.id) && + Objects.equals(this.membersOnly, groupGallery.membersOnly) && + Objects.equals(this.name, groupGallery.name) && + Objects.equals(this.roleIdsToAutoApprove, groupGallery.roleIdsToAutoApprove) && + Objects.equals(this.roleIdsToManage, groupGallery.roleIdsToManage) && + Objects.equals(this.roleIdsToSubmit, groupGallery.roleIdsToSubmit) && + Objects.equals(this.roleIdsToView, groupGallery.roleIdsToView) && + Objects.equals(this.updatedAt, groupGallery.updatedAt); + } + + 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(createdAt, description, id, membersOnly, name, roleIdsToAutoApprove, roleIdsToManage, roleIdsToSubmit, roleIdsToView, updatedAt); + } + + 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 GroupGallery {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" membersOnly: ").append(toIndentedString(membersOnly)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" roleIdsToAutoApprove: ").append(toIndentedString(roleIdsToAutoApprove)).append("\n"); + sb.append(" roleIdsToManage: ").append(toIndentedString(roleIdsToManage)).append("\n"); + sb.append(" roleIdsToSubmit: ").append(toIndentedString(roleIdsToSubmit)).append("\n"); + sb.append(" roleIdsToView: ").append(toIndentedString(roleIdsToView)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("createdAt", "description", "id", "membersOnly", "name", "roleIdsToAutoApprove", "roleIdsToManage", "roleIdsToSubmit", "roleIdsToView", "updatedAt")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupGallery.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 `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(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(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())); + } + // ensure the optional json data is an array if present + 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").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").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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupGallery.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupGallery' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupGallery.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupGallery value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupGallery read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..66af4d36 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrder.java @@ -0,0 +1,221 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * GroupGalleryFileOrder + */ +@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(@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 + public List getIds() { + return ids; + } + + public void setIds(@javax.annotation.Nonnull List ids) { + this.ids = ids; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupGalleryFileOrder groupGalleryFileOrder = (GroupGalleryFileOrder) o; + return Objects.equals(this.ids, groupGalleryFileOrder.ids); + } + + @Override + public int hashCode() { + return Objects.hash(ids); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupGalleryFileOrder {\n"); + sb.append(" ids: ").append(toIndentedString(ids)).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("ids")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ids")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupGalleryFileOrder.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 `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 (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(java.util.Locale.ROOT, "Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupGalleryFileOrder.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupGalleryFileOrder' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupGalleryFileOrder.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupGalleryFileOrder value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupGalleryFileOrder read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..c15adb56 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupGalleryFileOrderRequest.java @@ -0,0 +1,250 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * GroupGalleryFileOrderRequest + */ +@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(@javax.annotation.Nonnull String galleryId) { + this.galleryId = galleryId; + return this; + } + + /** + * Get galleryId + * @return galleryId + */ + @javax.annotation.Nonnull + public String getGalleryId() { + return galleryId; + } + + public void setGalleryId(@javax.annotation.Nonnull String galleryId) { + this.galleryId = galleryId; + } + + + 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 + public List getIds() { + return ids; + } + + public void setIds(@javax.annotation.Nonnull List ids) { + this.ids = ids; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupGalleryFileOrderRequest groupGalleryFileOrderRequest = (GroupGalleryFileOrderRequest) o; + return Objects.equals(this.galleryId, groupGalleryFileOrderRequest.galleryId) && + Objects.equals(this.ids, groupGalleryFileOrderRequest.ids); + } + + @Override + public int hashCode() { + return Objects.hash(galleryId, ids); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupGalleryFileOrderRequest {\n"); + sb.append(" galleryId: ").append(toIndentedString(galleryId)).append("\n"); + sb.append(" ids: ").append(toIndentedString(ids)).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("galleryId", "ids")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("galleryId", "ids")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupGalleryFileOrderRequest.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupGalleryFileOrderRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupGalleryFileOrderRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupGalleryFileOrderRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupGalleryFileOrderRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupGalleryFileOrderRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..a1f3ff45 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupGalleryImage.java @@ -0,0 +1,455 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.net.URI; +import java.time.OffsetDateTime; +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; + +/** + * GroupGalleryImage + */ +@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(@javax.annotation.Nullable Boolean approved) { + this.approved = approved; + return this; + } + + /** + * Get approved + * @return approved + */ + @javax.annotation.Nullable + public Boolean getApproved() { + return approved; + } + + public void setApproved(@javax.annotation.Nullable Boolean approved) { + this.approved = approved; + } + + + public GroupGalleryImage approvedAt(@javax.annotation.Nullable OffsetDateTime approvedAt) { + this.approvedAt = approvedAt; + return this; + } + + /** + * Get approvedAt + * @return approvedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getApprovedAt() { + return approvedAt; + } + + public void setApprovedAt(@javax.annotation.Nullable OffsetDateTime approvedAt) { + this.approvedAt = approvedAt; + } + + + 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 + public String getApprovedByUserId() { + return approvedByUserId; + } + + public void setApprovedByUserId(@javax.annotation.Nullable String approvedByUserId) { + this.approvedByUserId = approvedByUserId; + } + + + public GroupGalleryImage createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public GroupGalleryImage fileId(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + */ + @javax.annotation.Nullable + public String getFileId() { + return fileId; + } + + public void setFileId(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + } + + + public GroupGalleryImage galleryId(@javax.annotation.Nullable String galleryId) { + this.galleryId = galleryId; + return this; + } + + /** + * Get galleryId + * @return galleryId + */ + @javax.annotation.Nullable + public String getGalleryId() { + return galleryId; + } + + public void setGalleryId(@javax.annotation.Nullable String galleryId) { + this.galleryId = galleryId; + } + + + public GroupGalleryImage groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public GroupGalleryImage 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 GroupGalleryImage imageUrl(@javax.annotation.Nullable URI imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public URI getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable URI imageUrl) { + this.imageUrl = imageUrl; + } + + + 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 + public String getSubmittedByUserId() { + return submittedByUserId; + } + + public void setSubmittedByUserId(@javax.annotation.Nullable String submittedByUserId) { + this.submittedByUserId = submittedByUserId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupGalleryImage groupGalleryImage = (GroupGalleryImage) o; + return Objects.equals(this.approved, groupGalleryImage.approved) && + Objects.equals(this.approvedAt, groupGalleryImage.approvedAt) && + Objects.equals(this.approvedByUserId, groupGalleryImage.approvedByUserId) && + Objects.equals(this.createdAt, groupGalleryImage.createdAt) && + Objects.equals(this.fileId, groupGalleryImage.fileId) && + Objects.equals(this.galleryId, groupGalleryImage.galleryId) && + Objects.equals(this.groupId, groupGalleryImage.groupId) && + Objects.equals(this.id, groupGalleryImage.id) && + Objects.equals(this.imageUrl, groupGalleryImage.imageUrl) && + Objects.equals(this.submittedByUserId, groupGalleryImage.submittedByUserId); + } + + @Override + public int hashCode() { + return Objects.hash(approved, approvedAt, approvedByUserId, createdAt, fileId, galleryId, groupId, id, imageUrl, submittedByUserId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupGalleryImage {\n"); + sb.append(" approved: ").append(toIndentedString(approved)).append("\n"); + sb.append(" approvedAt: ").append(toIndentedString(approvedAt)).append("\n"); + sb.append(" approvedByUserId: ").append(toIndentedString(approvedByUserId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).append("\n"); + sb.append(" galleryId: ").append(toIndentedString(galleryId)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" submittedByUserId: ").append(toIndentedString(submittedByUserId)).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("approved", "approvedAt", "approvedByUserId", "createdAt", "fileId", "galleryId", "groupId", "id", "imageUrl", "submittedByUserId")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupGalleryImage.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 `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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `submittedByUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("submittedByUserId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupGalleryImage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupGalleryImage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupGalleryImage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupGalleryImage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupGalleryImage read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..1419e737 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupInstance.java @@ -0,0 +1,293 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.World; +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; + +/** + * GroupInstance + */ +@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(@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 + public String getInstanceId() { + return instanceId; + } + + public void setInstanceId(@javax.annotation.Nonnull String instanceId) { + this.instanceId = instanceId; + } + + + 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 + public String getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nonnull String location) { + this.location = location; + } + + + public GroupInstance memberCount(@javax.annotation.Nonnull Integer memberCount) { + this.memberCount = memberCount; + return this; + } + + /** + * Get memberCount + * minimum: 0 + * @return memberCount + */ + @javax.annotation.Nonnull + public Integer getMemberCount() { + return memberCount; + } + + public void setMemberCount(@javax.annotation.Nonnull Integer memberCount) { + this.memberCount = memberCount; + } + + + public GroupInstance world(@javax.annotation.Nonnull World world) { + this.world = world; + return this; + } + + /** + * Get world + * @return world + */ + @javax.annotation.Nonnull + public World getWorld() { + return world; + } + + public void setWorld(@javax.annotation.Nonnull World world) { + this.world = world; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupInstance groupInstance = (GroupInstance) o; + return Objects.equals(this.instanceId, groupInstance.instanceId) && + Objects.equals(this.location, groupInstance.location) && + Objects.equals(this.memberCount, groupInstance.memberCount) && + Objects.equals(this.world, groupInstance.world); + } + + @Override + public int hashCode() { + return Objects.hash(instanceId, location, memberCount, world); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupInstance {\n"); + sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" memberCount: ").append(toIndentedString(memberCount)).append("\n"); + sb.append(" world: ").append(toIndentedString(world)).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", "location", "memberCount", "world")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("instanceId", "location", "memberCount", "world")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupInstance.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 `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 (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(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(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.validateJsonElement(jsonObj.get("world")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupInstance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupInstance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupInstance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupInstance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupInstance read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..f6a3d324 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupJoinRequestAction.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupJoinRequestAction + */ +@JsonAdapter(GroupJoinRequestAction.Adapter.class) +public enum GroupJoinRequestAction { + + ACCEPT("accept"), + + REJECT("reject"); + + private String value; + + GroupJoinRequestAction(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupJoinRequestAction fromValue(String value) { + for (GroupJoinRequestAction b : GroupJoinRequestAction.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 GroupJoinRequestAction enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupJoinRequestAction read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..9beb8aa2 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupJoinState.java @@ -0,0 +1,81 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupJoinState + */ +@JsonAdapter(GroupJoinState.Adapter.class) +public enum GroupJoinState { + + CLOSED("closed"), + + INVITE("invite"), + + OPEN("open"), + + REQUEST("request"); + + private String value; + + GroupJoinState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupJoinState fromValue(String value) { + for (GroupJoinState b : GroupJoinState.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 GroupJoinState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupJoinState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..0c086d24 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupMember.java @@ -0,0 +1,745 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupMemberLimitedUser; +import io.github.vrchatapi.model.GroupMemberStatus; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * 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", 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(@javax.annotation.Nullable String acceptedByDisplayName) { + this.acceptedByDisplayName = acceptedByDisplayName; + return this; + } + + /** + * Only missing when explicitly fetching own user. + * @return acceptedByDisplayName + */ + @javax.annotation.Nullable + public String getAcceptedByDisplayName() { + return acceptedByDisplayName; + } + + public void setAcceptedByDisplayName(@javax.annotation.Nullable String acceptedByDisplayName) { + this.acceptedByDisplayName = acceptedByDisplayName; + } + + + 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 + public String getAcceptedById() { + return acceptedById; + } + + public void setAcceptedById(@javax.annotation.Nullable String acceptedById) { + this.acceptedById = acceptedById; + } + + + 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 + public OffsetDateTime getBannedAt() { + return bannedAt; + } + + public void setBannedAt(@javax.annotation.Nullable OffsetDateTime bannedAt) { + this.bannedAt = bannedAt; + } + + + 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 + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public GroupMember 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 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 + public Boolean getHasJoinedFromPurchase() { + return hasJoinedFromPurchase; + } + + public void setHasJoinedFromPurchase(@javax.annotation.Nullable Boolean hasJoinedFromPurchase) { + this.hasJoinedFromPurchase = hasJoinedFromPurchase; + } + + + public GroupMember id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + 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 + public Boolean getIsRepresenting() { + return isRepresenting; + } + + public void setIsRepresenting(@javax.annotation.Nonnull Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + } + + + public GroupMember isSubscribedToAnnouncements(@javax.annotation.Nonnull Boolean isSubscribedToAnnouncements) { + this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; + return this; + } + + /** + * Get isSubscribedToAnnouncements + * @return isSubscribedToAnnouncements + */ + @javax.annotation.Nonnull + public Boolean getIsSubscribedToAnnouncements() { + return isSubscribedToAnnouncements; + } + + public void setIsSubscribedToAnnouncements(@javax.annotation.Nonnull Boolean isSubscribedToAnnouncements) { + this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; + } + + + 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 + public Boolean getIsSubscribedToEventAnnouncements() { + return isSubscribedToEventAnnouncements; + } + + public void setIsSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { + this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; + } + + + public GroupMember joinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { + this.joinedAt = joinedAt; + return this; + } + + /** + * Get joinedAt + * @return joinedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getJoinedAt() { + return joinedAt; + } + + public void setJoinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { + this.joinedAt = joinedAt; + } + + + public GroupMember lastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { + this.lastPostReadAt = lastPostReadAt; + return this; + } + + /** + * Get lastPostReadAt + * @return lastPostReadAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastPostReadAt() { + return lastPostReadAt; + } + + public void setLastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { + this.lastPostReadAt = lastPostReadAt; + } + + + 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 + public List getmRoleIds() { + return mRoleIds; + } + + public void setmRoleIds(@javax.annotation.Nonnull List mRoleIds) { + this.mRoleIds = mRoleIds; + } + + + 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 + public String getManagerNotes() { + return managerNotes; + } + + public void setManagerNotes(@javax.annotation.Nullable String managerNotes) { + this.managerNotes = managerNotes; + } + + + public GroupMember membershipStatus(@javax.annotation.Nonnull GroupMemberStatus membershipStatus) { + this.membershipStatus = membershipStatus; + return this; + } + + /** + * Get membershipStatus + * @return membershipStatus + */ + @javax.annotation.Nonnull + public GroupMemberStatus getMembershipStatus() { + return membershipStatus; + } + + public void setMembershipStatus(@javax.annotation.Nonnull GroupMemberStatus membershipStatus) { + this.membershipStatus = membershipStatus; + } + + + 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 + public List getRoleIds() { + return roleIds; + } + + public void setRoleIds(@javax.annotation.Nonnull List roleIds) { + this.roleIds = roleIds; + } + + + public GroupMember user(@javax.annotation.Nullable GroupMemberLimitedUser user) { + this.user = user; + return this; + } + + /** + * Get user + * @return user + */ + @javax.annotation.Nullable + public GroupMemberLimitedUser getUser() { + return user; + } + + public void setUser(@javax.annotation.Nullable GroupMemberLimitedUser user) { + this.user = user; + } + + + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + public GroupMember visibility(@javax.annotation.Nonnull String visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get visibility + * @return visibility + */ + @javax.annotation.Nonnull + public String getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nonnull String visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupMember groupMember = (GroupMember) o; + return Objects.equals(this.acceptedByDisplayName, groupMember.acceptedByDisplayName) && + Objects.equals(this.acceptedById, groupMember.acceptedById) && + Objects.equals(this.bannedAt, groupMember.bannedAt) && + Objects.equals(this.createdAt, groupMember.createdAt) && + Objects.equals(this.groupId, groupMember.groupId) && + Objects.equals(this.hasJoinedFromPurchase, groupMember.hasJoinedFromPurchase) && + Objects.equals(this.id, groupMember.id) && + Objects.equals(this.isRepresenting, groupMember.isRepresenting) && + Objects.equals(this.isSubscribedToAnnouncements, groupMember.isSubscribedToAnnouncements) && + Objects.equals(this.isSubscribedToEventAnnouncements, groupMember.isSubscribedToEventAnnouncements) && + Objects.equals(this.joinedAt, groupMember.joinedAt) && + Objects.equals(this.lastPostReadAt, groupMember.lastPostReadAt) && + Objects.equals(this.mRoleIds, groupMember.mRoleIds) && + Objects.equals(this.managerNotes, groupMember.managerNotes) && + Objects.equals(this.membershipStatus, groupMember.membershipStatus) && + Objects.equals(this.roleIds, groupMember.roleIds) && + Objects.equals(this.user, groupMember.user) && + Objects.equals(this.userId, groupMember.userId) && + Objects.equals(this.visibility, groupMember.visibility); + } + + 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(acceptedByDisplayName, acceptedById, bannedAt, createdAt, groupId, hasJoinedFromPurchase, id, isRepresenting, isSubscribedToAnnouncements, isSubscribedToEventAnnouncements, joinedAt, lastPostReadAt, mRoleIds, managerNotes, membershipStatus, roleIds, user, userId, visibility); + } + + 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 GroupMember {\n"); + sb.append(" acceptedByDisplayName: ").append(toIndentedString(acceptedByDisplayName)).append("\n"); + sb.append(" acceptedById: ").append(toIndentedString(acceptedById)).append("\n"); + sb.append(" bannedAt: ").append(toIndentedString(bannedAt)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" hasJoinedFromPurchase: ").append(toIndentedString(hasJoinedFromPurchase)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isRepresenting: ").append(toIndentedString(isRepresenting)).append("\n"); + sb.append(" isSubscribedToAnnouncements: ").append(toIndentedString(isSubscribedToAnnouncements)).append("\n"); + sb.append(" isSubscribedToEventAnnouncements: ").append(toIndentedString(isSubscribedToEventAnnouncements)).append("\n"); + sb.append(" joinedAt: ").append(toIndentedString(joinedAt)).append("\n"); + sb.append(" lastPostReadAt: ").append(toIndentedString(lastPostReadAt)).append("\n"); + sb.append(" mRoleIds: ").append(toIndentedString(mRoleIds)).append("\n"); + sb.append(" managerNotes: ").append(toIndentedString(managerNotes)).append("\n"); + sb.append(" membershipStatus: ").append(toIndentedString(membershipStatus)).append("\n"); + sb.append(" roleIds: ").append(toIndentedString(roleIds)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupMember.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 `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 (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(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(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(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(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(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(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(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.validateJsonElement(jsonObj.get("user")); + } + if (!jsonObj.get("userId").isJsonPrimitive()) { + 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(java.util.Locale.ROOT, "Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupMember.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupMember' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupMember.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupMember value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupMember read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..6572ac12 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupMemberLimitedUser.java @@ -0,0 +1,398 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * Only visible via the /groups/:groupId/members endpoint, **not** when fetching a specific user. + */ +@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) + @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(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + return this; + } + + public GroupMemberLimitedUser addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } + this.currentAvatarTags.add(currentAvatarTagsItem); + return this; + } + + /** + * Get currentAvatarTags + * @return currentAvatarTags + */ + @javax.annotation.Nullable + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + public GroupMemberLimitedUser currentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + return this; + } + + /** + * Get currentAvatarThumbnailImageUrl + * @return currentAvatarThumbnailImageUrl + */ + @javax.annotation.Nullable + public String getCurrentAvatarThumbnailImageUrl() { + return currentAvatarThumbnailImageUrl; + } + + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + } + + + public GroupMemberLimitedUser 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 GroupMemberLimitedUser 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 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + + public GroupMemberLimitedUser profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + return this; + } + + /** + * Get profilePicOverride + * @return profilePicOverride + */ + @javax.annotation.Nullable + public String getProfilePicOverride() { + return profilePicOverride; + } + + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + } + + + public GroupMemberLimitedUser thumbnailUrl(@javax.annotation.Nullable String thumbnailUrl) { + this.thumbnailUrl = thumbnailUrl; + return this; + } + + /** + * Get thumbnailUrl + * @return thumbnailUrl + */ + @javax.annotation.Nullable + public String getThumbnailUrl() { + return thumbnailUrl; + } + + public void setThumbnailUrl(@javax.annotation.Nullable String thumbnailUrl) { + this.thumbnailUrl = thumbnailUrl; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupMemberLimitedUser groupMemberLimitedUser = (GroupMemberLimitedUser) o; + return Objects.equals(this.currentAvatarTags, groupMemberLimitedUser.currentAvatarTags) && + Objects.equals(this.currentAvatarThumbnailImageUrl, groupMemberLimitedUser.currentAvatarThumbnailImageUrl) && + Objects.equals(this.displayName, groupMemberLimitedUser.displayName) && + Objects.equals(this.iconUrl, groupMemberLimitedUser.iconUrl) && + Objects.equals(this.id, groupMemberLimitedUser.id) && + Objects.equals(this.profilePicOverride, groupMemberLimitedUser.profilePicOverride) && + Objects.equals(this.thumbnailUrl, groupMemberLimitedUser.thumbnailUrl); + } + + 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(currentAvatarTags, currentAvatarThumbnailImageUrl, displayName, iconUrl, id, profilePicOverride, thumbnailUrl); + } + + 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 GroupMemberLimitedUser {\n"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); + sb.append(" currentAvatarThumbnailImageUrl: ").append(toIndentedString(currentAvatarThumbnailImageUrl)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).append("\n"); + sb.append(" thumbnailUrl: ").append(toIndentedString(thumbnailUrl)).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("currentAvatarTags", "currentAvatarThumbnailImageUrl", "displayName", "iconUrl", "id", "profilePicOverride", "thumbnailUrl")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupMemberLimitedUser.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 `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").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(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(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(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("profilePicOverride") != null && !jsonObj.get("profilePicOverride").isJsonNull()) && !jsonObj.get("profilePicOverride").isJsonPrimitive()) { + 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(java.util.Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupMemberLimitedUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupMemberLimitedUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupMemberLimitedUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupMemberLimitedUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupMemberLimitedUser read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..2056fdcc --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupMemberStatus.java @@ -0,0 +1,85 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupMemberStatus + */ +@JsonAdapter(GroupMemberStatus.Adapter.class) +public enum GroupMemberStatus { + + BANNED("banned"), + + INACTIVE("inactive"), + + INVITED("invited"), + + MEMBER("member"), + + REQUESTED("requested"), + + USERBLOCKED("userblocked"); + + private String value; + + GroupMemberStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupMemberStatus fromValue(String value) { + for (GroupMemberStatus b : GroupMemberStatus.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 GroupMemberStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupMemberStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..bcf55de9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupMyMember.java @@ -0,0 +1,771 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPermissions; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * GroupMyMember + */ +@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) + @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) + @javax.annotation.Nullable + private List permissions = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ROLE_IDS = "roleIds"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS) + @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(@javax.annotation.Nullable String acceptedByDisplayName) { + this.acceptedByDisplayName = acceptedByDisplayName; + return this; + } + + /** + * Get acceptedByDisplayName + * @return acceptedByDisplayName + */ + @javax.annotation.Nullable + public String getAcceptedByDisplayName() { + return acceptedByDisplayName; + } + + public void setAcceptedByDisplayName(@javax.annotation.Nullable String acceptedByDisplayName) { + this.acceptedByDisplayName = acceptedByDisplayName; + } + + + public GroupMyMember acceptedById(@javax.annotation.Nullable String acceptedById) { + this.acceptedById = acceptedById; + return this; + } + + /** + * Get acceptedById + * @return acceptedById + */ + @javax.annotation.Nullable + public String getAcceptedById() { + return acceptedById; + } + + public void setAcceptedById(@javax.annotation.Nullable String acceptedById) { + this.acceptedById = acceptedById; + } + + + public GroupMyMember bannedAt(@javax.annotation.Nullable String bannedAt) { + this.bannedAt = bannedAt; + return this; + } + + /** + * Get bannedAt + * @return bannedAt + */ + @javax.annotation.Nullable + public String getBannedAt() { + return bannedAt; + } + + public void setBannedAt(@javax.annotation.Nullable String bannedAt) { + this.bannedAt = bannedAt; + } + + + public GroupMyMember createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public GroupMyMember groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public GroupMyMember has2FA(@javax.annotation.Nullable Boolean has2FA) { + this.has2FA = has2FA; + return this; + } + + /** + * Get has2FA + * @return has2FA + */ + @javax.annotation.Nullable + public Boolean getHas2FA() { + return has2FA; + } + + public void setHas2FA(@javax.annotation.Nullable Boolean has2FA) { + this.has2FA = has2FA; + } + + + public GroupMyMember hasJoinedFromPurchase(@javax.annotation.Nullable Boolean hasJoinedFromPurchase) { + this.hasJoinedFromPurchase = hasJoinedFromPurchase; + return this; + } + + /** + * Get hasJoinedFromPurchase + * @return hasJoinedFromPurchase + */ + @javax.annotation.Nullable + public Boolean getHasJoinedFromPurchase() { + return hasJoinedFromPurchase; + } + + public void setHasJoinedFromPurchase(@javax.annotation.Nullable Boolean hasJoinedFromPurchase) { + this.hasJoinedFromPurchase = hasJoinedFromPurchase; + } + + + public GroupMyMember 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 GroupMyMember isRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + return this; + } + + /** + * Get isRepresenting + * @return isRepresenting + */ + @javax.annotation.Nullable + public Boolean getIsRepresenting() { + return isRepresenting; + } + + public void setIsRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + } + + + public GroupMyMember isSubscribedToAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { + this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; + return this; + } + + /** + * Get isSubscribedToAnnouncements + * @return isSubscribedToAnnouncements + */ + @javax.annotation.Nullable + public Boolean getIsSubscribedToAnnouncements() { + return isSubscribedToAnnouncements; + } + + public void setIsSubscribedToAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { + this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; + } + + + public GroupMyMember isSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { + this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; + return this; + } + + /** + * Get isSubscribedToEventAnnouncements + * @return isSubscribedToEventAnnouncements + */ + @javax.annotation.Nullable + public Boolean getIsSubscribedToEventAnnouncements() { + return isSubscribedToEventAnnouncements; + } + + public void setIsSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { + this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; + } + + + public GroupMyMember joinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { + this.joinedAt = joinedAt; + return this; + } + + /** + * Get joinedAt + * @return joinedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getJoinedAt() { + return joinedAt; + } + + public void setJoinedAt(@javax.annotation.Nullable OffsetDateTime joinedAt) { + this.joinedAt = joinedAt; + } + + + public GroupMyMember lastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { + this.lastPostReadAt = lastPostReadAt; + return this; + } + + /** + * Get lastPostReadAt + * @return lastPostReadAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastPostReadAt() { + return lastPostReadAt; + } + + public void setLastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { + this.lastPostReadAt = lastPostReadAt; + } + + + public GroupMyMember mRoleIds(@javax.annotation.Nullable List mRoleIds) { + this.mRoleIds = mRoleIds; + return this; + } + + public GroupMyMember addMRoleIdsItem(String mRoleIdsItem) { + if (this.mRoleIds == null) { + this.mRoleIds = new ArrayList<>(); + } + this.mRoleIds.add(mRoleIdsItem); + return this; + } + + /** + * Get mRoleIds + * @return mRoleIds + */ + @javax.annotation.Nullable + public List getmRoleIds() { + return mRoleIds; + } + + public void setmRoleIds(@javax.annotation.Nullable List mRoleIds) { + this.mRoleIds = mRoleIds; + } + + + public GroupMyMember managerNotes(@javax.annotation.Nullable String managerNotes) { + this.managerNotes = managerNotes; + return this; + } + + /** + * Get managerNotes + * @return managerNotes + */ + @javax.annotation.Nullable + public String getManagerNotes() { + return managerNotes; + } + + public void setManagerNotes(@javax.annotation.Nullable String managerNotes) { + this.managerNotes = managerNotes; + } + + + public GroupMyMember membershipStatus(@javax.annotation.Nullable String membershipStatus) { + this.membershipStatus = membershipStatus; + return this; + } + + /** + * Get membershipStatus + * @return membershipStatus + */ + @javax.annotation.Nullable + public String getMembershipStatus() { + return membershipStatus; + } + + public void setMembershipStatus(@javax.annotation.Nullable String membershipStatus) { + this.membershipStatus = membershipStatus; + } + + + public GroupMyMember permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public GroupMyMember addPermissionsItem(GroupPermissions permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Get permissions + * @return permissions + */ + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + + public GroupMyMember roleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + return this; + } + + public GroupMyMember addRoleIdsItem(String roleIdsItem) { + if (this.roleIds == null) { + this.roleIds = new ArrayList<>(); + } + this.roleIds.add(roleIdsItem); + return this; + } + + /** + * Get roleIds + * @return roleIds + */ + @javax.annotation.Nullable + public List getRoleIds() { + return roleIds; + } + + public void setRoleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + } + + + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nullable String userId) { + this.userId = userId; + } + + + public GroupMyMember visibility(@javax.annotation.Nullable String visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get visibility + * @return visibility + */ + @javax.annotation.Nullable + public String getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable String visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupMyMember groupMyMember = (GroupMyMember) o; + return Objects.equals(this.acceptedByDisplayName, groupMyMember.acceptedByDisplayName) && + Objects.equals(this.acceptedById, groupMyMember.acceptedById) && + Objects.equals(this.bannedAt, groupMyMember.bannedAt) && + Objects.equals(this.createdAt, groupMyMember.createdAt) && + Objects.equals(this.groupId, groupMyMember.groupId) && + Objects.equals(this.has2FA, groupMyMember.has2FA) && + Objects.equals(this.hasJoinedFromPurchase, groupMyMember.hasJoinedFromPurchase) && + Objects.equals(this.id, groupMyMember.id) && + Objects.equals(this.isRepresenting, groupMyMember.isRepresenting) && + Objects.equals(this.isSubscribedToAnnouncements, groupMyMember.isSubscribedToAnnouncements) && + Objects.equals(this.isSubscribedToEventAnnouncements, groupMyMember.isSubscribedToEventAnnouncements) && + Objects.equals(this.joinedAt, groupMyMember.joinedAt) && + Objects.equals(this.lastPostReadAt, groupMyMember.lastPostReadAt) && + Objects.equals(this.mRoleIds, groupMyMember.mRoleIds) && + Objects.equals(this.managerNotes, groupMyMember.managerNotes) && + Objects.equals(this.membershipStatus, groupMyMember.membershipStatus) && + Objects.equals(this.permissions, groupMyMember.permissions) && + Objects.equals(this.roleIds, groupMyMember.roleIds) && + Objects.equals(this.userId, groupMyMember.userId) && + Objects.equals(this.visibility, groupMyMember.visibility); + } + + 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(acceptedByDisplayName, acceptedById, bannedAt, createdAt, groupId, has2FA, hasJoinedFromPurchase, id, isRepresenting, isSubscribedToAnnouncements, isSubscribedToEventAnnouncements, joinedAt, lastPostReadAt, mRoleIds, managerNotes, membershipStatus, permissions, roleIds, userId, visibility); + } + + 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 GroupMyMember {\n"); + sb.append(" acceptedByDisplayName: ").append(toIndentedString(acceptedByDisplayName)).append("\n"); + sb.append(" acceptedById: ").append(toIndentedString(acceptedById)).append("\n"); + sb.append(" bannedAt: ").append(toIndentedString(bannedAt)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" has2FA: ").append(toIndentedString(has2FA)).append("\n"); + sb.append(" hasJoinedFromPurchase: ").append(toIndentedString(hasJoinedFromPurchase)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isRepresenting: ").append(toIndentedString(isRepresenting)).append("\n"); + sb.append(" isSubscribedToAnnouncements: ").append(toIndentedString(isSubscribedToAnnouncements)).append("\n"); + sb.append(" isSubscribedToEventAnnouncements: ").append(toIndentedString(isSubscribedToEventAnnouncements)).append("\n"); + sb.append(" joinedAt: ").append(toIndentedString(joinedAt)).append("\n"); + sb.append(" lastPostReadAt: ").append(toIndentedString(lastPostReadAt)).append("\n"); + sb.append(" mRoleIds: ").append(toIndentedString(mRoleIds)).append("\n"); + sb.append(" managerNotes: ").append(toIndentedString(managerNotes)).append("\n"); + sb.append(" membershipStatus: ").append(toIndentedString(membershipStatus)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" roleIds: ").append(toIndentedString(roleIds)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupMyMember.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 `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(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(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(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(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(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").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(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(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").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").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(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(java.util.Locale.ROOT, "Expected the field `visibility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visibility").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupMyMember.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupMyMember' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupMyMember.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupMyMember value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupMyMember read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..17f13034 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupPermission.java @@ -0,0 +1,311 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * A permission that can be granted to a role in a group. + */ +@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(@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 + public Boolean getAllowedToAdd() { + return allowedToAdd; + } + + public void setAllowedToAdd(@javax.annotation.Nullable Boolean allowedToAdd) { + this.allowedToAdd = allowedToAdd; + } + + + public GroupPermission displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name of the permission. + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public GroupPermission help(@javax.annotation.Nullable String help) { + this.help = help; + return this; + } + + /** + * Human-readable description of the permission. + * @return help + */ + @javax.annotation.Nullable + public String getHelp() { + return help; + } + + public void setHelp(@javax.annotation.Nullable String help) { + this.help = help; + } + + + 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 + public Boolean getIsManagementPermission() { + return isManagementPermission; + } + + public void setIsManagementPermission(@javax.annotation.Nullable Boolean isManagementPermission) { + this.isManagementPermission = isManagementPermission; + } + + + public GroupPermission name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * The name of the permission. + * @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; + } + GroupPermission groupPermission = (GroupPermission) o; + return Objects.equals(this.allowedToAdd, groupPermission.allowedToAdd) && + Objects.equals(this.displayName, groupPermission.displayName) && + Objects.equals(this.help, groupPermission.help) && + Objects.equals(this.isManagementPermission, groupPermission.isManagementPermission) && + Objects.equals(this.name, groupPermission.name); + } + + @Override + public int hashCode() { + return Objects.hash(allowedToAdd, displayName, help, isManagementPermission, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupPermission {\n"); + sb.append(" allowedToAdd: ").append(toIndentedString(allowedToAdd)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" help: ").append(toIndentedString(help)).append("\n"); + sb.append(" isManagementPermission: ").append(toIndentedString(isManagementPermission)).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("allowedToAdd", "displayName", "help", "isManagementPermission", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupPermission.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 `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(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(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(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 (!GroupPermission.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupPermission' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupPermission.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupPermission value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupPermission read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ab583ef6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupPermissions.java @@ -0,0 +1,129 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupPermissions + */ +@JsonAdapter(GroupPermissions.Adapter.class) +public enum GroupPermissions { + + group_all("*"), + + group_announcement_manage("group-announcement-manage"), + + group_audit_view("group-audit-view"), + + group_bans_manage("group-bans-manage"), + + group_calendar_manage("group-calendar-manage"), + + group_data_manage("group-data-manage"), + + group_default_role_manage("group-default-role-manage"), + + group_galleries_manage("group-galleries-manage"), + + group_instance_age_gated_create("group-instance-age-gated-create"), + + group_instance_announcement_create("group-instance-announcement-create"), + + group_instance_bypass_avatar_performance("group-instance-bypass-avatar-performance"), + + group_instance_calendar_link("group-instance-calendar-link"), + + group_instance_join("group-instance-join"), + + group_instance_manage("group-instance-manage"), + + group_instance_moderate("group-instance-moderate"), + + group_instance_open_create("group-instance-open-create"), + + group_instance_plus_create("group-instance-plus-create"), + + group_instance_plus_portal("group-instance-plus-portal"), + + group_instance_plus_portal_unlocked("group-instance-plus-portal-unlocked"), + + group_instance_public_create("group-instance-public-create"), + + group_instance_queue_priority("group-instance-queue-priority"), + + group_instance_restricted_create("group-instance-restricted-create"), + + group_invites_manage("group-invites-manage"), + + group_members_manage("group-members-manage"), + + group_members_remove("group-members-remove"), + + group_members_viewall("group-members-viewall"), + + group_roles_assign("group-roles-assign"), + + group_roles_manage("group-roles-manage"); + + private String value; + + GroupPermissions(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupPermissions fromValue(String value) { + for (GroupPermissions b : GroupPermissions.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 GroupPermissions enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupPermissions read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..df6e720d --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupPost.java @@ -0,0 +1,540 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPostVisibility; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * GroupPost + */ +@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) + @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(@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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + + public GroupPost createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + 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 + public String getEditorId() { + return editorId; + } + + public void setEditorId(@javax.annotation.Nullable String editorId) { + this.editorId = editorId; + } + + + public GroupPost groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public GroupPost 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 GroupPost imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public GroupPost imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public GroupPost roleId(@javax.annotation.Nullable List roleId) { + this.roleId = roleId; + return this; + } + + public GroupPost addRoleIdItem(String roleIdItem) { + if (this.roleId == null) { + this.roleId = new ArrayList<>(); + } + this.roleId.add(roleIdItem); + return this; + } + + /** + * + * @return roleId + */ + @javax.annotation.Nullable + public List getRoleId() { + return roleId; + } + + public void setRoleId(@javax.annotation.Nullable List roleId) { + this.roleId = roleId; + } + + + public GroupPost text(@javax.annotation.Nullable String text) { + this.text = text; + return this; + } + + /** + * Get text + * @return text + */ + @javax.annotation.Nullable + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nullable String text) { + this.text = text; + } + + + public GroupPost title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Get title + * @return title + */ + @javax.annotation.Nullable + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + + public GroupPost updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public GroupPost visibility(@javax.annotation.Nullable GroupPostVisibility visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get visibility + * @return visibility + */ + @javax.annotation.Nullable + public GroupPostVisibility getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable GroupPostVisibility visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupPost groupPost = (GroupPost) o; + return Objects.equals(this.authorId, groupPost.authorId) && + Objects.equals(this.createdAt, groupPost.createdAt) && + Objects.equals(this.editorId, groupPost.editorId) && + Objects.equals(this.groupId, groupPost.groupId) && + Objects.equals(this.id, groupPost.id) && + Objects.equals(this.imageId, groupPost.imageId) && + Objects.equals(this.imageUrl, groupPost.imageUrl) && + Objects.equals(this.roleId, groupPost.roleId) && + Objects.equals(this.text, groupPost.text) && + Objects.equals(this.title, groupPost.title) && + Objects.equals(this.updatedAt, groupPost.updatedAt) && + Objects.equals(this.visibility, groupPost.visibility); + } + + 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(authorId, createdAt, editorId, groupId, id, imageId, imageUrl, roleId, text, title, updatedAt, visibility); + } + + 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 GroupPost {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" editorId: ").append(toIndentedString(editorId)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" roleId: ").append(toIndentedString(roleId)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).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("authorId", "createdAt", "editorId", "groupId", "id", "imageId", "imageUrl", "roleId", "text", "title", "updatedAt", "visibility")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupPost.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 `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(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(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(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(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(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(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").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(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(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")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupPost.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupPost' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupPost.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupPost value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupPost read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..147ff21f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupPostVisibility.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupPostVisibility + */ +@JsonAdapter(GroupPostVisibility.Adapter.class) +public enum GroupPostVisibility { + + GROUP("group"), + + PUBLIC("public"); + + private String value; + + GroupPostVisibility(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupPostVisibility fromValue(String value) { + for (GroupPostVisibility b : GroupPostVisibility.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 GroupPostVisibility enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupPostVisibility read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..f5c6f7c3 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupPrivacy.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupPrivacy + */ +@JsonAdapter(GroupPrivacy.Adapter.class) +public enum GroupPrivacy { + + DEFAULT("default"), + + PRIVATE("private"); + + private String value; + + GroupPrivacy(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupPrivacy fromValue(String value) { + for (GroupPrivacy b : GroupPrivacy.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 GroupPrivacy enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupPrivacy read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..0d640f6f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupRole.java @@ -0,0 +1,512 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPermissions; +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; +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; + +/** + * GroupRole + */ +@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) + @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(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public GroupRole description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public GroupRole groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public GroupRole 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 GroupRole isManagementRole(@javax.annotation.Nullable Boolean isManagementRole) { + this.isManagementRole = isManagementRole; + return this; + } + + /** + * Get isManagementRole + * @return isManagementRole + */ + @javax.annotation.Nullable + public Boolean getIsManagementRole() { + return isManagementRole; + } + + public void setIsManagementRole(@javax.annotation.Nullable Boolean isManagementRole) { + this.isManagementRole = isManagementRole; + } + + + public GroupRole isSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { + this.isSelfAssignable = isSelfAssignable; + return this; + } + + /** + * Get isSelfAssignable + * @return isSelfAssignable + */ + @javax.annotation.Nullable + public Boolean getIsSelfAssignable() { + return isSelfAssignable; + } + + public void setIsSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { + this.isSelfAssignable = isSelfAssignable; + } + + + public GroupRole name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public GroupRole order(@javax.annotation.Nullable Integer order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public Integer getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable Integer order) { + this.order = order; + } + + + public GroupRole permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public GroupRole addPermissionsItem(GroupPermissions permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Get permissions + * @return permissions + */ + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + + public GroupRole requiresPurchase(@javax.annotation.Nullable Boolean requiresPurchase) { + this.requiresPurchase = requiresPurchase; + return this; + } + + /** + * Get requiresPurchase + * @return requiresPurchase + */ + @javax.annotation.Nullable + public Boolean getRequiresPurchase() { + return requiresPurchase; + } + + public void setRequiresPurchase(@javax.annotation.Nullable Boolean requiresPurchase) { + this.requiresPurchase = requiresPurchase; + } + + + public GroupRole requiresTwoFactor(@javax.annotation.Nullable Boolean requiresTwoFactor) { + this.requiresTwoFactor = requiresTwoFactor; + return this; + } + + /** + * Get requiresTwoFactor + * @return requiresTwoFactor + */ + @javax.annotation.Nullable + public Boolean getRequiresTwoFactor() { + return requiresTwoFactor; + } + + public void setRequiresTwoFactor(@javax.annotation.Nullable Boolean requiresTwoFactor) { + this.requiresTwoFactor = requiresTwoFactor; + } + + + public GroupRole updatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupRole groupRole = (GroupRole) o; + return Objects.equals(this.createdAt, groupRole.createdAt) && + Objects.equals(this.description, groupRole.description) && + Objects.equals(this.groupId, groupRole.groupId) && + Objects.equals(this.id, groupRole.id) && + Objects.equals(this.isManagementRole, groupRole.isManagementRole) && + Objects.equals(this.isSelfAssignable, groupRole.isSelfAssignable) && + Objects.equals(this.name, groupRole.name) && + Objects.equals(this.order, groupRole.order) && + Objects.equals(this.permissions, groupRole.permissions) && + Objects.equals(this.requiresPurchase, groupRole.requiresPurchase) && + Objects.equals(this.requiresTwoFactor, groupRole.requiresTwoFactor) && + Objects.equals(this.updatedAt, groupRole.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, description, groupId, id, isManagementRole, isSelfAssignable, name, order, permissions, requiresPurchase, requiresTwoFactor, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupRole {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isManagementRole: ").append(toIndentedString(isManagementRole)).append("\n"); + sb.append(" isSelfAssignable: ").append(toIndentedString(isSelfAssignable)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" requiresPurchase: ").append(toIndentedString(requiresPurchase)).append("\n"); + sb.append(" requiresTwoFactor: ").append(toIndentedString(requiresTwoFactor)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("createdAt", "description", "groupId", "id", "isManagementRole", "isSelfAssignable", "name", "order", "permissions", "requiresPurchase", "requiresTwoFactor", "updatedAt")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupRole.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 `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(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(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(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())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("permissions") != null && !jsonObj.get("permissions").isJsonNull() && !jsonObj.get("permissions").isJsonArray()) { + throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `permissions` to be an array in the JSON string but got `%s`", jsonObj.get("permissions").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupRole.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupRole' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupRole.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupRole value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupRole read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..516779f0 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplate.java @@ -0,0 +1,81 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupRoleTemplate + */ +@JsonAdapter(GroupRoleTemplate.Adapter.class) +public enum GroupRoleTemplate { + + DEFAULT("default"), + + MANAGED_FREE("managedFree"), + + MANAGED_INVITE("managedInvite"), + + MANAGED_REQUEST("managedRequest"); + + private String value; + + GroupRoleTemplate(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupRoleTemplate fromValue(String value) { + for (GroupRoleTemplate b : GroupRoleTemplate.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 GroupRoleTemplate enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupRoleTemplate read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..86a005a8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValues.java @@ -0,0 +1,309 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPermissions; +import io.github.vrchatapi.model.GroupRoleTemplateValuesRoles; +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; + +/** + * GroupRoleTemplateValues + */ +@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(@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 + public List getBasePermissions() { + return basePermissions; + } + + public void setBasePermissions(@javax.annotation.Nonnull List basePermissions) { + this.basePermissions = basePermissions; + } + + + public GroupRoleTemplateValues description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public GroupRoleTemplateValues name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public GroupRoleTemplateValues roles(@javax.annotation.Nonnull GroupRoleTemplateValuesRoles roles) { + this.roles = roles; + return this; + } + + /** + * Get roles + * @return roles + */ + @javax.annotation.Nonnull + public GroupRoleTemplateValuesRoles getRoles() { + return roles; + } + + public void setRoles(@javax.annotation.Nonnull GroupRoleTemplateValuesRoles roles) { + this.roles = roles; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupRoleTemplateValues groupRoleTemplateValues = (GroupRoleTemplateValues) o; + return Objects.equals(this.basePermissions, groupRoleTemplateValues.basePermissions) && + Objects.equals(this.description, groupRoleTemplateValues.description) && + Objects.equals(this.name, groupRoleTemplateValues.name) && + Objects.equals(this.roles, groupRoleTemplateValues.roles); + } + + @Override + public int hashCode() { + return Objects.hash(basePermissions, description, name, roles); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupRoleTemplateValues {\n"); + sb.append(" basePermissions: ").append(toIndentedString(basePermissions)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).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("basePermissions", "description", "name", "roles")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("basePermissions", "description", "name", "roles")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupRoleTemplateValues.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 `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 (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(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(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(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.validateJsonElement(jsonObj.get("roles")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupRoleTemplateValues.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupRoleTemplateValues' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupRoleTemplateValues.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupRoleTemplateValues value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupRoleTemplateValues read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..58908949 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupRoleTemplateValuesRoles.java @@ -0,0 +1,297 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPermissions; +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; + +/** + * GroupRoleTemplateValuesRoles + */ +@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) + @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(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public GroupRoleTemplateValuesRoles description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public GroupRoleTemplateValuesRoles basePermissions(@javax.annotation.Nullable List basePermissions) { + this.basePermissions = basePermissions; + return this; + } + + public GroupRoleTemplateValuesRoles addBasePermissionsItem(GroupPermissions basePermissionsItem) { + if (this.basePermissions == null) { + this.basePermissions = new ArrayList<>(); + } + this.basePermissions.add(basePermissionsItem); + return this; + } + + /** + * Get basePermissions + * @return basePermissions + */ + @javax.annotation.Nullable + public List getBasePermissions() { + return basePermissions; + } + + public void setBasePermissions(@javax.annotation.Nullable List basePermissions) { + this.basePermissions = basePermissions; + } + + + public GroupRoleTemplateValuesRoles isAddedOnJoin(@javax.annotation.Nullable Boolean isAddedOnJoin) { + this.isAddedOnJoin = isAddedOnJoin; + return this; + } + + /** + * Get isAddedOnJoin + * @return isAddedOnJoin + */ + @javax.annotation.Nullable + public Boolean getIsAddedOnJoin() { + return isAddedOnJoin; + } + + public void setIsAddedOnJoin(@javax.annotation.Nullable Boolean isAddedOnJoin) { + this.isAddedOnJoin = isAddedOnJoin; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupRoleTemplateValuesRoles groupRoleTemplateValuesRoles = (GroupRoleTemplateValuesRoles) o; + return Objects.equals(this.name, groupRoleTemplateValuesRoles.name) && + Objects.equals(this.description, groupRoleTemplateValuesRoles.description) && + Objects.equals(this.basePermissions, groupRoleTemplateValuesRoles.basePermissions) && + Objects.equals(this.isAddedOnJoin, groupRoleTemplateValuesRoles.isAddedOnJoin); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, basePermissions, isAddedOnJoin); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupRoleTemplateValuesRoles {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" basePermissions: ").append(toIndentedString(basePermissions)).append("\n"); + sb.append(" isAddedOnJoin: ").append(toIndentedString(isAddedOnJoin)).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("name", "description", "basePermissions", "isAddedOnJoin")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupRoleTemplateValuesRoles.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 `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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupRoleTemplateValuesRoles.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupRoleTemplateValuesRoles' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupRoleTemplateValuesRoles.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupRoleTemplateValuesRoles value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupRoleTemplateValuesRoles read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..40047dd7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupSearchSort.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupSearchSort + */ +@JsonAdapter(GroupSearchSort.Adapter.class) +public enum GroupSearchSort { + + JOINED_AT_ASC("joinedAt:asc"), + + JOINED_AT_DESC("joinedAt:desc"); + + private String value; + + GroupSearchSort(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupSearchSort fromValue(String value) { + for (GroupSearchSort b : GroupSearchSort.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 GroupSearchSort enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupSearchSort read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..42f36b12 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupTransferable.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupTransferableRequirements; +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; + +/** + * GroupTransferable + */ +@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(@javax.annotation.Nonnull GroupTransferableRequirements requirements) { + this.requirements = requirements; + return this; + } + + /** + * Get requirements + * @return requirements + */ + @javax.annotation.Nonnull + public GroupTransferableRequirements getRequirements() { + return requirements; + } + + public void setRequirements(@javax.annotation.Nonnull GroupTransferableRequirements requirements) { + this.requirements = requirements; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupTransferable groupTransferable = (GroupTransferable) o; + return Objects.equals(this.requirements, groupTransferable.requirements); + } + + @Override + public int hashCode() { + return Objects.hash(requirements); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupTransferable {\n"); + sb.append(" requirements: ").append(toIndentedString(requirements)).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("requirements")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("requirements")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupTransferable.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 `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 (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.validateJsonElement(jsonObj.get("requirements")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupTransferable.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupTransferable' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupTransferable.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupTransferable value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupTransferable read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..dbdadc51 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupTransferableRequirements.java @@ -0,0 +1,309 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * GroupTransferableRequirements + */ +@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(@javax.annotation.Nonnull Boolean groupNotMonetized) { + this.groupNotMonetized = groupNotMonetized; + return this; + } + + /** + * Get groupNotMonetized + * @return groupNotMonetized + */ + @javax.annotation.Nonnull + public Boolean getGroupNotMonetized() { + return groupNotMonetized; + } + + public void setGroupNotMonetized(@javax.annotation.Nonnull Boolean groupNotMonetized) { + this.groupNotMonetized = groupNotMonetized; + } + + + public GroupTransferableRequirements hasVRCPlus(@javax.annotation.Nonnull Boolean hasVRCPlus) { + this.hasVRCPlus = hasVRCPlus; + return this; + } + + /** + * Get hasVRCPlus + * @return hasVRCPlus + */ + @javax.annotation.Nonnull + public Boolean getHasVRCPlus() { + return hasVRCPlus; + } + + public void setHasVRCPlus(@javax.annotation.Nonnull Boolean hasVRCPlus) { + this.hasVRCPlus = hasVRCPlus; + } + + + public GroupTransferableRequirements hasVerifiedEmail(@javax.annotation.Nonnull Boolean hasVerifiedEmail) { + this.hasVerifiedEmail = hasVerifiedEmail; + return this; + } + + /** + * Get hasVerifiedEmail + * @return hasVerifiedEmail + */ + @javax.annotation.Nonnull + public Boolean getHasVerifiedEmail() { + return hasVerifiedEmail; + } + + public void setHasVerifiedEmail(@javax.annotation.Nonnull Boolean hasVerifiedEmail) { + this.hasVerifiedEmail = hasVerifiedEmail; + } + + + public GroupTransferableRequirements targetCanOwnMoreGroups(@javax.annotation.Nonnull Boolean targetCanOwnMoreGroups) { + this.targetCanOwnMoreGroups = targetCanOwnMoreGroups; + return this; + } + + /** + * Get targetCanOwnMoreGroups + * @return targetCanOwnMoreGroups + */ + @javax.annotation.Nonnull + public Boolean getTargetCanOwnMoreGroups() { + return targetCanOwnMoreGroups; + } + + public void setTargetCanOwnMoreGroups(@javax.annotation.Nonnull Boolean targetCanOwnMoreGroups) { + this.targetCanOwnMoreGroups = targetCanOwnMoreGroups; + } + + + public GroupTransferableRequirements targetIsGroupMember(@javax.annotation.Nonnull Boolean targetIsGroupMember) { + this.targetIsGroupMember = targetIsGroupMember; + return this; + } + + /** + * Get targetIsGroupMember + * @return targetIsGroupMember + */ + @javax.annotation.Nonnull + public Boolean getTargetIsGroupMember() { + return targetIsGroupMember; + } + + public void setTargetIsGroupMember(@javax.annotation.Nonnull Boolean targetIsGroupMember) { + this.targetIsGroupMember = targetIsGroupMember; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GroupTransferableRequirements groupTransferableRequirements = (GroupTransferableRequirements) o; + return Objects.equals(this.groupNotMonetized, groupTransferableRequirements.groupNotMonetized) && + Objects.equals(this.hasVRCPlus, groupTransferableRequirements.hasVRCPlus) && + Objects.equals(this.hasVerifiedEmail, groupTransferableRequirements.hasVerifiedEmail) && + Objects.equals(this.targetCanOwnMoreGroups, groupTransferableRequirements.targetCanOwnMoreGroups) && + Objects.equals(this.targetIsGroupMember, groupTransferableRequirements.targetIsGroupMember); + } + + @Override + public int hashCode() { + return Objects.hash(groupNotMonetized, hasVRCPlus, hasVerifiedEmail, targetCanOwnMoreGroups, targetIsGroupMember); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GroupTransferableRequirements {\n"); + sb.append(" groupNotMonetized: ").append(toIndentedString(groupNotMonetized)).append("\n"); + sb.append(" hasVRCPlus: ").append(toIndentedString(hasVRCPlus)).append("\n"); + sb.append(" hasVerifiedEmail: ").append(toIndentedString(hasVerifiedEmail)).append("\n"); + sb.append(" targetCanOwnMoreGroups: ").append(toIndentedString(targetCanOwnMoreGroups)).append("\n"); + sb.append(" targetIsGroupMember: ").append(toIndentedString(targetIsGroupMember)).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("groupNotMonetized", "hasVRCPlus", "hasVerifiedEmail", "targetCanOwnMoreGroups", "targetIsGroupMember")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("groupNotMonetized", "hasVRCPlus", "hasVerifiedEmail", "targetCanOwnMoreGroups", "targetIsGroupMember")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!GroupTransferableRequirements.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GroupTransferableRequirements.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GroupTransferableRequirements' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GroupTransferableRequirements.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GroupTransferableRequirements value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GroupTransferableRequirements read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..6191bb86 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/GroupUserVisibility.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 GroupUserVisibility + */ +@JsonAdapter(GroupUserVisibility.Adapter.class) +public enum GroupUserVisibility { + + FRIENDS("friends"), + + HIDDEN("hidden"), + + VISIBLE("visible"); + + private String value; + + GroupUserVisibility(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GroupUserVisibility fromValue(String value) { + for (GroupUserVisibility b : GroupUserVisibility.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 GroupUserVisibility enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GroupUserVisibility read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..c2871d46 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ImageAnimationStyle.java @@ -0,0 +1,127 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Animation style for images. + */ +@JsonAdapter(ImageAnimationStyle.Adapter.class) +public enum ImageAnimationStyle { + + AURA("aura"), + + BATS("bats"), + + BEES("bees"), + + BOUNCE("bounce"), + + CLOUD("cloud"), + + CONFETTI("confetti"), + + CRYING("crying"), + + DISLIKE("dislike"), + + FIRE("fire"), + + IDEA("idea"), + + LASERS("lasers"), + + LIKE("like"), + + MAGNET("magnet"), + + MISTLETOE("mistletoe"), + + MONEY("money"), + + NOISE("noise"), + + ORBIT("orbit"), + + PIZZA("pizza"), + + RAIN("rain"), + + ROTATE("rotate"), + + SHAKE("shake"), + + SNOW("snow"), + + SNOWBALL("snowball"), + + SPIN("spin"), + + SPLASH("splash"), + + STOP("stop"), + + ZZZ("zzz"); + + private String value; + + ImageAnimationStyle(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImageAnimationStyle fromValue(String value) { + for (ImageAnimationStyle b : ImageAnimationStyle.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 ImageAnimationStyle enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImageAnimationStyle read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..07262cc8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ImageLoopStyle.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Animation looping style for images. + */ +@JsonAdapter(ImageLoopStyle.Adapter.class) +public enum ImageLoopStyle { + + LINEAR("linear"), + + PINGPONG("pingpong"); + + private String value; + + ImageLoopStyle(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImageLoopStyle fromValue(String value) { + for (ImageLoopStyle b : ImageLoopStyle.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 ImageLoopStyle enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImageLoopStyle read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..22a950b3 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ImageMask.java @@ -0,0 +1,85 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Mask shape for images. + */ +@JsonAdapter(ImageMask.Adapter.class) +public enum ImageMask { + + CIRCLE("circle"), + + FLOWER("flower"), + + HEART("heart"), + + POW("pow"), + + SQUARE("square"), + + STAR("star"); + + private String value; + + ImageMask(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImageMask fromValue(String value) { + for (ImageMask b : ImageMask.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 ImageMask enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImageMask read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..77457573 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ImagePurpose.java @@ -0,0 +1,95 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Indication of the purpose for uploading images. + */ +@JsonAdapter(ImagePurpose.Adapter.class) +public enum ImagePurpose { + + ADMIN("admin"), + + AVATARGALLERY("avatargallery"), + + AVATARIMAGE("avatarimage"), + + BUNDLE("bundle"), + + EMOJI("emoji"), + + EMOJIANIMATED("emojianimated"), + + GALLERY("gallery"), + + ICON("icon"), + + LISTINGGALLERY("listinggallery"), + + PRODUCT("product"), + + STICKER("sticker"); + + private String value; + + ImagePurpose(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImagePurpose fromValue(String value) { + for (ImagePurpose b : ImagePurpose.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 ImagePurpose enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImagePurpose read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 b53d4d86..a31afa47 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPush.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPush.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,320 +20,315 @@ 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; +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 org.threeten.bp.OffsetDateTime; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; /** - * InfoPush + * */ -@javax.annotation.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_RELEASE_STATUS = "releaseStatus"; - @SerializedName(SERIALIZED_NAME_RELEASE_STATUS) - private ReleaseStatus releaseStatus = ReleaseStatus.PUBLIC; - public static final String SERIALIZED_NAME_PRIORITY = "priority"; @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nonnull private Integer priority; - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = new ArrayList(); - - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private InfoPushData data; - - public static final String SERIALIZED_NAME_HASH = "hash"; - @SerializedName(SERIALIZED_NAME_HASH) - private String hash; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + 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_END_DATE = "endDate"; - @SerializedName(SERIALIZED_NAME_END_DATE) - private OffsetDateTime endDate; - - - public InfoPush id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) @javax.annotation.Nonnull - @ApiModelProperty(example = "launch-beta", required = true, value = "") - - public String getId() { - return id; - } + 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 void setId(String id) { - this.id = id; + public InfoPush() { } - - public InfoPush isEnabled(Boolean isEnabled) { - - this.isEnabled = isEnabled; + public InfoPush createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; return this; } - /** - * Get isEnabled - * @return isEnabled - **/ + /** + * Get createdAt + * @return createdAt + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Boolean getIsEnabled() { - return isEnabled; + public OffsetDateTime getCreatedAt() { + return createdAt; } - - public void setIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; } - public InfoPush releaseStatus(ReleaseStatus releaseStatus) { - - this.releaseStatus = releaseStatus; + public InfoPush data(@javax.annotation.Nonnull InfoPushData data) { + this.data = data; return this; } - /** - * Get releaseStatus - * @return releaseStatus - **/ + /** + * Get data + * @return data + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public ReleaseStatus getReleaseStatus() { - return releaseStatus; + public InfoPushData getData() { + return data; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { - this.releaseStatus = releaseStatus; + public void setData(@javax.annotation.Nonnull InfoPushData data) { + this.data = data; } - public InfoPush priority(Integer priority) { - - this.priority = priority; + public InfoPush endDate(@javax.annotation.Nullable OffsetDateTime endDate) { + this.endDate = endDate; return this; } - /** - * Get priority - * @return priority - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Integer getPriority() { - return priority; + /** + * Get endDate + * @return endDate + */ + @javax.annotation.Nullable + public OffsetDateTime getEndDate() { + return endDate; } - - public void setPriority(Integer priority) { - this.priority = priority; + public void setEndDate(@javax.annotation.Nullable OffsetDateTime endDate) { + this.endDate = endDate; } - public InfoPush tags(List tags) { - - this.tags = tags; - return this; - } - - public InfoPush addTagsItem(String tagsItem) { - this.tags.add(tagsItem); + public InfoPush hash(@javax.annotation.Nonnull String hash) { + this.hash = hash; return this; } - /** - * Get tags - * @return tags - **/ + /** + * Unknown usage, MD5 + * @return hash + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public List getTags() { - return tags; + public String getHash() { + return hash; } - - public void setTags(List tags) { - this.tags = tags; + public void setHash(@javax.annotation.Nonnull String hash) { + this.hash = hash; } - public InfoPush data(InfoPushData data) { - - this.data = data; + public InfoPush id(@javax.annotation.Nonnull String id) { + this.id = id; return this; } - /** - * Get data - * @return data - **/ + /** + * Get id + * @return id + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public InfoPushData getData() { - return data; + public String getId() { + return id; } - - public void setData(InfoPushData data) { - this.data = data; + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; } - public InfoPush hash(String hash) { - - this.hash = hash; + public InfoPush isEnabled(@javax.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; return this; } - /** - * Unknown usage, MD5 - * @return hash - **/ + /** + * Get isEnabled + * @return isEnabled + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Unknown usage, MD5") - - public String getHash() { - return hash; + public Boolean getIsEnabled() { + return isEnabled; } - - public void setHash(String hash) { - this.hash = hash; + public void setIsEnabled(@javax.annotation.Nonnull Boolean isEnabled) { + this.isEnabled = isEnabled; } - public InfoPush createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; + public InfoPush priority(@javax.annotation.Nonnull Integer priority) { + this.priority = priority; return this; } - /** - * Get createdAt - * @return createdAt - **/ + /** + * Get priority + * @return priority + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public OffsetDateTime getCreatedAt() { - return createdAt; + public Integer getPriority() { + return priority; } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public void setPriority(@javax.annotation.Nonnull Integer priority) { + this.priority = priority; } - public InfoPush updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; + public InfoPush releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; return this; } - /** - * Get updatedAt - * @return updatedAt - **/ + /** + * Get releaseStatus + * @return releaseStatus + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public OffsetDateTime getUpdatedAt() { - return updatedAt; + public ReleaseStatus getReleaseStatus() { + return releaseStatus; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + 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; } - /** - * Get startDate + /** + * * @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 endDate(OffsetDateTime endDate) { - - this.endDate = endDate; + public InfoPush tags(@javax.annotation.Nonnull List tags) { + this.tags = tags; return this; } - /** - * Get endDate - * @return endDate - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + public InfoPush addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } - public OffsetDateTime getEndDate() { - return endDate; + /** + * + * @return tags + */ + @javax.annotation.Nonnull + public List getTags() { + return tags; } + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } - public void setEndDate(OffsetDateTime endDate) { - this.endDate = endDate; + + public InfoPush updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; } + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override public boolean equals(Object o) { @@ -345,39 +339,39 @@ public boolean equals(Object o) { return false; } InfoPush infoPush = (InfoPush) o; - return Objects.equals(this.id, infoPush.id) && - Objects.equals(this.isEnabled, infoPush.isEnabled) && - Objects.equals(this.releaseStatus, infoPush.releaseStatus) && - Objects.equals(this.priority, infoPush.priority) && - Objects.equals(this.tags, infoPush.tags) && + return Objects.equals(this.createdAt, infoPush.createdAt) && Objects.equals(this.data, infoPush.data) && + Objects.equals(this.endDate, infoPush.endDate) && Objects.equals(this.hash, infoPush.hash) && - Objects.equals(this.createdAt, infoPush.createdAt) && - Objects.equals(this.updatedAt, infoPush.updatedAt) && + Objects.equals(this.id, infoPush.id) && + Objects.equals(this.isEnabled, infoPush.isEnabled) && + Objects.equals(this.priority, infoPush.priority) && + Objects.equals(this.releaseStatus, infoPush.releaseStatus) && Objects.equals(this.startDate, infoPush.startDate) && - Objects.equals(this.endDate, infoPush.endDate); + Objects.equals(this.tags, infoPush.tags) && + Objects.equals(this.updatedAt, infoPush.updatedAt); } @Override public int hashCode() { - return Objects.hash(id, isEnabled, releaseStatus, priority, tags, data, hash, createdAt, updatedAt, startDate, endDate); + return Objects.hash(createdAt, data, endDate, hash, id, isEnabled, priority, releaseStatus, startDate, tags, updatedAt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InfoPush {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); - sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); sb.append("}"); return sb.toString(); } @@ -387,11 +381,114 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("createdAt", "data", "endDate", "hash", "id", "isEnabled", "priority", "releaseStatus", "startDate", "tags", "updatedAt")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InfoPush.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 `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 (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.validateJsonElement(jsonObj.get("data")); + if (!jsonObj.get("hash").isJsonPrimitive()) { + 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(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(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InfoPush.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InfoPush' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InfoPush.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InfoPush value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InfoPush read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 c1524b37..63b7fa8b 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushData.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushData.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,231 +21,232 @@ 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; +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; + /** - * InfoPushData + * */ -@javax.annotation.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 static final String SERIALIZED_NAME_ARTICLE = "article"; - @SerializedName(SERIALIZED_NAME_ARTICLE) - private InfoPushDataArticle article; + public InfoPushData() { + } + public InfoPushData article(@javax.annotation.Nullable InfoPushDataArticle article) { + this.article = article; + return this; + } + + /** + * Get article + * @return article + */ + @javax.annotation.Nullable + public InfoPushDataArticle getArticle() { + return 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; } - public InfoPushData article(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) { - this.article = article; - } - @Override public boolean equals(Object o) { @@ -257,25 +257,26 @@ public boolean equals(Object o) { return false; } InfoPushData infoPushData = (InfoPushData) o; - return Objects.equals(this.contentList, infoPushData.contentList) && + return Objects.equals(this.article, infoPushData.article) && + Objects.equals(this.contentList, infoPushData.contentList) && Objects.equals(this.description, infoPushData.description) && Objects.equals(this.imageUrl, infoPushData.imageUrl) && Objects.equals(this.name, infoPushData.name) && Objects.equals(this.onPressed, infoPushData.onPressed) && Objects.equals(this.template, infoPushData.template) && - Objects.equals(this.version, infoPushData.version) && - Objects.equals(this.article, infoPushData.article); + Objects.equals(this.version, infoPushData.version); } @Override public int hashCode() { - return Objects.hash(contentList, description, imageUrl, name, onPressed, template, version, article); + return Objects.hash(article, contentList, description, imageUrl, name, onPressed, template, version); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InfoPushData {\n"); + sb.append(" article: ").append(toIndentedString(article)).append("\n"); sb.append(" contentList: ").append(toIndentedString(contentList)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); @@ -283,7 +284,6 @@ public String toString() { sb.append(" onPressed: ").append(toIndentedString(onPressed)).append("\n"); sb.append(" template: ").append(toIndentedString(template)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" article: ").append(toIndentedString(article)).append("\n"); sb.append("}"); return sb.toString(); } @@ -293,11 +293,118 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("article", "contentList", "description", "imageUrl", "name", "onPressed", "template", "version")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InfoPushData.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 `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.validateJsonElement(jsonObj.get("article")); + } + // validate the optional field `contentList` + if (jsonObj.get("contentList") != null && !jsonObj.get("contentList").isJsonNull()) { + DynamicContentRow.validateJsonElement(jsonObj.get("contentList")); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + 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(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(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.validateJsonElement(jsonObj.get("onPressed")); + } + if ((jsonObj.get("template") != null && !jsonObj.get("template").isJsonNull()) && !jsonObj.get("template").isJsonPrimitive()) { + 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(java.util.Locale.ROOT, "Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InfoPushData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InfoPushData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InfoPushData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InfoPushData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InfoPushData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 0b16fbe3..01446dd4 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushDataArticle.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushDataArticle.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,50 +13,71 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -88,11 +109,95 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("content")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InfoPushDataArticle.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 `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.validateJsonElement(jsonObj.get("content")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InfoPushDataArticle.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InfoPushDataArticle' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InfoPushDataArticle.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InfoPushDataArticle value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InfoPushDataArticle read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 fb1604af..635ba665 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushDataArticleContent.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushDataArticleContent.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,104 +13,119 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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_TEXT = "text"; - @SerializedName(SERIALIZED_NAME_TEXT) - private String text; - 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 InfoPushDataArticleContent text(String text) { - - this.text = text; - return this; - } - - /** - * Get text - * @return text - **/ + public static final String SERIALIZED_NAME_TEXT = "text"; + @SerializedName(SERIALIZED_NAME_TEXT) @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getText() { - return text; - } - + private String text; - public void setText(String text) { - this.text = 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(@javax.annotation.Nullable String text) { + this.text = text; + return this; + } + + /** + * Get text + * @return text + */ + @javax.annotation.Nullable + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nullable String text) { + this.text = text; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -120,23 +135,23 @@ public boolean equals(Object o) { return false; } InfoPushDataArticleContent infoPushDataArticleContent = (InfoPushDataArticleContent) o; - return Objects.equals(this.text, infoPushDataArticleContent.text) && - Objects.equals(this.imageUrl, infoPushDataArticleContent.imageUrl) && - Objects.equals(this.onPressed, infoPushDataArticleContent.onPressed); + return Objects.equals(this.imageUrl, infoPushDataArticleContent.imageUrl) && + Objects.equals(this.onPressed, infoPushDataArticleContent.onPressed) && + Objects.equals(this.text, infoPushDataArticleContent.text); } @Override public int hashCode() { - return Objects.hash(text, imageUrl, onPressed); + return Objects.hash(imageUrl, onPressed, text); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InfoPushDataArticleContent {\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); sb.append(" onPressed: ").append(toIndentedString(onPressed)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); sb.append("}"); return sb.toString(); } @@ -146,11 +161,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("imageUrl", "onPressed", "text")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InfoPushDataArticleContent.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 `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(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.validateJsonElement(jsonObj.get("onPressed")); + } + if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InfoPushDataArticleContent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InfoPushDataArticleContent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InfoPushDataArticleContent.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InfoPushDataArticleContent value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InfoPushDataArticleContent read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 ac1ded9f..b88c2afd 100644 --- a/src/main/java/io/github/vrchatapi/model/InfoPushDataClickable.java +++ b/src/main/java/io/github/vrchatapi/model/InfoPushDataClickable.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,35 +13,61 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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) + @javax.annotation.Nullable + private List parameters = new ArrayList<>(); + /** * Gets or Sets command */ @JsonAdapter(CommandEnum.Adapter.class) public enum CommandEnum { - OPENURL("OpenURL"), + CANNED_WORLD_SEARCH("CannedWorldSearch"), - OPENVRCPLUSMENU("OpenVRCPlusMenu"), + OPEN_SAFETY_MENU("OpenSafetyMenu"), - OPENSAFETYMENU("OpenSafetyMenu"), + OPEN_URL("OpenURL"), - CANNEDWORLDSEARCH("CannedWorldSearch"); + OPEN_VRC_PLUS_MENU("OpenVRCPlusMenu"); private String value; @@ -79,71 +105,68 @@ 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) - private CommandEnum command; - - public static final String SERIALIZED_NAME_PARAMETERS = "parameters"; - @SerializedName(SERIALIZED_NAME_PARAMETERS) - private List parameters = null; - - - public InfoPushDataClickable command(CommandEnum command) { - - this.command = command; - return this; - } - - /** - * Get command - * @return command - **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "OpenURL", required = true, value = "") + private CommandEnum command; - public CommandEnum getCommand() { - return command; + public InfoPushDataClickable() { } - - public void setCommand(CommandEnum command) { - this.command = command; - } - - - public InfoPushDataClickable parameters(List parameters) { - + public InfoPushDataClickable parameters(@javax.annotation.Nullable List parameters) { this.parameters = parameters; return this; } public InfoPushDataClickable addParametersItem(String parametersItem) { if (this.parameters == null) { - this.parameters = new ArrayList(); + this.parameters = new ArrayList<>(); } this.parameters.add(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(@javax.annotation.Nonnull CommandEnum command) { + this.command = command; + return this; + } + + /** + * Get command + * @return command + */ + @javax.annotation.Nonnull + public CommandEnum getCommand() { + return command; + } + + public void setCommand(@javax.annotation.Nonnull CommandEnum command) { + this.command = command; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -153,21 +176,21 @@ public boolean equals(Object o) { return false; } InfoPushDataClickable infoPushDataClickable = (InfoPushDataClickable) o; - return Objects.equals(this.command, infoPushDataClickable.command) && - Objects.equals(this.parameters, infoPushDataClickable.parameters); + return Objects.equals(this.parameters, infoPushDataClickable.parameters) && + Objects.equals(this.command, infoPushDataClickable.command); } @Override public int hashCode() { - return Objects.hash(command, parameters); + return Objects.hash(parameters, command); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InfoPushDataClickable {\n"); - sb.append(" command: ").append(toIndentedString(command)).append("\n"); sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); + sb.append(" command: ").append(toIndentedString(command)).append("\n"); sb.append("}"); return sb.toString(); } @@ -177,11 +200,107 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("parameters", "command")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("command")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InfoPushDataClickable.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 `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 (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").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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InfoPushDataClickable.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InfoPushDataClickable' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InfoPushDataClickable.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InfoPushDataClickable value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InfoPushDataClickable read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 55d5c9e6..a475787c 100644 --- a/src/main/java/io/github/vrchatapi/model/Instance.java +++ b/src/main/java/io/github/vrchatapi/model/Instance.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,631 +13,1140 @@ package io.github.vrchatapi.model; import 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.GroupAccessType; +import io.github.vrchatapi.model.InstanceContentSettings; import io.github.vrchatapi.model.InstancePlatforms; +import io.github.vrchatapi.model.InstanceRegion; import io.github.vrchatapi.model.InstanceType; +import io.github.vrchatapi.model.LimitedUserInstance; import io.github.vrchatapi.model.Region; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.github.vrchatapi.model.World; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; /** * * `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) - private Region region = Region.US; + @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) - private List tags = new ArrayList(); + @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_WORLD_ID = "worldId"; - @SerializedName(SERIALIZED_NAME_WORLD_ID) - private String worldId; + 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_HIDDEN = "hidden"; - @SerializedName(SERIALIZED_NAME_HIDDEN) - private String hidden; + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + @javax.annotation.Nullable + private List users = new ArrayList<>(); - public static final String SERIALIZED_NAME_FRIENDS = "friends"; - @SerializedName(SERIALIZED_NAME_FRIENDS) - private String friends; + public static final String SERIALIZED_NAME_WORLD = "world"; + @SerializedName(SERIALIZED_NAME_WORLD) + @javax.annotation.Nonnull + private World world; - public static final String SERIALIZED_NAME_PRIVATE = "private"; - @SerializedName(SERIALIZED_NAME_PRIVATE) - private String _private; + 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.Nonnull - @ApiModelProperty(example = "true", required = true, value = "") - + */ + @javax.annotation.Nullable public Boolean getActive() { return active; } - - public void setActive(Boolean active) { + public void setActive(@javax.annotation.Nullable Boolean active) { this.active = active; } - public Instance canRequestInvite(Boolean canRequestInvite) { - + public Instance ageGate(@javax.annotation.Nullable Boolean ageGate) { + this.ageGate = ageGate; + return this; + } + + /** + * Get ageGate + * @return ageGate + */ + @javax.annotation.Nullable + public Boolean getAgeGate() { + return ageGate; + } + + public void setAgeGate(@javax.annotation.Nullable Boolean ageGate) { + this.ageGate = ageGate; + } + + + public Instance calendarEntryId(@javax.annotation.Nullable String calendarEntryId) { + this.calendarEntryId = calendarEntryId; + return this; + } + + /** + * Get calendarEntryId + * @return calendarEntryId + */ + @javax.annotation.Nullable + public String getCalendarEntryId() { + return calendarEntryId; + } + + public void setCalendarEntryId(@javax.annotation.Nullable String calendarEntryId) { + this.calendarEntryId = calendarEntryId; + } + + + public Instance canRequestInvite(@javax.annotation.Nullable Boolean canRequestInvite) { this.canRequestInvite = canRequestInvite; return this; } - /** + /** * Get canRequestInvite * @return canRequestInvite - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "true", required = true, value = "") - + */ + @javax.annotation.Nullable 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.Nonnull - @ApiModelProperty(example = "8", required = true, value = "") - + */ + @javax.annotation.Nullable 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 full(Boolean full) { - + public Instance closedAt(@javax.annotation.Nullable OffsetDateTime closedAt) { + this.closedAt = closedAt; + return this; + } + + /** + * Get closedAt + * @return closedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getClosedAt() { + return closedAt; + } + + public void setClosedAt(@javax.annotation.Nullable OffsetDateTime closedAt) { + this.closedAt = closedAt; + } + + + public Instance contentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { + this.contentSettings = contentSettings; + return this; + } + + /** + * Get contentSettings + * @return contentSettings + */ + @javax.annotation.Nullable + public InstanceContentSettings getContentSettings() { + return contentSettings; + } + + public void setContentSettings(@javax.annotation.Nullable InstanceContentSettings contentSettings) { + this.contentSettings = contentSettings; + } + + + 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 + public String getCreatorId() { + return creatorId; + } + + public void setCreatorId(@javax.annotation.Nullable String creatorId) { + this.creatorId = creatorId; + } + + + public Instance 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 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 + public String getFriends() { + return friends; + } + + public void setFriends(@javax.annotation.Nullable String friends) { + this.friends = friends; + } + + + 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 id(String id) { - + public Instance gameServerVersion(@javax.annotation.Nullable Integer gameServerVersion) { + this.gameServerVersion = gameServerVersion; + return this; + } + + /** + * Get gameServerVersion + * @return gameServerVersion + */ + @javax.annotation.Nullable + public Integer getGameServerVersion() { + return gameServerVersion; + } + + public void setGameServerVersion(@javax.annotation.Nullable Integer gameServerVersion) { + this.gameServerVersion = gameServerVersion; + } + + + public Instance groupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { + this.groupAccessType = groupAccessType; + return this; + } + + /** + * Get groupAccessType + * @return groupAccessType + */ + @javax.annotation.Nullable + public GroupAccessType getGroupAccessType() { + return groupAccessType; + } + + public void setGroupAccessType(@javax.annotation.Nullable GroupAccessType groupAccessType) { + this.groupAccessType = groupAccessType; + } + + + public Instance hardClose(@javax.annotation.Nullable Boolean hardClose) { + this.hardClose = hardClose; + return this; + } + + /** + * Get hardClose + * @return hardClose + */ + @javax.annotation.Nullable + public Boolean getHardClose() { + return hardClose; + } + + public void setHardClose(@javax.annotation.Nullable Boolean hardClose) { + this.hardClose = hardClose; + } + + + public Instance hasCapacityForYou(@javax.annotation.Nullable Boolean hasCapacityForYou) { + this.hasCapacityForYou = hasCapacityForYou; + return this; + } + + /** + * Get hasCapacityForYou + * @return hasCapacityForYou + */ + @javax.annotation.Nullable + public Boolean getHasCapacityForYou() { + return hasCapacityForYou; + } + + public void setHasCapacityForYou(@javax.annotation.Nullable Boolean hasCapacityForYou) { + this.hasCapacityForYou = hasCapacityForYou; + } + + + 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 + public String getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable String hidden) { + this.hidden = hidden; + } + + + 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 = "wrld_ba913a96-fac4-4048-a062-9aa5db092812: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) { - this.id = id; + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + 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 + public String getInstanceId() { + return instanceId; + } + + public void setInstanceId(@javax.annotation.Nonnull String instanceId) { + this.instanceId = instanceId; } - public Instance instanceId(String instanceId) { - - this.instanceId = instanceId; + public Instance instancePersistenceEnabled(@javax.annotation.Nullable Boolean instancePersistenceEnabled) { + this.instancePersistenceEnabled = instancePersistenceEnabled; return this; } - /** - * Get instanceId - * @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 = "") - - public String getInstanceId() { - return instanceId; + /** + * Get instancePersistenceEnabled + * @return instancePersistenceEnabled + */ + @javax.annotation.Nullable + public Boolean getInstancePersistenceEnabled() { + return instancePersistenceEnabled; } - - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; + 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; } - /** - * 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. + /** + * 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_ba913a96-fac4-4048-a062-9aa5db092812: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 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 ownerId(String ownerId) { - + public Instance nonce(@javax.annotation.Nullable String nonce) { + this.nonce = nonce; + return this; + } + + /** + * Get nonce + * @return nonce + */ + @javax.annotation.Nullable + public String getNonce() { + return nonce; + } + + public void setNonce(@javax.annotation.Nullable String nonce) { + this.nonce = nonce; + } + + + public Instance 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. + /** + * 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 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 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 region(Region region) { - + public Instance playerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { + this.playerPersistenceEnabled = playerPersistenceEnabled; + return this; + } + + /** + * Get playerPersistenceEnabled + * @return playerPersistenceEnabled + */ + @javax.annotation.Nullable + public Boolean getPlayerPersistenceEnabled() { + return playerPersistenceEnabled; + } + + public void setPlayerPersistenceEnabled(@javax.annotation.Nullable Boolean playerPersistenceEnabled) { + this.playerPersistenceEnabled = playerPersistenceEnabled; + } + + + 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 + public String getPrivate() { + return _private; + } + + public void setPrivate(@javax.annotation.Nullable String _private) { + this._private = _private; + } + + + public Instance queueEnabled(@javax.annotation.Nonnull Boolean queueEnabled) { + this.queueEnabled = queueEnabled; + return this; + } + + /** + * Get queueEnabled + * @return queueEnabled + */ + @javax.annotation.Nonnull + public Boolean getQueueEnabled() { + return queueEnabled; + } + + public void setQueueEnabled(@javax.annotation.Nonnull Boolean queueEnabled) { + this.queueEnabled = queueEnabled; + } + + + public Instance queueSize(@javax.annotation.Nonnull Integer queueSize) { + this.queueSize = queueSize; + return this; + } + + /** + * Get queueSize + * minimum: 0 + * @return queueSize + */ + @javax.annotation.Nonnull + public Integer getQueueSize() { + return queueSize; + } + + public void setQueueSize(@javax.annotation.Nonnull Integer queueSize) { + this.queueSize = queueSize; + } + + + public Instance recommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + return this; + } + + /** + * Get recommendedCapacity + * minimum: 0 + * @return recommendedCapacity + */ + @javax.annotation.Nonnull + public Integer getRecommendedCapacity() { + return recommendedCapacity; + } + + public void setRecommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + } + + + 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 Region getRegion() { + public InstanceRegion getRegion() { return region; } - - public void setRegion(Region region) { + public void setRegion(@javax.annotation.Nonnull InstanceRegion region) { this.region = region; } - public Instance shortName(String shortName) { - + public Instance roleRestricted(@javax.annotation.Nullable Boolean roleRestricted) { + this.roleRestricted = roleRestricted; + return this; + } + + /** + * Get roleRestricted + * @return roleRestricted + */ + @javax.annotation.Nullable + public Boolean getRoleRestricted() { + return roleRestricted; + } + + public void setRoleRestricted(@javax.annotation.Nullable Boolean roleRestricted) { + this.roleRestricted = roleRestricted; + } + + + public Instance secureName(@javax.annotation.Nonnull String secureName) { + this.secureName = secureName; + return this; + } + + /** + * Get secureName + * @return secureName + */ + @javax.annotation.Nonnull + public String getSecureName() { + return secureName; + } + + public void setSecureName(@javax.annotation.Nonnull String secureName) { + this.secureName = secureName; + } + + + public Instance shortName(@javax.annotation.Nullable String shortName) { this.shortName = shortName; return this; } - /** + /** * Get shortName * @return shortName - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "fortran-grublink-41d83", required = true, value = "") - + */ + @javax.annotation.Nullable public String getShortName() { return shortName; } - - public void setShortName(String shortName) { + public void setShortName(@javax.annotation.Nullable String shortName) { this.shortName = shortName; } - public Instance tags(List tags) { - + public Instance strict(@javax.annotation.Nonnull Boolean strict) { + this.strict = strict; + return this; + } + + /** + * Get strict + * @return strict + */ + @javax.annotation.Nonnull + public Boolean getStrict() { + return strict; + } + + public void setStrict(@javax.annotation.Nonnull Boolean strict) { + this.strict = strict; + } + + + 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 = "[\"show_social_rank\",\"language_eng\",\"language_jpn\"]", 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 worldId(String worldId) { - - this.worldId = worldId; + public Instance userCount(@javax.annotation.Nonnull Integer userCount) { + this.userCount = userCount; return this; } - /** - * WorldID be \"offline\" on User profiles if you are not friends with that user. - * @return worldId - **/ + /** + * Get userCount + * minimum: 0 + * @return userCount + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "wrld_ba913a96-fac4-4048-a062-9aa5db092812", required = true, value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") + public Integer getUserCount() { + return userCount; + } - public String getWorldId() { - return worldId; + public void setUserCount(@javax.annotation.Nonnull Integer userCount) { + this.userCount = userCount; } - public void setWorldId(String worldId) { - this.worldId = worldId; + public Instance users(@javax.annotation.Nullable List users) { + this.users = users; + return this; } - - public Instance hidden(String hidden) { - - this.hidden = hidden; + public Instance addUsersItem(LimitedUserInstance usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); 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 - **/ + /** + * The users field is present on instances created by the requesting user. + * @return users + */ @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 List getUsers() { + return users; } - - public void setHidden(String hidden) { - this.hidden = hidden; + public void setUsers(@javax.annotation.Nullable List users) { + this.users = users; } - public Instance friends(String friends) { - - this.friends = friends; + public Instance world(@javax.annotation.Nonnull World world) { + this.world = world; 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; + /** + * Get world + * @return world + */ + @javax.annotation.Nonnull + public World getWorld() { + return world; } - - public void setFriends(String friends) { - this.friends = friends; + public void setWorld(@javax.annotation.Nonnull World world) { + this.world = world; } - public Instance _private(String _private) { - - this._private = _private; + public Instance worldId(@javax.annotation.Nonnull String worldId) { + this.worldId = worldId; 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; + /** + * WorldID be \"offline\" on User profiles if you are not friends with that user. + * @return worldId + */ + @javax.annotation.Nonnull + public String getWorldId() { + return worldId; } - - public void setPrivate(String _private) { - this._private = _private; + public void setWorldId(@javax.annotation.Nonnull String worldId) { + this.worldId = worldId; } + @Override public boolean equals(Object o) { if (this == o) { @@ -648,32 +1157,65 @@ public boolean equals(Object o) { } Instance instance = (Instance) o; return Objects.equals(this.active, instance.active) && + Objects.equals(this.ageGate, instance.ageGate) && + Objects.equals(this.calendarEntryId, instance.calendarEntryId) && Objects.equals(this.canRequestInvite, instance.canRequestInvite) && Objects.equals(this.capacity, instance.capacity) && Objects.equals(this.clientNumber, instance.clientNumber) && + Objects.equals(this.closedAt, instance.closedAt) && + Objects.equals(this.contentSettings, instance.contentSettings) && + Objects.equals(this.creatorId, instance.creatorId) && + Objects.equals(this.displayName, instance.displayName) && + Objects.equals(this.friends, instance.friends) && Objects.equals(this.full, instance.full) && + Objects.equals(this.gameServerVersion, instance.gameServerVersion) && + Objects.equals(this.groupAccessType, instance.groupAccessType) && + Objects.equals(this.hardClose, instance.hardClose) && + Objects.equals(this.hasCapacityForYou, instance.hasCapacityForYou) && + Objects.equals(this.hidden, instance.hidden) && Objects.equals(this.id, instance.id) && Objects.equals(this.instanceId, instance.instanceId) && + Objects.equals(this.instancePersistenceEnabled, instance.instancePersistenceEnabled) && Objects.equals(this.location, instance.location) && Objects.equals(this.nUsers, instance.nUsers) && Objects.equals(this.name, instance.name) && + Objects.equals(this.nonce, instance.nonce) && Objects.equals(this.ownerId, instance.ownerId) && Objects.equals(this.permanent, instance.permanent) && Objects.equals(this.photonRegion, instance.photonRegion) && Objects.equals(this.platforms, instance.platforms) && + Objects.equals(this.playerPersistenceEnabled, instance.playerPersistenceEnabled) && + Objects.equals(this._private, instance._private) && + Objects.equals(this.queueEnabled, instance.queueEnabled) && + Objects.equals(this.queueSize, instance.queueSize) && + Objects.equals(this.recommendedCapacity, instance.recommendedCapacity) && Objects.equals(this.region, instance.region) && + Objects.equals(this.roleRestricted, instance.roleRestricted) && + Objects.equals(this.secureName, instance.secureName) && Objects.equals(this.shortName, instance.shortName) && + Objects.equals(this.strict, instance.strict) && Objects.equals(this.tags, instance.tags) && Objects.equals(this.type, instance.type) && - Objects.equals(this.worldId, instance.worldId) && - Objects.equals(this.hidden, instance.hidden) && - Objects.equals(this.friends, instance.friends) && - Objects.equals(this._private, instance._private); + Objects.equals(this.userCount, instance.userCount) && + Objects.equals(this.users, instance.users) && + Objects.equals(this.world, instance.world) && + Objects.equals(this.worldId, instance.worldId); + } + + 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(active, canRequestInvite, capacity, clientNumber, full, id, instanceId, location, nUsers, name, ownerId, permanent, photonRegion, platforms, region, shortName, tags, type, worldId, hidden, friends, _private); + return Objects.hash(active, ageGate, calendarEntryId, canRequestInvite, capacity, clientNumber, closedAt, contentSettings, creatorId, displayName, friends, full, gameServerVersion, groupAccessType, hardClose, hasCapacityForYou, hidden, id, instanceId, instancePersistenceEnabled, location, nUsers, name, nonce, ownerId, permanent, photonRegion, platforms, playerPersistenceEnabled, _private, queueEnabled, queueSize, recommendedCapacity, region, roleRestricted, secureName, shortName, strict, tags, type, userCount, users, world, worldId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -681,27 +1223,49 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Instance {\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" ageGate: ").append(toIndentedString(ageGate)).append("\n"); + sb.append(" calendarEntryId: ").append(toIndentedString(calendarEntryId)).append("\n"); sb.append(" canRequestInvite: ").append(toIndentedString(canRequestInvite)).append("\n"); sb.append(" capacity: ").append(toIndentedString(capacity)).append("\n"); sb.append(" clientNumber: ").append(toIndentedString(clientNumber)).append("\n"); + sb.append(" closedAt: ").append(toIndentedString(closedAt)).append("\n"); + sb.append(" contentSettings: ").append(toIndentedString(contentSettings)).append("\n"); + sb.append(" creatorId: ").append(toIndentedString(creatorId)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" friends: ").append(toIndentedString(friends)).append("\n"); sb.append(" full: ").append(toIndentedString(full)).append("\n"); + sb.append(" gameServerVersion: ").append(toIndentedString(gameServerVersion)).append("\n"); + sb.append(" groupAccessType: ").append(toIndentedString(groupAccessType)).append("\n"); + sb.append(" hardClose: ").append(toIndentedString(hardClose)).append("\n"); + sb.append(" hasCapacityForYou: ").append(toIndentedString(hasCapacityForYou)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n"); + sb.append(" instancePersistenceEnabled: ").append(toIndentedString(instancePersistenceEnabled)).append("\n"); sb.append(" location: ").append(toIndentedString(location)).append("\n"); sb.append(" nUsers: ").append(toIndentedString(nUsers)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nonce: ").append(toIndentedString(nonce)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" permanent: ").append(toIndentedString(permanent)).append("\n"); sb.append(" photonRegion: ").append(toIndentedString(photonRegion)).append("\n"); sb.append(" platforms: ").append(toIndentedString(platforms)).append("\n"); + sb.append(" playerPersistenceEnabled: ").append(toIndentedString(playerPersistenceEnabled)).append("\n"); + sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); + sb.append(" queueEnabled: ").append(toIndentedString(queueEnabled)).append("\n"); + sb.append(" queueSize: ").append(toIndentedString(queueSize)).append("\n"); + sb.append(" recommendedCapacity: ").append(toIndentedString(recommendedCapacity)).append("\n"); sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" roleRestricted: ").append(toIndentedString(roleRestricted)).append("\n"); + sb.append(" secureName: ").append(toIndentedString(secureName)).append("\n"); sb.append(" shortName: ").append(toIndentedString(shortName)).append("\n"); + sb.append(" strict: ").append(toIndentedString(strict)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" userCount: ").append(toIndentedString(userCount)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" world: ").append(toIndentedString(world)).append("\n"); sb.append(" worldId: ").append(toIndentedString(worldId)).append("\n"); - sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); - sb.append(" friends: ").append(toIndentedString(friends)).append("\n"); - sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); sb.append("}"); return sb.toString(); } @@ -711,11 +1275,184 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Instance.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 `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 (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(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(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.validateJsonElement(jsonObj.get("contentSettings")); + } + if ((jsonObj.get("creatorId") != null && !jsonObj.get("creatorId").isJsonNull()) && !jsonObj.get("creatorId").isJsonPrimitive()) { + 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(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(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(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(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(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(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(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(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(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.validateJsonElement(jsonObj.get("platforms")); + if ((jsonObj.get("private") != null && !jsonObj.get("private").isJsonNull()) && !jsonObj.get("private").isJsonPrimitive()) { + 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(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(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(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(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.validateJsonElement(jsonArrayusers.get(i)); + }; + } + } + // validate the required field `world` + World.validateJsonElement(jsonObj.get("world")); + if (!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 (!Instance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Instance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Instance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Instance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Instance read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..a15e3c3e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InstanceContentSettings.java @@ -0,0 +1,328 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Types of dynamic user content permitted in an instance + */ +@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(@javax.annotation.Nullable Boolean drones) { + this.drones = drones; + return this; + } + + /** + * Get drones + * @return drones + */ + @javax.annotation.Nullable + public Boolean getDrones() { + return drones; + } + + public void setDrones(@javax.annotation.Nullable Boolean drones) { + this.drones = drones; + } + + + public InstanceContentSettings emoji(@javax.annotation.Nullable Boolean emoji) { + this.emoji = emoji; + return this; + } + + /** + * Get emoji + * @return emoji + */ + @javax.annotation.Nullable + public Boolean getEmoji() { + return emoji; + } + + public void setEmoji(@javax.annotation.Nullable Boolean emoji) { + this.emoji = emoji; + } + + + public InstanceContentSettings pedestals(@javax.annotation.Nullable Boolean pedestals) { + this.pedestals = pedestals; + return this; + } + + /** + * Get pedestals + * @return pedestals + */ + @javax.annotation.Nullable + public Boolean getPedestals() { + return pedestals; + } + + public void setPedestals(@javax.annotation.Nullable Boolean pedestals) { + this.pedestals = pedestals; + } + + + public InstanceContentSettings prints(@javax.annotation.Nullable Boolean prints) { + this.prints = prints; + return this; + } + + /** + * Get prints + * @return prints + */ + @javax.annotation.Nullable + public Boolean getPrints() { + return prints; + } + + public void setPrints(@javax.annotation.Nullable Boolean prints) { + this.prints = prints; + } + + + public InstanceContentSettings props(@javax.annotation.Nullable Boolean props) { + this.props = props; + return this; + } + + /** + * Get props + * @return props + */ + @javax.annotation.Nullable + public Boolean getProps() { + return props; + } + + public void setProps(@javax.annotation.Nullable Boolean props) { + this.props = props; + } + + + public InstanceContentSettings stickers(@javax.annotation.Nullable Boolean stickers) { + this.stickers = stickers; + return this; + } + + /** + * Get stickers + * @return stickers + */ + @javax.annotation.Nullable + public Boolean getStickers() { + return stickers; + } + + public void setStickers(@javax.annotation.Nullable Boolean stickers) { + this.stickers = stickers; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstanceContentSettings instanceContentSettings = (InstanceContentSettings) o; + return Objects.equals(this.drones, instanceContentSettings.drones) && + Objects.equals(this.emoji, instanceContentSettings.emoji) && + Objects.equals(this.pedestals, instanceContentSettings.pedestals) && + Objects.equals(this.prints, instanceContentSettings.prints) && + Objects.equals(this.props, instanceContentSettings.props) && + Objects.equals(this.stickers, instanceContentSettings.stickers); + } + + @Override + public int hashCode() { + return Objects.hash(drones, emoji, pedestals, prints, props, stickers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InstanceContentSettings {\n"); + sb.append(" drones: ").append(toIndentedString(drones)).append("\n"); + sb.append(" emoji: ").append(toIndentedString(emoji)).append("\n"); + sb.append(" pedestals: ").append(toIndentedString(pedestals)).append("\n"); + sb.append(" prints: ").append(toIndentedString(prints)).append("\n"); + sb.append(" props: ").append(toIndentedString(props)).append("\n"); + sb.append(" stickers: ").append(toIndentedString(stickers)).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("drones", "emoji", "pedestals", "prints", "props", "stickers")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InstanceContentSettings.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 `InstanceContentSettings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InstanceContentSettings.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InstanceContentSettings' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InstanceContentSettings.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InstanceContentSettings value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InstanceContentSettings read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 974c5130..559f42cd 100644 --- a/src/main/java/io/github/vrchatapi/model/InstancePlatforms.java +++ b/src/main/java/io/github/vrchatapi/model/InstancePlatforms.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,78 +13,121 @@ package io.github.vrchatapi.model; import 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; +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; + /** * 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 standalonewindows(Integer standalonewindows) { - + public InstancePlatforms ios(@javax.annotation.Nullable Integer ios) { + this.ios = ios; + return this; + } + + /** + * Get ios + * minimum: 0 + * @return ios + */ + @javax.annotation.Nullable + public Integer getIos() { + return ios; + } + + public void setIos(@javax.annotation.Nullable Integer ios) { + this.ios = ios; + } + + + 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -95,12 +138,13 @@ public boolean equals(Object o) { } InstancePlatforms instancePlatforms = (InstancePlatforms) o; return Objects.equals(this.android, instancePlatforms.android) && + Objects.equals(this.ios, instancePlatforms.ios) && Objects.equals(this.standalonewindows, instancePlatforms.standalonewindows); } @Override public int hashCode() { - return Objects.hash(android, standalonewindows); + return Objects.hash(android, ios, standalonewindows); } @Override @@ -108,6 +152,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InstancePlatforms {\n"); sb.append(" android: ").append(toIndentedString(android)).append("\n"); + sb.append(" ios: ").append(toIndentedString(ios)).append("\n"); sb.append(" standalonewindows: ").append(toIndentedString(standalonewindows)).append("\n"); sb.append("}"); return sb.toString(); @@ -118,11 +163,98 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("android", "ios", "standalonewindows")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("android", "standalonewindows")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InstancePlatforms.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InstancePlatforms.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InstancePlatforms' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InstancePlatforms.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InstancePlatforms value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InstancePlatforms read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..7cb18fd8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InstanceRegion.java @@ -0,0 +1,83 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Instance region + */ +@JsonAdapter(InstanceRegion.Adapter.class) +public enum InstanceRegion { + + EU("eu"), + + JP("jp"), + + UNKNOWN("unknown"), + + US("us"), + + USE("use"); + + private String value; + + InstanceRegion(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InstanceRegion fromValue(String value) { + for (InstanceRegion b : InstanceRegion.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 InstanceRegion enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InstanceRegion read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..081a758c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InstanceShortNameResponse.java @@ -0,0 +1,249 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * InstanceShortNameResponse + */ +@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(@javax.annotation.Nonnull String secureName) { + this.secureName = secureName; + return this; + } + + /** + * Get secureName + * @return secureName + */ + @javax.annotation.Nonnull + public String getSecureName() { + return secureName; + } + + public void setSecureName(@javax.annotation.Nonnull String secureName) { + this.secureName = secureName; + } + + + public InstanceShortNameResponse shortName(@javax.annotation.Nullable String shortName) { + this.shortName = shortName; + return this; + } + + /** + * Get shortName + * @return shortName + */ + @javax.annotation.Nullable + public String getShortName() { + return shortName; + } + + public void setShortName(@javax.annotation.Nullable String shortName) { + this.shortName = shortName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstanceShortNameResponse instanceShortNameResponse = (InstanceShortNameResponse) o; + return Objects.equals(this.secureName, instanceShortNameResponse.secureName) && + Objects.equals(this.shortName, instanceShortNameResponse.shortName); + } + + 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(secureName, shortName); + } + + 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 InstanceShortNameResponse {\n"); + sb.append(" secureName: ").append(toIndentedString(secureName)).append("\n"); + sb.append(" shortName: ").append(toIndentedString(shortName)).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("secureName", "shortName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("secureName")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InstanceShortNameResponse.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `shortName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InstanceShortNameResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InstanceShortNameResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InstanceShortNameResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InstanceShortNameResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InstanceShortNameResponse read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 7eb19a0e..b01f528b 100644 --- a/src/main/java/io/github/vrchatapi/model/InstanceType.java +++ b/src/main/java/io/github/vrchatapi/model/InstanceType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,28 +13,30 @@ 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; /** - * Gets or Sets InstanceType + * */ @JsonAdapter(InstanceType.Adapter.class) public enum InstanceType { - PUBLIC("public"), + FRIENDS("friends"), + + GROUP("group"), HIDDEN("hidden"), - FRIENDS("friends"), + PRIVATE("private"), - PRIVATE("private"); + PUBLIC("public"); private String value; @@ -72,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 new file mode 100644 index 00000000..10ff18d7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Inventory.java @@ -0,0 +1,252 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryItem; +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; + +/** + * Inventory + */ +@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(@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 + public List getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull List data) { + this.data = data; + } + + + public Inventory totalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * @return totalCount + */ + @javax.annotation.Nonnull + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(@javax.annotation.Nonnull Integer totalCount) { + this.totalCount = totalCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Inventory inventory = (Inventory) o; + return Objects.equals(this.data, inventory.data) && + Objects.equals(this.totalCount, inventory.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(data, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Inventory {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).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("data", "totalCount")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("data", "totalCount")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Inventory.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 `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 (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") != 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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Inventory.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Inventory' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Inventory.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Inventory value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Inventory read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..82c3c5e5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryConsumptionResults.java @@ -0,0 +1,292 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryItem; +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; + +/** + * InventoryConsumptionResults + */ +@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(@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 + public List getErrors() { + return errors; + } + + public void setErrors(@javax.annotation.Nonnull List errors) { + this.errors = errors; + } + + + 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 + public List getInventoryItems() { + return inventoryItems; + } + + public void setInventoryItems(@javax.annotation.Nonnull List inventoryItems) { + this.inventoryItems = inventoryItems; + } + + + public InventoryConsumptionResults inventoryItemsCreated(@javax.annotation.Nonnull Integer inventoryItemsCreated) { + this.inventoryItemsCreated = inventoryItemsCreated; + return this; + } + + /** + * Get inventoryItemsCreated + * @return inventoryItemsCreated + */ + @javax.annotation.Nonnull + public Integer getInventoryItemsCreated() { + return inventoryItemsCreated; + } + + public void setInventoryItemsCreated(@javax.annotation.Nonnull Integer inventoryItemsCreated) { + this.inventoryItemsCreated = inventoryItemsCreated; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryConsumptionResults inventoryConsumptionResults = (InventoryConsumptionResults) o; + return Objects.equals(this.errors, inventoryConsumptionResults.errors) && + Objects.equals(this.inventoryItems, inventoryConsumptionResults.inventoryItems) && + Objects.equals(this.inventoryItemsCreated, inventoryConsumptionResults.inventoryItemsCreated); + } + + @Override + public int hashCode() { + return Objects.hash(errors, inventoryItems, inventoryItemsCreated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryConsumptionResults {\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" inventoryItems: ").append(toIndentedString(inventoryItems)).append("\n"); + sb.append(" inventoryItemsCreated: ").append(toIndentedString(inventoryItemsCreated)).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("errors", "inventoryItems", "inventoryItemsCreated")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("errors", "inventoryItems", "inventoryItemsCreated")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryConsumptionResults.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 `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 (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(java.util.Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventoryConsumptionResults.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryConsumptionResults' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryConsumptionResults.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryConsumptionResults value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryConsumptionResults read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValue.java b/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValue.java new file mode 100644 index 00000000..6831893c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryDefaultAttributesValue.java @@ -0,0 +1,232 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryDefaultAttributesValueValidator; +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; + +/** + * InventoryDefaultAttributesValue + */ +@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) + @javax.annotation.Nullable + private InventoryDefaultAttributesValueValidator validator; + + public InventoryDefaultAttributesValue() { + } + + public InventoryDefaultAttributesValue defaultValue(@javax.annotation.Nullable String defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + /** + * Get defaultValue + * @return defaultValue + */ + @javax.annotation.Nullable + public String getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(@javax.annotation.Nullable String defaultValue) { + this.defaultValue = defaultValue; + } + + + public InventoryDefaultAttributesValue validator(@javax.annotation.Nullable InventoryDefaultAttributesValueValidator validator) { + this.validator = validator; + return this; + } + + /** + * Get validator + * @return validator + */ + @javax.annotation.Nullable + public InventoryDefaultAttributesValueValidator getValidator() { + return validator; + } + + public void setValidator(@javax.annotation.Nullable InventoryDefaultAttributesValueValidator validator) { + this.validator = validator; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryDefaultAttributesValue inventoryDefaultAttributesValue = (InventoryDefaultAttributesValue) o; + return Objects.equals(this.defaultValue, inventoryDefaultAttributesValue.defaultValue) && + Objects.equals(this.validator, inventoryDefaultAttributesValue.validator); + } + + @Override + public int hashCode() { + return Objects.hash(defaultValue, validator); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryDefaultAttributesValue {\n"); + sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n"); + sb.append(" validator: ").append(toIndentedString(validator)).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("defaultValue", "validator")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + 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(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()) { + InventoryDefaultAttributesValueValidator.validateJsonElement(jsonObj.get("validator")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + 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(InventoryDefaultAttributesValue.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryDefaultAttributesValue value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryDefaultAttributesValue read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * 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 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..d0117b03 --- /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 + * 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 new file mode 100644 index 00000000..911519a5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryDrop.java @@ -0,0 +1,592 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryNotificationDetails; +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; +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; + +/** + * InventoryDrop + */ +@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(@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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nonnull String authorId) { + this.authorId = authorId; + } + + + public InventoryDrop createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public InventoryDrop dropExpiryDate(@javax.annotation.Nullable OffsetDateTime dropExpiryDate) { + this.dropExpiryDate = dropExpiryDate; + return this; + } + + /** + * Get dropExpiryDate + * @return dropExpiryDate + */ + @javax.annotation.Nullable + public OffsetDateTime getDropExpiryDate() { + return dropExpiryDate; + } + + public void setDropExpiryDate(@javax.annotation.Nullable OffsetDateTime dropExpiryDate) { + this.dropExpiryDate = dropExpiryDate; + } + + + public InventoryDrop endDropDate(@javax.annotation.Nonnull OffsetDateTime endDropDate) { + this.endDropDate = endDropDate; + return this; + } + + /** + * Get endDropDate + * @return endDropDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getEndDropDate() { + return endDropDate; + } + + public void setEndDropDate(@javax.annotation.Nonnull OffsetDateTime endDropDate) { + this.endDropDate = endDropDate; + } + + + public InventoryDrop id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public InventoryDrop isDisabled(@javax.annotation.Nonnull Boolean isDisabled) { + this.isDisabled = isDisabled; + return this; + } + + /** + * Get isDisabled + * @return isDisabled + */ + @javax.annotation.Nonnull + public Boolean getIsDisabled() { + return isDisabled; + } + + public void setIsDisabled(@javax.annotation.Nonnull Boolean isDisabled) { + this.isDisabled = isDisabled; + } + + + public InventoryDrop name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public InventoryDrop notificationDetails(@javax.annotation.Nonnull InventoryNotificationDetails notificationDetails) { + this.notificationDetails = notificationDetails; + return this; + } + + /** + * Get notificationDetails + * @return notificationDetails + */ + @javax.annotation.Nonnull + public InventoryNotificationDetails getNotificationDetails() { + return notificationDetails; + } + + public void setNotificationDetails(@javax.annotation.Nonnull InventoryNotificationDetails notificationDetails) { + this.notificationDetails = notificationDetails; + } + + + public InventoryDrop startDropDate(@javax.annotation.Nonnull OffsetDateTime startDropDate) { + this.startDropDate = startDropDate; + return this; + } + + /** + * Get startDropDate + * @return startDropDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getStartDropDate() { + return startDropDate; + } + + public void setStartDropDate(@javax.annotation.Nonnull OffsetDateTime startDropDate) { + this.startDropDate = startDropDate; + } + + + public InventoryDrop status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public InventoryDrop targetGroup(@javax.annotation.Nonnull String targetGroup) { + this.targetGroup = targetGroup; + return this; + } + + /** + * Get targetGroup + * @return targetGroup + */ + @javax.annotation.Nonnull + public String getTargetGroup() { + return targetGroup; + } + + public void setTargetGroup(@javax.annotation.Nonnull String targetGroup) { + this.targetGroup = targetGroup; + } + + + 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 + public List getTemplateIds() { + return templateIds; + } + + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { + this.templateIds = templateIds; + } + + + public InventoryDrop updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryDrop inventoryDrop = (InventoryDrop) o; + return Objects.equals(this.authorId, inventoryDrop.authorId) && + Objects.equals(this.createdAt, inventoryDrop.createdAt) && + Objects.equals(this.dropExpiryDate, inventoryDrop.dropExpiryDate) && + Objects.equals(this.endDropDate, inventoryDrop.endDropDate) && + Objects.equals(this.id, inventoryDrop.id) && + Objects.equals(this.isDisabled, inventoryDrop.isDisabled) && + Objects.equals(this.name, inventoryDrop.name) && + Objects.equals(this.notificationDetails, inventoryDrop.notificationDetails) && + Objects.equals(this.startDropDate, inventoryDrop.startDropDate) && + Objects.equals(this.status, inventoryDrop.status) && + Objects.equals(this.tags, inventoryDrop.tags) && + Objects.equals(this.targetGroup, inventoryDrop.targetGroup) && + Objects.equals(this.templateIds, inventoryDrop.templateIds) && + Objects.equals(this.updatedAt, inventoryDrop.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(authorId, createdAt, dropExpiryDate, endDropDate, id, isDisabled, name, notificationDetails, startDropDate, status, tags, targetGroup, templateIds, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryDrop {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" dropExpiryDate: ").append(toIndentedString(dropExpiryDate)).append("\n"); + sb.append(" endDropDate: ").append(toIndentedString(endDropDate)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isDisabled: ").append(toIndentedString(isDisabled)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" notificationDetails: ").append(toIndentedString(notificationDetails)).append("\n"); + sb.append(" startDropDate: ").append(toIndentedString(startDropDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" targetGroup: ").append(toIndentedString(targetGroup)).append("\n"); + sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryDrop.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 `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 (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(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(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(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.validateJsonElement(jsonObj.get("notificationDetails")); + if (!jsonObj.get("status").isJsonPrimitive()) { + 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(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(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(java.util.Locale.ROOT, "Expected the field `templateIds` to be an array in the JSON string but got `%s`", jsonObj.get("templateIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventoryDrop.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryDrop' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryDrop.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryDrop value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryDrop read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..48eb4317 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryEquipSlot.java @@ -0,0 +1,81 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 InventoryEquipSlot + */ +@JsonAdapter(InventoryEquipSlot.Adapter.class) +public enum InventoryEquipSlot { + + EMPTY(""), + + DRONE("drone"), + + PORTAL("portal"), + + WARP("warp"); + + private String value; + + InventoryEquipSlot(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InventoryEquipSlot fromValue(String value) { + for (InventoryEquipSlot b : InventoryEquipSlot.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 InventoryEquipSlot enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InventoryEquipSlot read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..013032e4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryFlag.java @@ -0,0 +1,89 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 InventoryFlag + */ +@JsonAdapter(InventoryFlag.Adapter.class) +public enum InventoryFlag { + + ARCHIVABLE("archivable"), + + CLONEABLE("cloneable"), + + CONSUMABLE("consumable"), + + EQUIPPABLE("equippable"), + + INSTANTIATABLE("instantiatable"), + + TRASHABLE("trashable"), + + UGC("ugc"), + + UNIQUE("unique"); + + private String value; + + InventoryFlag(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InventoryFlag fromValue(String value) { + for (InventoryFlag b : InventoryFlag.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 InventoryFlag enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InventoryFlag read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..eebdc2a0 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryItem.java @@ -0,0 +1,944 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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 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; +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; + +/** + * InventoryItem + */ +@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) + @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) + @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(@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 + public List getCollections() { + return collections; + } + + public void setCollections(@javax.annotation.Nonnull List collections) { + this.collections = collections; + } + + + public InventoryItem createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public InventoryItem defaultAttributes(@javax.annotation.Nonnull Map defaultAttributes) { + this.defaultAttributes = defaultAttributes; + return this; + } + + 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 + public Map getDefaultAttributes() { + return defaultAttributes; + } + + public void setDefaultAttributes(@javax.annotation.Nonnull Map defaultAttributes) { + this.defaultAttributes = defaultAttributes; + } + + + public InventoryItem description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public InventoryItem equipSlot(@javax.annotation.Nullable InventoryEquipSlot equipSlot) { + this.equipSlot = equipSlot; + return this; + } + + /** + * Get equipSlot + * @return equipSlot + */ + @javax.annotation.Nullable + public InventoryEquipSlot getEquipSlot() { + return equipSlot; + } + + public void setEquipSlot(@javax.annotation.Nullable InventoryEquipSlot equipSlot) { + this.equipSlot = equipSlot; + } + + + public InventoryItem equipSlots(@javax.annotation.Nullable List equipSlots) { + this.equipSlots = equipSlots; + return this; + } + + public InventoryItem addEquipSlotsItem(InventoryEquipSlot equipSlotsItem) { + if (this.equipSlots == null) { + this.equipSlots = new ArrayList<>(); + } + this.equipSlots.add(equipSlotsItem); + return this; + } + + /** + * Get equipSlots + * @return equipSlots + */ + @javax.annotation.Nullable + public List getEquipSlots() { + return equipSlots; + } + + public void setEquipSlots(@javax.annotation.Nullable List equipSlots) { + this.equipSlots = equipSlots; + } + + + public InventoryItem expiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + return this; + } + + /** + * Get expiryDate + * @return expiryDate + */ + @javax.annotation.Nullable + public OffsetDateTime getExpiryDate() { + return expiryDate; + } + + public void setExpiryDate(@javax.annotation.Nullable OffsetDateTime expiryDate) { + this.expiryDate = expiryDate; + } + + + 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 + public List getFlags() { + return flags; + } + + public void setFlags(@javax.annotation.Nonnull List flags) { + this.flags = flags; + } + + + 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 + public String getHolderId() { + return holderId; + } + + public void setHolderId(@javax.annotation.Nonnull String holderId) { + this.holderId = holderId; + } + + + public InventoryItem id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public InventoryItem imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public InventoryItem isArchived(@javax.annotation.Nonnull Boolean isArchived) { + this.isArchived = isArchived; + return this; + } + + /** + * Get isArchived + * @return isArchived + */ + @javax.annotation.Nonnull + public Boolean getIsArchived() { + return isArchived; + } + + public void setIsArchived(@javax.annotation.Nonnull Boolean isArchived) { + this.isArchived = isArchived; + } + + + public InventoryItem isSeen(@javax.annotation.Nonnull Boolean isSeen) { + this.isSeen = isSeen; + return this; + } + + /** + * Get isSeen + * @return isSeen + */ + @javax.annotation.Nonnull + public Boolean getIsSeen() { + return isSeen; + } + + public void setIsSeen(@javax.annotation.Nonnull Boolean isSeen) { + this.isSeen = isSeen; + } + + + public InventoryItem itemType(@javax.annotation.Nonnull InventoryItemType itemType) { + this.itemType = itemType; + return this; + } + + /** + * Get itemType + * @return itemType + */ + @javax.annotation.Nonnull + public InventoryItemType getItemType() { + return itemType; + } + + public void setItemType(@javax.annotation.Nonnull InventoryItemType itemType) { + this.itemType = itemType; + } + + + public InventoryItem itemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { + this.itemTypeLabel = itemTypeLabel; + return this; + } + + /** + * Get itemTypeLabel + * @return itemTypeLabel + */ + @javax.annotation.Nonnull + public String getItemTypeLabel() { + return itemTypeLabel; + } + + public void setItemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { + this.itemTypeLabel = itemTypeLabel; + } + + + public InventoryItem metadata(@javax.annotation.Nonnull InventoryMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nonnull + public InventoryMetadata getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nonnull InventoryMetadata metadata) { + this.metadata = metadata; + } + + + public InventoryItem name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public InventoryItem quantifiable(@javax.annotation.Nonnull Boolean quantifiable) { + this.quantifiable = quantifiable; + return this; + } + + /** + * Get quantifiable + * @return quantifiable + */ + @javax.annotation.Nonnull + public Boolean getQuantifiable() { + return quantifiable; + } + + public void setQuantifiable(@javax.annotation.Nonnull Boolean quantifiable) { + this.quantifiable = quantifiable; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public InventoryItem templateId(@javax.annotation.Nonnull String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Get templateId + * @return templateId + */ + @javax.annotation.Nonnull + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(@javax.annotation.Nonnull String templateId) { + this.templateId = templateId; + } + + + public InventoryItem templateCreatedAt(@javax.annotation.Nonnull OffsetDateTime templateCreatedAt) { + this.templateCreatedAt = templateCreatedAt; + return this; + } + + /** + * Get templateCreatedAt + * @return templateCreatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getTemplateCreatedAt() { + return templateCreatedAt; + } + + public void setTemplateCreatedAt(@javax.annotation.Nonnull OffsetDateTime templateCreatedAt) { + this.templateCreatedAt = templateCreatedAt; + } + + + public InventoryItem templateUpdatedAt(@javax.annotation.Nonnull OffsetDateTime templateUpdatedAt) { + this.templateUpdatedAt = templateUpdatedAt; + return this; + } + + /** + * Get templateUpdatedAt + * @return templateUpdatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getTemplateUpdatedAt() { + return templateUpdatedAt; + } + + public void setTemplateUpdatedAt(@javax.annotation.Nonnull OffsetDateTime templateUpdatedAt) { + this.templateUpdatedAt = templateUpdatedAt; + } + + + public InventoryItem updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public InventoryItem userAttributes(@javax.annotation.Nonnull InventoryUserAttributes userAttributes) { + this.userAttributes = userAttributes; + return this; + } + + /** + * Get userAttributes + * @return userAttributes + */ + @javax.annotation.Nonnull + public InventoryUserAttributes getUserAttributes() { + return userAttributes; + } + + public void setUserAttributes(@javax.annotation.Nonnull InventoryUserAttributes userAttributes) { + this.userAttributes = userAttributes; + } + + + public InventoryItem validateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { + this.validateUserAttributes = validateUserAttributes; + return this; + } + + /** + * Get validateUserAttributes + * @return validateUserAttributes + */ + @javax.annotation.Nonnull + public Boolean getValidateUserAttributes() { + return validateUserAttributes; + } + + public void setValidateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { + this.validateUserAttributes = validateUserAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryItem inventoryItem = (InventoryItem) o; + return Objects.equals(this.collections, inventoryItem.collections) && + Objects.equals(this.createdAt, inventoryItem.createdAt) && + Objects.equals(this.defaultAttributes, inventoryItem.defaultAttributes) && + Objects.equals(this.description, inventoryItem.description) && + Objects.equals(this.equipSlot, inventoryItem.equipSlot) && + Objects.equals(this.equipSlots, inventoryItem.equipSlots) && + Objects.equals(this.expiryDate, inventoryItem.expiryDate) && + Objects.equals(this.flags, inventoryItem.flags) && + Objects.equals(this.holderId, inventoryItem.holderId) && + Objects.equals(this.id, inventoryItem.id) && + Objects.equals(this.imageUrl, inventoryItem.imageUrl) && + Objects.equals(this.isArchived, inventoryItem.isArchived) && + Objects.equals(this.isSeen, inventoryItem.isSeen) && + Objects.equals(this.itemType, inventoryItem.itemType) && + Objects.equals(this.itemTypeLabel, inventoryItem.itemTypeLabel) && + Objects.equals(this.metadata, inventoryItem.metadata) && + Objects.equals(this.name, inventoryItem.name) && + Objects.equals(this.quantifiable, inventoryItem.quantifiable) && + Objects.equals(this.tags, inventoryItem.tags) && + Objects.equals(this.templateId, inventoryItem.templateId) && + Objects.equals(this.templateCreatedAt, inventoryItem.templateCreatedAt) && + Objects.equals(this.templateUpdatedAt, inventoryItem.templateUpdatedAt) && + Objects.equals(this.updatedAt, inventoryItem.updatedAt) && + Objects.equals(this.userAttributes, inventoryItem.userAttributes) && + Objects.equals(this.validateUserAttributes, inventoryItem.validateUserAttributes); + } + + 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(collections, createdAt, defaultAttributes, description, equipSlot, equipSlots, expiryDate, flags, holderId, id, imageUrl, isArchived, isSeen, itemType, itemTypeLabel, metadata, name, quantifiable, tags, templateId, templateCreatedAt, templateUpdatedAt, updatedAt, userAttributes, validateUserAttributes); + } + + 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 InventoryItem {\n"); + sb.append(" collections: ").append(toIndentedString(collections)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" defaultAttributes: ").append(toIndentedString(defaultAttributes)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" equipSlot: ").append(toIndentedString(equipSlot)).append("\n"); + sb.append(" equipSlots: ").append(toIndentedString(equipSlots)).append("\n"); + sb.append(" expiryDate: ").append(toIndentedString(expiryDate)).append("\n"); + sb.append(" flags: ").append(toIndentedString(flags)).append("\n"); + sb.append(" holderId: ").append(toIndentedString(holderId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" isArchived: ").append(toIndentedString(isArchived)).append("\n"); + sb.append(" isSeen: ").append(toIndentedString(isSeen)).append("\n"); + sb.append(" itemType: ").append(toIndentedString(itemType)).append("\n"); + sb.append(" itemTypeLabel: ").append(toIndentedString(itemTypeLabel)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" quantifiable: ").append(toIndentedString(quantifiable)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" templateCreatedAt: ").append(toIndentedString(templateCreatedAt)).append("\n"); + sb.append(" templateUpdatedAt: ").append(toIndentedString(templateUpdatedAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" userAttributes: ").append(toIndentedString(userAttributes)).append("\n"); + sb.append(" validateUserAttributes: ").append(toIndentedString(validateUserAttributes)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryItem.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 `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 (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(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(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").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(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(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(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(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(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.validateJsonElement(jsonObj.get("metadata")); + if (!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())); + } + // 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(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(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.validateJsonElement(jsonObj.get("userAttributes")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventoryItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryItem read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..42627e61 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryItemType.java @@ -0,0 +1,87 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 InventoryItemType + */ +@JsonAdapter(InventoryItemType.Adapter.class) +public enum InventoryItemType { + + BUNDLE("bundle"), + + DRONESKIN("droneskin"), + + EMOJI("emoji"), + + PORTALSKIN("portalskin"), + + PROP("prop"), + + STICKER("sticker"), + + WARPEFFECT("warpeffect"); + + private String value; + + InventoryItemType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InventoryItemType fromValue(String value) { + for (InventoryItemType b : InventoryItemType.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 InventoryItemType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InventoryItemType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..e1756f59 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryMetadata.java @@ -0,0 +1,412 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * InventoryMetadata + */ +@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) + @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(@javax.annotation.Nullable Boolean animated) { + this.animated = animated; + return this; + } + + /** + * Get animated + * @return animated + */ + @javax.annotation.Nullable + public Boolean getAnimated() { + return animated; + } + + public void setAnimated(@javax.annotation.Nullable Boolean animated) { + this.animated = animated; + } + + + public InventoryMetadata animationStyle(@javax.annotation.Nullable String animationStyle) { + this.animationStyle = animationStyle; + return this; + } + + /** + * Get animationStyle + * @return animationStyle + */ + @javax.annotation.Nullable + public String getAnimationStyle() { + return animationStyle; + } + + public void setAnimationStyle(@javax.annotation.Nullable String animationStyle) { + this.animationStyle = animationStyle; + } + + + public InventoryMetadata assetBundleId(@javax.annotation.Nullable String assetBundleId) { + this.assetBundleId = assetBundleId; + return this; + } + + /** + * Get assetBundleId + * @return assetBundleId + */ + @javax.annotation.Nullable + public String getAssetBundleId() { + return assetBundleId; + } + + public void setAssetBundleId(@javax.annotation.Nullable String assetBundleId) { + this.assetBundleId = assetBundleId; + } + + + public InventoryMetadata fileId(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + */ + @javax.annotation.Nullable + public String getFileId() { + return fileId; + } + + public void setFileId(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + } + + + public InventoryMetadata imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public InventoryMetadata inventoryItemsToInstantiate(@javax.annotation.Nullable List inventoryItemsToInstantiate) { + this.inventoryItemsToInstantiate = inventoryItemsToInstantiate; + return this; + } + + public InventoryMetadata addInventoryItemsToInstantiateItem(String inventoryItemsToInstantiateItem) { + if (this.inventoryItemsToInstantiate == null) { + this.inventoryItemsToInstantiate = new ArrayList<>(); + } + this.inventoryItemsToInstantiate.add(inventoryItemsToInstantiateItem); + return this; + } + + /** + * Only in bundles + * @return inventoryItemsToInstantiate + */ + @javax.annotation.Nullable + public List getInventoryItemsToInstantiate() { + return inventoryItemsToInstantiate; + } + + public void setInventoryItemsToInstantiate(@javax.annotation.Nullable List inventoryItemsToInstantiate) { + this.inventoryItemsToInstantiate = inventoryItemsToInstantiate; + } + + + public InventoryMetadata maskTag(@javax.annotation.Nullable String maskTag) { + this.maskTag = maskTag; + return this; + } + + /** + * Get maskTag + * @return maskTag + */ + @javax.annotation.Nullable + public String getMaskTag() { + return maskTag; + } + + public void setMaskTag(@javax.annotation.Nullable String maskTag) { + this.maskTag = maskTag; + } + + + public InventoryMetadata propId(@javax.annotation.Nullable String propId) { + this.propId = propId; + return this; + } + + /** + * Get propId + * @return propId + */ + @javax.annotation.Nullable + public String getPropId() { + return propId; + } + + public void setPropId(@javax.annotation.Nullable String propId) { + this.propId = propId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryMetadata inventoryMetadata = (InventoryMetadata) o; + return Objects.equals(this.animated, inventoryMetadata.animated) && + Objects.equals(this.animationStyle, inventoryMetadata.animationStyle) && + Objects.equals(this.assetBundleId, inventoryMetadata.assetBundleId) && + Objects.equals(this.fileId, inventoryMetadata.fileId) && + Objects.equals(this.imageUrl, inventoryMetadata.imageUrl) && + Objects.equals(this.inventoryItemsToInstantiate, inventoryMetadata.inventoryItemsToInstantiate) && + Objects.equals(this.maskTag, inventoryMetadata.maskTag) && + Objects.equals(this.propId, inventoryMetadata.propId); + } + + @Override + public int hashCode() { + return Objects.hash(animated, animationStyle, assetBundleId, fileId, imageUrl, inventoryItemsToInstantiate, maskTag, propId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryMetadata {\n"); + sb.append(" animated: ").append(toIndentedString(animated)).append("\n"); + sb.append(" animationStyle: ").append(toIndentedString(animationStyle)).append("\n"); + sb.append(" assetBundleId: ").append(toIndentedString(assetBundleId)).append("\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" inventoryItemsToInstantiate: ").append(toIndentedString(inventoryItemsToInstantiate)).append("\n"); + sb.append(" maskTag: ").append(toIndentedString(maskTag)).append("\n"); + sb.append(" propId: ").append(toIndentedString(propId)).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("animated", "animationStyle", "assetBundleId", "fileId", "imageUrl", "inventoryItemsToInstantiate", "maskTag", "propId")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryMetadata.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 `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(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(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(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(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").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(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(java.util.Locale.ROOT, "Expected the field `propId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventoryMetadata.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryMetadata' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryMetadata.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryMetadata value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryMetadata read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..56da748e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryNotificationDetails.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * InventoryNotificationDetails + */ +@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(@javax.annotation.Nonnull String body) { + this.body = body; + return this; + } + + /** + * Get body + * @return body + */ + @javax.annotation.Nonnull + public String getBody() { + return body; + } + + public void setBody(@javax.annotation.Nonnull String body) { + this.body = body; + } + + + public InventoryNotificationDetails imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public InventoryNotificationDetails 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; + } + InventoryNotificationDetails inventoryNotificationDetails = (InventoryNotificationDetails) o; + return Objects.equals(this.body, inventoryNotificationDetails.body) && + Objects.equals(this.imageUrl, inventoryNotificationDetails.imageUrl) && + Objects.equals(this.title, inventoryNotificationDetails.title); + } + + @Override + public int hashCode() { + return Objects.hash(body, imageUrl, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryNotificationDetails {\n"); + sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).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("body", "imageUrl", "title")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("body", "imageUrl", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryNotificationDetails.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 `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 (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(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(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(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 (!InventoryNotificationDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryNotificationDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryNotificationDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryNotificationDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryNotificationDetails read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..f1b812ad --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventorySpawn.java @@ -0,0 +1,234 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * InventorySpawn + */ +@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(@javax.annotation.Nonnull String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + */ + @javax.annotation.Nonnull + public String getToken() { + return token; + } + + public void setToken(@javax.annotation.Nonnull String token) { + this.token = token; + } + + + public InventorySpawn version(@javax.annotation.Nonnull Integer version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + public Integer getVersion() { + return version; + } + + public void setVersion(@javax.annotation.Nonnull Integer version) { + this.version = version; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventorySpawn inventorySpawn = (InventorySpawn) o; + return Objects.equals(this.token, inventorySpawn.token) && + Objects.equals(this.version, inventorySpawn.version); + } + + @Override + public int hashCode() { + return Objects.hash(token, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventorySpawn {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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("token", "version")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventorySpawn.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 `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 (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(java.util.Locale.ROOT, "Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventorySpawn.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventorySpawn' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventorySpawn.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventorySpawn value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventorySpawn read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..84e1748d --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryTemplate.java @@ -0,0 +1,740 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryItemType; +import io.github.vrchatapi.model.InventoryMetadata; +import io.github.vrchatapi.model.InventoryNotificationDetails; +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; +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; + +/** + * InventoryTemplate + */ +@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(@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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nonnull String authorId) { + this.authorId = authorId; + } + + + 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 + public List getCollections() { + return collections; + } + + public void setCollections(@javax.annotation.Nonnull List collections) { + this.collections = collections; + } + + + public InventoryTemplate createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public InventoryTemplate defaultAttributes(@javax.annotation.Nonnull Object defaultAttributes) { + this.defaultAttributes = defaultAttributes; + return this; + } + + /** + * Get defaultAttributes + * @return defaultAttributes + */ + @javax.annotation.Nonnull + public Object getDefaultAttributes() { + return defaultAttributes; + } + + public void setDefaultAttributes(@javax.annotation.Nonnull Object defaultAttributes) { + this.defaultAttributes = defaultAttributes; + } + + + public InventoryTemplate description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + 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 + public List getEquipSlots() { + return equipSlots; + } + + public void setEquipSlots(@javax.annotation.Nonnull List equipSlots) { + this.equipSlots = equipSlots; + } + + + 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 + public List getFlags() { + return flags; + } + + public void setFlags(@javax.annotation.Nonnull List flags) { + this.flags = flags; + } + + + public InventoryTemplate id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public InventoryTemplate imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public InventoryTemplate itemType(@javax.annotation.Nonnull InventoryItemType itemType) { + this.itemType = itemType; + return this; + } + + /** + * Get itemType + * @return itemType + */ + @javax.annotation.Nonnull + public InventoryItemType getItemType() { + return itemType; + } + + public void setItemType(@javax.annotation.Nonnull InventoryItemType itemType) { + this.itemType = itemType; + } + + + public InventoryTemplate itemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { + this.itemTypeLabel = itemTypeLabel; + return this; + } + + /** + * Get itemTypeLabel + * @return itemTypeLabel + */ + @javax.annotation.Nonnull + public String getItemTypeLabel() { + return itemTypeLabel; + } + + public void setItemTypeLabel(@javax.annotation.Nonnull String itemTypeLabel) { + this.itemTypeLabel = itemTypeLabel; + } + + + public InventoryTemplate metadata(@javax.annotation.Nullable InventoryMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + */ + @javax.annotation.Nullable + public InventoryMetadata getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable InventoryMetadata metadata) { + this.metadata = metadata; + } + + + public InventoryTemplate name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public InventoryTemplate notificationDetails(@javax.annotation.Nullable InventoryNotificationDetails notificationDetails) { + this.notificationDetails = notificationDetails; + return this; + } + + /** + * Get notificationDetails + * @return notificationDetails + */ + @javax.annotation.Nullable + public InventoryNotificationDetails getNotificationDetails() { + return notificationDetails; + } + + public void setNotificationDetails(@javax.annotation.Nullable InventoryNotificationDetails notificationDetails) { + this.notificationDetails = notificationDetails; + } + + + public InventoryTemplate status(@javax.annotation.Nonnull String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public InventoryTemplate updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public InventoryTemplate validateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { + this.validateUserAttributes = validateUserAttributes; + return this; + } + + /** + * Get validateUserAttributes + * @return validateUserAttributes + */ + @javax.annotation.Nonnull + public Boolean getValidateUserAttributes() { + return validateUserAttributes; + } + + public void setValidateUserAttributes(@javax.annotation.Nonnull Boolean validateUserAttributes) { + this.validateUserAttributes = validateUserAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryTemplate inventoryTemplate = (InventoryTemplate) o; + return Objects.equals(this.authorId, inventoryTemplate.authorId) && + Objects.equals(this.collections, inventoryTemplate.collections) && + Objects.equals(this.createdAt, inventoryTemplate.createdAt) && + Objects.equals(this.defaultAttributes, inventoryTemplate.defaultAttributes) && + Objects.equals(this.description, inventoryTemplate.description) && + Objects.equals(this.equipSlots, inventoryTemplate.equipSlots) && + Objects.equals(this.flags, inventoryTemplate.flags) && + Objects.equals(this.id, inventoryTemplate.id) && + Objects.equals(this.imageUrl, inventoryTemplate.imageUrl) && + Objects.equals(this.itemType, inventoryTemplate.itemType) && + Objects.equals(this.itemTypeLabel, inventoryTemplate.itemTypeLabel) && + Objects.equals(this.metadata, inventoryTemplate.metadata) && + Objects.equals(this.name, inventoryTemplate.name) && + Objects.equals(this.notificationDetails, inventoryTemplate.notificationDetails) && + Objects.equals(this.status, inventoryTemplate.status) && + Objects.equals(this.tags, inventoryTemplate.tags) && + Objects.equals(this.updatedAt, inventoryTemplate.updatedAt) && + Objects.equals(this.validateUserAttributes, inventoryTemplate.validateUserAttributes); + } + + @Override + public int hashCode() { + return Objects.hash(authorId, collections, createdAt, defaultAttributes, description, equipSlots, flags, id, imageUrl, itemType, itemTypeLabel, metadata, name, notificationDetails, status, tags, updatedAt, validateUserAttributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryTemplate {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" collections: ").append(toIndentedString(collections)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" defaultAttributes: ").append(toIndentedString(defaultAttributes)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" equipSlots: ").append(toIndentedString(equipSlots)).append("\n"); + sb.append(" flags: ").append(toIndentedString(flags)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" itemType: ").append(toIndentedString(itemType)).append("\n"); + sb.append(" itemTypeLabel: ").append(toIndentedString(itemTypeLabel)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" notificationDetails: ").append(toIndentedString(notificationDetails)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" validateUserAttributes: ").append(toIndentedString(validateUserAttributes)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryTemplate.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 `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 (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(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(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(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(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(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(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(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(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.validateJsonElement(jsonObj.get("metadata")); + } + if (!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())); + } + // validate the optional field `notificationDetails` + if (jsonObj.get("notificationDetails") != null && !jsonObj.get("notificationDetails").isJsonNull()) { + InventoryNotificationDetails.validateJsonElement(jsonObj.get("notificationDetails")); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + 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(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventoryTemplate.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryTemplate' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryTemplate.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryTemplate value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryTemplate read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..78b6fe62 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InventoryUserAttributes.java @@ -0,0 +1,259 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * InventoryUserAttributes + */ +@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(@javax.annotation.Nullable String primaryColor) { + this.primaryColor = primaryColor; + return this; + } + + /** + * Get primaryColor + * @return primaryColor + */ + @javax.annotation.Nullable + public String getPrimaryColor() { + return primaryColor; + } + + public void setPrimaryColor(@javax.annotation.Nullable String primaryColor) { + this.primaryColor = primaryColor; + } + + + public InventoryUserAttributes secondaryColor(@javax.annotation.Nullable String secondaryColor) { + this.secondaryColor = secondaryColor; + return this; + } + + /** + * Get secondaryColor + * @return secondaryColor + */ + @javax.annotation.Nullable + public String getSecondaryColor() { + return secondaryColor; + } + + public void setSecondaryColor(@javax.annotation.Nullable String secondaryColor) { + this.secondaryColor = secondaryColor; + } + + + public InventoryUserAttributes trailColor(@javax.annotation.Nullable String trailColor) { + this.trailColor = trailColor; + return this; + } + + /** + * Get trailColor + * @return trailColor + */ + @javax.annotation.Nullable + public String getTrailColor() { + return trailColor; + } + + public void setTrailColor(@javax.annotation.Nullable String trailColor) { + this.trailColor = trailColor; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryUserAttributes inventoryUserAttributes = (InventoryUserAttributes) o; + return Objects.equals(this.primaryColor, inventoryUserAttributes.primaryColor) && + Objects.equals(this.secondaryColor, inventoryUserAttributes.secondaryColor) && + Objects.equals(this.trailColor, inventoryUserAttributes.trailColor); + } + + @Override + public int hashCode() { + return Objects.hash(primaryColor, secondaryColor, trailColor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryUserAttributes {\n"); + sb.append(" primaryColor: ").append(toIndentedString(primaryColor)).append("\n"); + sb.append(" secondaryColor: ").append(toIndentedString(secondaryColor)).append("\n"); + sb.append(" trailColor: ").append(toIndentedString(trailColor)).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("primaryColor", "secondaryColor", "trailColor")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InventoryUserAttributes.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 `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(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(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(java.util.Locale.ROOT, "Expected the field `trailColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trailColor").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InventoryUserAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InventoryUserAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InventoryUserAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InventoryUserAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InventoryUserAttributes read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 11380e31..9b6bf22e 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteMessage.java +++ b/src/main/java/io/github/vrchatapi/model/InviteMessage.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,216 +13,219 @@ package io.github.vrchatapi.model; import 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 org.threeten.bp.OffsetDateTime; +import java.time.OffsetDateTime; +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; /** - * InviteMessage + * */ -@javax.annotation.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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -266,11 +269,106 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("canBeUpdated", "id", "message", "messageType", "remainingCooldownMinutes", "slot", "updatedAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("canBeUpdated", "id", "message", "messageType", "remainingCooldownMinutes", "slot", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InviteMessage.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 `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 (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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteMessage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteMessage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteMessage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteMessage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InviteMessage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 38fcf11b..a1f69c2e 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteMessageType.java +++ b/src/main/java/io/github/vrchatapi/model/InviteMessageType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,28 +13,28 @@ 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; /** - * Gets or Sets InviteMessageType + * */ @JsonAdapter(InviteMessageType.Adapter.class) public enum InviteMessageType { MESSAGE("message"), - RESPONSE("response"), - REQUEST("request"), - REQUESTRESPONSE("requestResponse"); + REQUEST_RESPONSE("requestResponse"), + + RESPONSE("response"); private String value; @@ -72,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 0e00512b..e2167501 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/InviteRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,78 +13,96 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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 = "wrld_ba913a96-fac4-4048-a062-9aa5db092812: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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -118,11 +136,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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", "messageSlot")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InviteRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `instanceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instanceId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InviteRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 2d6b1c13..f48214f9 100644 --- a/src/main/java/io/github/vrchatapi/model/InviteResponse.java +++ b/src/main/java/io/github/vrchatapi/model/InviteResponse.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,51 +13,72 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -89,11 +110,98 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("responseSlot")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("responseSlot")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InviteResponse.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InviteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..c8997d8d --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/InviteUserWithPhotoRequest.java @@ -0,0 +1,235 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InviteRequest; +import java.io.File; +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; + +/** + * InviteUserWithPhotoRequest + */ +@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(@javax.annotation.Nonnull InviteRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public InviteRequest getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull InviteRequest data) { + this.data = data; + } + + + 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 + public File getImage() { + return image; + } + + public void setImage(@javax.annotation.Nonnull File image) { + this.image = image; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InviteUserWithPhotoRequest inviteUserWithPhotoRequest = (InviteUserWithPhotoRequest) o; + return Objects.equals(this.data, inviteUserWithPhotoRequest.data) && + Objects.equals(this.image, inviteUserWithPhotoRequest.image); + } + + @Override + public int hashCode() { + return Objects.hash(data, image); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InviteUserWithPhotoRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" image: ").append(toIndentedString(image)).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("data", "image")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!InviteUserWithPhotoRequest.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 `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 (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.validateJsonElement(jsonObj.get("data")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteUserWithPhotoRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteUserWithPhotoRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteUserWithPhotoRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteUserWithPhotoRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InviteUserWithPhotoRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..64287d9a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Jam.java @@ -0,0 +1,458 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.JamStateChangeDates; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * + */ +@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(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public Jam id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Jam isVisible(@javax.annotation.Nonnull Boolean isVisible) { + this.isVisible = isVisible; + return this; + } + + /** + * Get isVisible + * @return isVisible + */ + @javax.annotation.Nonnull + public Boolean getIsVisible() { + return isVisible; + } + + public void setIsVisible(@javax.annotation.Nonnull Boolean isVisible) { + this.isVisible = isVisible; + } + + + public Jam moreInfo(@javax.annotation.Nonnull String moreInfo) { + this.moreInfo = moreInfo; + return this; + } + + /** + * Get moreInfo + * @return moreInfo + */ + @javax.annotation.Nonnull + public String getMoreInfo() { + return moreInfo; + } + + public void setMoreInfo(@javax.annotation.Nonnull String moreInfo) { + this.moreInfo = moreInfo; + } + + + public Jam state(@javax.annotation.Nonnull String state) { + this.state = state; + return this; + } + + /** + * One of: - submissions_open - closed + * @return state + */ + @javax.annotation.Nonnull + public String getState() { + return state; + } + + public void setState(@javax.annotation.Nonnull String state) { + this.state = state; + } + + + public Jam stateChangeDates(@javax.annotation.Nonnull JamStateChangeDates stateChangeDates) { + this.stateChangeDates = stateChangeDates; + return this; + } + + /** + * Get stateChangeDates + * @return stateChangeDates + */ + @javax.annotation.Nonnull + public JamStateChangeDates getStateChangeDates() { + return stateChangeDates; + } + + public void setStateChangeDates(@javax.annotation.Nonnull JamStateChangeDates stateChangeDates) { + this.stateChangeDates = stateChangeDates; + } + + + public Jam submissionContentGateDate(@javax.annotation.Nullable OffsetDateTime submissionContentGateDate) { + this.submissionContentGateDate = submissionContentGateDate; + return this; + } + + /** + * Get submissionContentGateDate + * @return submissionContentGateDate + */ + @javax.annotation.Nullable + public OffsetDateTime getSubmissionContentGateDate() { + return submissionContentGateDate; + } + + public void setSubmissionContentGateDate(@javax.annotation.Nullable OffsetDateTime submissionContentGateDate) { + this.submissionContentGateDate = submissionContentGateDate; + } + + + public Jam submissionContentGated(@javax.annotation.Nonnull Boolean submissionContentGated) { + this.submissionContentGated = submissionContentGated; + return this; + } + + /** + * Get submissionContentGated + * @return submissionContentGated + */ + @javax.annotation.Nonnull + public Boolean getSubmissionContentGated() { + return submissionContentGated; + } + + public void setSubmissionContentGated(@javax.annotation.Nonnull Boolean submissionContentGated) { + this.submissionContentGated = submissionContentGated; + } + + + public Jam 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; + } + + + public Jam updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Jam jam = (Jam) o; + return Objects.equals(this.description, jam.description) && + Objects.equals(this.id, jam.id) && + Objects.equals(this.isVisible, jam.isVisible) && + Objects.equals(this.moreInfo, jam.moreInfo) && + Objects.equals(this.state, jam.state) && + Objects.equals(this.stateChangeDates, jam.stateChangeDates) && + Objects.equals(this.submissionContentGateDate, jam.submissionContentGateDate) && + Objects.equals(this.submissionContentGated, jam.submissionContentGated) && + Objects.equals(this.title, jam.title) && + Objects.equals(this.updatedAt, jam.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(description, id, isVisible, moreInfo, state, stateChangeDates, submissionContentGateDate, submissionContentGated, title, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Jam {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isVisible: ").append(toIndentedString(isVisible)).append("\n"); + sb.append(" moreInfo: ").append(toIndentedString(moreInfo)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" stateChangeDates: ").append(toIndentedString(stateChangeDates)).append("\n"); + sb.append(" submissionContentGateDate: ").append(toIndentedString(submissionContentGateDate)).append("\n"); + sb.append(" submissionContentGated: ").append(toIndentedString(submissionContentGated)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("description", "id", "isVisible", "moreInfo", "state", "stateChangeDates", "submissionContentGateDate", "submissionContentGated", "title", "updated_at")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Jam.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 `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 (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(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(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(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(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.validateJsonElement(jsonObj.get("stateChangeDates")); + 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 (!Jam.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Jam' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Jam.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Jam value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Jam read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..2ab073c6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/JamStateChangeDates.java @@ -0,0 +1,289 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * JamStateChangeDates + */ +@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(@javax.annotation.Nullable OffsetDateTime closed) { + this.closed = closed; + return this; + } + + /** + * Get closed + * @return closed + */ + @javax.annotation.Nullable + public OffsetDateTime getClosed() { + return closed; + } + + public void setClosed(@javax.annotation.Nullable OffsetDateTime closed) { + this.closed = closed; + } + + + public JamStateChangeDates submissionsClosed(@javax.annotation.Nullable OffsetDateTime submissionsClosed) { + this.submissionsClosed = submissionsClosed; + return this; + } + + /** + * Get submissionsClosed + * @return submissionsClosed + */ + @javax.annotation.Nullable + public OffsetDateTime getSubmissionsClosed() { + return submissionsClosed; + } + + public void setSubmissionsClosed(@javax.annotation.Nullable OffsetDateTime submissionsClosed) { + this.submissionsClosed = submissionsClosed; + } + + + public JamStateChangeDates submissionsOpened(@javax.annotation.Nullable OffsetDateTime submissionsOpened) { + this.submissionsOpened = submissionsOpened; + return this; + } + + /** + * Get submissionsOpened + * @return submissionsOpened + */ + @javax.annotation.Nullable + public OffsetDateTime getSubmissionsOpened() { + return submissionsOpened; + } + + public void setSubmissionsOpened(@javax.annotation.Nullable OffsetDateTime submissionsOpened) { + this.submissionsOpened = submissionsOpened; + } + + + public JamStateChangeDates winnersSelected(@javax.annotation.Nullable OffsetDateTime winnersSelected) { + this.winnersSelected = winnersSelected; + return this; + } + + /** + * Get winnersSelected + * @return winnersSelected + */ + @javax.annotation.Nullable + public OffsetDateTime getWinnersSelected() { + return winnersSelected; + } + + public void setWinnersSelected(@javax.annotation.Nullable OffsetDateTime winnersSelected) { + this.winnersSelected = winnersSelected; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JamStateChangeDates jamStateChangeDates = (JamStateChangeDates) o; + return Objects.equals(this.closed, jamStateChangeDates.closed) && + Objects.equals(this.submissionsClosed, jamStateChangeDates.submissionsClosed) && + Objects.equals(this.submissionsOpened, jamStateChangeDates.submissionsOpened) && + Objects.equals(this.winnersSelected, jamStateChangeDates.winnersSelected); + } + + 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(closed, submissionsClosed, submissionsOpened, winnersSelected); + } + + 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 JamStateChangeDates {\n"); + sb.append(" closed: ").append(toIndentedString(closed)).append("\n"); + sb.append(" submissionsClosed: ").append(toIndentedString(submissionsClosed)).append("\n"); + sb.append(" submissionsOpened: ").append(toIndentedString(submissionsOpened)).append("\n"); + sb.append(" winnersSelected: ").append(toIndentedString(winnersSelected)).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("closed", "submissionsClosed", "submissionsOpened", "winnersSelected")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JamStateChangeDates.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 `JamStateChangeDates` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JamStateChangeDates.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JamStateChangeDates' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JamStateChangeDates.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JamStateChangeDates value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JamStateChangeDates read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..73f79dd8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/JamSubmission.java @@ -0,0 +1,378 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * + */ +@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(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + return this; + } + + /** + * Either world ID or avatar ID + * @return contentId + */ + @javax.annotation.Nonnull + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + public JamSubmission createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public JamSubmission description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public JamSubmission id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public JamSubmission jamId(@javax.annotation.Nonnull String jamId) { + this.jamId = jamId; + return this; + } + + /** + * Get jamId + * @return jamId + */ + @javax.annotation.Nonnull + public String getJamId() { + return jamId; + } + + public void setJamId(@javax.annotation.Nonnull String jamId) { + this.jamId = jamId; + } + + + public JamSubmission ratingScore(@javax.annotation.Nullable Integer ratingScore) { + this.ratingScore = ratingScore; + return this; + } + + /** + * Get ratingScore + * minimum: 0 + * @return ratingScore + */ + @javax.annotation.Nullable + public Integer getRatingScore() { + return ratingScore; + } + + public void setRatingScore(@javax.annotation.Nullable Integer ratingScore) { + this.ratingScore = ratingScore; + } + + + 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 + public String getSubmitterId() { + return submitterId; + } + + public void setSubmitterId(@javax.annotation.Nonnull String submitterId) { + this.submitterId = submitterId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JamSubmission jamSubmission = (JamSubmission) o; + return Objects.equals(this.contentId, jamSubmission.contentId) && + Objects.equals(this.createdAt, jamSubmission.createdAt) && + Objects.equals(this.description, jamSubmission.description) && + Objects.equals(this.id, jamSubmission.id) && + Objects.equals(this.jamId, jamSubmission.jamId) && + Objects.equals(this.ratingScore, jamSubmission.ratingScore) && + Objects.equals(this.submitterId, jamSubmission.submitterId); + } + + @Override + public int hashCode() { + return Objects.hash(contentId, createdAt, description, id, jamId, ratingScore, submitterId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JamSubmission {\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" jamId: ").append(toIndentedString(jamId)).append("\n"); + sb.append(" ratingScore: ").append(toIndentedString(ratingScore)).append("\n"); + sb.append(" submitterId: ").append(toIndentedString(submitterId)).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("contentId", "created_at", "description", "id", "jamId", "ratingScore", "submitterId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("contentId", "created_at", "description", "id", "jamId", "submitterId")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JamSubmission.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `submitterId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("submitterId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JamSubmission.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JamSubmission' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JamSubmission.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JamSubmission value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JamSubmission read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..8d75ec75 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/JoinGroupRequest.java @@ -0,0 +1,201 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * JoinGroupRequest + */ +@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(@javax.annotation.Nullable String inviteId) { + this.inviteId = inviteId; + return this; + } + + /** + * Get inviteId + * @return inviteId + */ + @javax.annotation.Nullable + public String getInviteId() { + return inviteId; + } + + public void setInviteId(@javax.annotation.Nullable String inviteId) { + this.inviteId = inviteId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JoinGroupRequest joinGroupRequest = (JoinGroupRequest) o; + return Objects.equals(this.inviteId, joinGroupRequest.inviteId); + } + + @Override + public int hashCode() { + return Objects.hash(inviteId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JoinGroupRequest {\n"); + sb.append(" inviteId: ").append(toIndentedString(inviteId)).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("inviteId")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JoinGroupRequest.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 `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(java.util.Locale.ROOT, "Expected the field `inviteId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inviteId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JoinGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JoinGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JoinGroupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JoinGroupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JoinGroupRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 933abf21..a54a9477 100644 --- a/src/main/java/io/github/vrchatapi/model/License.java +++ b/src/main/java/io/github/vrchatapi/model/License.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,124 +20,137 @@ 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; +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; + /** * 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_TYPE = "forType"; - @SerializedName(SERIALIZED_NAME_FOR_TYPE) - private LicenseType forType = LicenseType.PERMISSION; - 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_ACTION = "forAction"; - @SerializedName(SERIALIZED_NAME_FOR_ACTION) - private LicenseAction forAction = LicenseAction.HAVE; + 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 forId(String forId) { - - this.forId = forId; + public License forAction(@javax.annotation.Nonnull LicenseAction forAction) { + this.forAction = forAction; return this; } - /** - * Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. - * @return forId - **/ + /** + * Get forAction + * @return forAction + */ @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 LicenseAction getForAction() { + return forAction; } - - public void setForId(String forId) { - this.forId = forId; + public void setForAction(@javax.annotation.Nonnull LicenseAction forAction) { + this.forAction = forAction; } - public License forType(LicenseType forType) { - - this.forType = forType; + public License forId(@javax.annotation.Nonnull String forId) { + this.forId = forId; return this; } - /** - * Get forType - * @return forType - **/ + /** + * Either a AvatarID, LicenseGroupID, PermissionID or ProductID. This depends on the `forType` field. + * @return forId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public LicenseType getForType() { - return forType; + public String getForId() { + return forId; } - - public void setForType(LicenseType forType) { - this.forType = forType; + 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 forAction(LicenseAction forAction) { - - this.forAction = forAction; + public License forType(@javax.annotation.Nonnull LicenseType forType) { + this.forType = forType; return this; } - /** - * Get forAction - * @return forAction - **/ + /** + * Get forType + * @return forType + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public LicenseAction getForAction() { - return forAction; + public LicenseType getForType() { + return forType; } - - public void setForAction(LicenseAction forAction) { - this.forAction = forAction; + public void setForType(@javax.annotation.Nonnull LicenseType forType) { + this.forType = forType; } + @Override public boolean equals(Object o) { if (this == o) { @@ -148,25 +160,25 @@ public boolean equals(Object o) { return false; } License license = (License) o; - return Objects.equals(this.forId, license.forId) && - Objects.equals(this.forType, license.forType) && + return Objects.equals(this.forAction, license.forAction) && + Objects.equals(this.forId, license.forId) && Objects.equals(this.forName, license.forName) && - Objects.equals(this.forAction, license.forAction); + Objects.equals(this.forType, license.forType); } @Override public int hashCode() { - return Objects.hash(forId, forType, forName, forAction); + return Objects.hash(forAction, forId, forName, forType); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class License {\n"); + sb.append(" forAction: ").append(toIndentedString(forAction)).append("\n"); sb.append(" forId: ").append(toIndentedString(forId)).append("\n"); - sb.append(" forType: ").append(toIndentedString(forType)).append("\n"); sb.append(" forName: ").append(toIndentedString(forName)).append("\n"); - sb.append(" forAction: ").append(toIndentedString(forAction)).append("\n"); + sb.append(" forType: ").append(toIndentedString(forType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,11 +188,108 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("forAction", "forId", "forName", "forType")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("forAction", "forId", "forName", "forType")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!License.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 `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 (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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!License.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'License' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(License.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, License value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public License read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 82948a22..71e312b1 100644 --- a/src/main/java/io/github/vrchatapi/model/LicenseAction.java +++ b/src/main/java/io/github/vrchatapi/model/LicenseAction.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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(LicenseAction.Adapter.class) public enum LicenseAction { - WEAR("wear"), + HAVE("have"), - HAVE("have"); + WEAR("wear"); private String value; @@ -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 b4a0163c..fd6c4a9b 100644 --- a/src/main/java/io/github/vrchatapi/model/LicenseGroup.java +++ b/src/main/java/io/github/vrchatapi/model/LicenseGroup.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,138 +13,153 @@ package io.github.vrchatapi.model; import 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; +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; + /** - * LicenseGroup + * */ -@javax.annotation.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_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - 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) - private List licenses = new ArrayList(); - - - public LicenseGroup id(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; - } + private List licenses = new ArrayList<>(); + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; - public void setId(String id) { - this.id = id; + public LicenseGroup() { } - - public LicenseGroup name(String name) { - - this.name = name; + public LicenseGroup description(@javax.annotation.Nonnull String description) { + this.description = description; return this; } - /** - * Get name - * @return name - **/ + /** + * Get description + * @return description + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getName() { - return name; + public String getDescription() { + return description; } - - public void setName(String name) { - this.name = name; + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; } - public LicenseGroup description(String description) { - - this.description = description; + public LicenseGroup id(@javax.annotation.Nonnull String id) { + this.id = id; return this; } - /** - * Get description - * @return description - **/ + /** + * Get id + * @return id + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getDescription() { - return description; + public String getId() { + return id; } - - public void setDescription(String description) { - this.description = description; + 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(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -154,25 +169,25 @@ public boolean equals(Object o) { return false; } LicenseGroup licenseGroup = (LicenseGroup) o; - return Objects.equals(this.id, licenseGroup.id) && - Objects.equals(this.name, licenseGroup.name) && - Objects.equals(this.description, licenseGroup.description) && - Objects.equals(this.licenses, licenseGroup.licenses); + return Objects.equals(this.description, licenseGroup.description) && + Objects.equals(this.id, licenseGroup.id) && + Objects.equals(this.licenses, licenseGroup.licenses) && + Objects.equals(this.name, licenseGroup.name); } @Override public int hashCode() { - return Objects.hash(id, name, description, licenses); + return Objects.hash(description, id, licenses, name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LicenseGroup {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" licenses: ").append(toIndentedString(licenses)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); } @@ -182,11 +197,117 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("description", "id", "licenses", "name")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("description", "id", "licenses", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LicenseGroup.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 `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 (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(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(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("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)); + } + } + if (!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 (!LicenseGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LicenseGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LicenseGroup.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LicenseGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LicenseGroup read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 31e62341..10fa9942 100644 --- a/src/main/java/io/github/vrchatapi/model/LicenseType.java +++ b/src/main/java/io/github/vrchatapi/model/LicenseType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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 new file mode 100644 index 00000000..52cb8b5b --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/LimitedGroup.java @@ -0,0 +1,702 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupGallery; +import io.github.vrchatapi.model.GroupMemberStatus; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * LimitedGroup + */ +@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) + @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) + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public LimitedGroup() { + } + + public LimitedGroup bannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + return this; + } + + /** + * Get bannerId + * @return bannerId + */ + @javax.annotation.Nullable + public String getBannerId() { + return bannerId; + } + + public void setBannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + } + + + public LimitedGroup 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 LimitedGroup createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public LimitedGroup description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public LimitedGroup discriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + return this; + } + + /** + * Get discriminator + * @return discriminator + */ + @javax.annotation.Nullable + public String getDiscriminator() { + return discriminator; + } + + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + } + + + public LimitedGroup galleries(@javax.annotation.Nullable List galleries) { + this.galleries = galleries; + return this; + } + + public LimitedGroup addGalleriesItem(GroupGallery galleriesItem) { + if (this.galleries == null) { + this.galleries = new ArrayList<>(); + } + this.galleries.add(galleriesItem); + return this; + } + + /** + * + * @return galleries + */ + @javax.annotation.Nullable + public List getGalleries() { + return galleries; + } + + public void setGalleries(@javax.annotation.Nullable List galleries) { + this.galleries = galleries; + } + + + public LimitedGroup iconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + return this; + } + + /** + * Get iconId + * @return iconId + */ + @javax.annotation.Nullable + public String getIconId() { + return iconId; + } + + public void setIconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + } + + + public LimitedGroup 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 LimitedGroup 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 LimitedGroup isSearchable(@javax.annotation.Nullable Boolean isSearchable) { + this.isSearchable = isSearchable; + return this; + } + + /** + * Get isSearchable + * @return isSearchable + */ + @javax.annotation.Nullable + public Boolean getIsSearchable() { + return isSearchable; + } + + public void setIsSearchable(@javax.annotation.Nullable Boolean isSearchable) { + this.isSearchable = isSearchable; + } + + + public LimitedGroup memberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + return this; + } + + /** + * Get memberCount + * @return memberCount + */ + @javax.annotation.Nullable + public Integer getMemberCount() { + return memberCount; + } + + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + } + + + public LimitedGroup membershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { + this.membershipStatus = membershipStatus; + return this; + } + + /** + * Get membershipStatus + * @return membershipStatus + */ + @javax.annotation.Nullable + public GroupMemberStatus getMembershipStatus() { + return membershipStatus; + } + + public void setMembershipStatus(@javax.annotation.Nullable GroupMemberStatus membershipStatus) { + this.membershipStatus = membershipStatus; + } + + + public LimitedGroup name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public 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 + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public LimitedGroup rules(@javax.annotation.Nullable String rules) { + this.rules = rules; + return this; + } + + /** + * Get rules + * @return rules + */ + @javax.annotation.Nullable + public String getRules() { + return rules; + } + + public void setRules(@javax.annotation.Nullable String rules) { + this.rules = rules; + } + + + public LimitedGroup shortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + return this; + } + + /** + * Get shortCode + * @return shortCode + */ + @javax.annotation.Nullable + public String getShortCode() { + return shortCode; + } + + public void setShortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + } + + + public LimitedGroup tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public LimitedGroup addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitedGroup limitedGroup = (LimitedGroup) o; + return Objects.equals(this.bannerId, limitedGroup.bannerId) && + Objects.equals(this.bannerUrl, limitedGroup.bannerUrl) && + Objects.equals(this.createdAt, limitedGroup.createdAt) && + Objects.equals(this.description, limitedGroup.description) && + Objects.equals(this.discriminator, limitedGroup.discriminator) && + Objects.equals(this.galleries, limitedGroup.galleries) && + Objects.equals(this.iconId, limitedGroup.iconId) && + Objects.equals(this.iconUrl, limitedGroup.iconUrl) && + Objects.equals(this.id, limitedGroup.id) && + Objects.equals(this.isSearchable, limitedGroup.isSearchable) && + Objects.equals(this.memberCount, limitedGroup.memberCount) && + Objects.equals(this.membershipStatus, limitedGroup.membershipStatus) && + Objects.equals(this.name, limitedGroup.name) && + Objects.equals(this.ownerId, limitedGroup.ownerId) && + Objects.equals(this.rules, limitedGroup.rules) && + Objects.equals(this.shortCode, limitedGroup.shortCode) && + Objects.equals(this.tags, limitedGroup.tags); + } + + 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(bannerId, bannerUrl, createdAt, description, discriminator, galleries, iconId, iconUrl, id, isSearchable, memberCount, membershipStatus, name, ownerId, rules, shortCode, tags); + } + + 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 LimitedGroup {\n"); + sb.append(" bannerId: ").append(toIndentedString(bannerId)).append("\n"); + sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" discriminator: ").append(toIndentedString(discriminator)).append("\n"); + sb.append(" galleries: ").append(toIndentedString(galleries)).append("\n"); + sb.append(" iconId: ").append(toIndentedString(iconId)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isSearchable: ").append(toIndentedString(isSearchable)).append("\n"); + sb.append(" memberCount: ").append(toIndentedString(memberCount)).append("\n"); + sb.append(" membershipStatus: ").append(toIndentedString(membershipStatus)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" shortCode: ").append(toIndentedString(shortCode)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LimitedGroup.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 `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(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(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(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(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(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.validateJsonElement(jsonArraygalleries.get(i)); + }; + } + } + if ((jsonObj.get("iconId") != null && !jsonObj.get("iconId").isJsonNull()) && !jsonObj.get("iconId").isJsonPrimitive()) { + 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(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())); + } + // 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(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(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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LimitedGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LimitedGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LimitedGroup.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LimitedGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LimitedGroup read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 62f1066d..897215e3 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedUnityPackage.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedUnityPackage.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,76 +13,119 @@ package io.github.vrchatapi.model; import 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; +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; + /** - * LimitedUnityPackage + * */ -@javax.annotation.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(@javax.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. + /** + * 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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 = "2018.4.14f1", required = true, value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { this.unityVersion = unityVersion; } + @Override public boolean equals(Object o) { if (this == o) { @@ -92,19 +135,21 @@ public boolean equals(Object o) { return false; } LimitedUnityPackage limitedUnityPackage = (LimitedUnityPackage) o; - return Objects.equals(this.platform, limitedUnityPackage.platform) && + return Objects.equals(this.createdAt, limitedUnityPackage.createdAt) && + Objects.equals(this.platform, limitedUnityPackage.platform) && Objects.equals(this.unityVersion, limitedUnityPackage.unityVersion); } @Override public int hashCode() { - return Objects.hash(platform, unityVersion); + return Objects.hash(createdAt, platform, unityVersion); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LimitedUnityPackage {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); sb.append("}"); @@ -116,11 +161,104 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("created_at", "platform", "unityVersion")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("created_at", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LimitedUnityPackage.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LimitedUnityPackage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LimitedUnityPackage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LimitedUnityPackage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LimitedUnityPackage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LimitedUnityPackage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } diff --git a/src/main/java/io/github/vrchatapi/model/LimitedUser.java b/src/main/java/io/github/vrchatapi/model/LimitedUser.java deleted file mode 100644 index cb1c26e7..00000000 --- a/src/main/java/io/github/vrchatapi/model/LimitedUser.java +++ /dev/null @@ -1,570 +0,0 @@ -/* - * VRChat API Documentation - * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org - * - * 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.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.List; - -/** - * LimitedUser - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LimitedUser { - public static final String SERIALIZED_NAME_BIO = "bio"; - @SerializedName(SERIALIZED_NAME_BIO) - private String bio; - - public static final String SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL = "currentAvatarImageUrl"; - @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_IMAGE_URL) - private String currentAvatarImageUrl; - - public static final String SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL = "currentAvatarThumbnailImageUrl"; - @SerializedName(SERIALIZED_NAME_CURRENT_AVATAR_THUMBNAIL_IMAGE_URL) - private String currentAvatarThumbnailImageUrl; - - public static final String SERIALIZED_NAME_DEVELOPER_TYPE = "developerType"; - @SerializedName(SERIALIZED_NAME_DEVELOPER_TYPE) - private DeveloperType developerType = DeveloperType.NONE; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - public static final String SERIALIZED_NAME_FALLBACK_AVATAR = "fallbackAvatar"; - @SerializedName(SERIALIZED_NAME_FALLBACK_AVATAR) - private String fallbackAvatar; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_IS_FRIEND = "isFriend"; - @SerializedName(SERIALIZED_NAME_IS_FRIEND) - private Boolean isFriend; - - public static final String SERIALIZED_NAME_LAST_PLATFORM = "last_platform"; - @SerializedName(SERIALIZED_NAME_LAST_PLATFORM) - private String lastPlatform; - - public static final String SERIALIZED_NAME_PROFILE_PIC_OVERRIDE = "profilePicOverride"; - @SerializedName(SERIALIZED_NAME_PROFILE_PIC_OVERRIDE) - private String profilePicOverride; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private UserStatus status = UserStatus.OFFLINE; - - public static final String SERIALIZED_NAME_STATUS_DESCRIPTION = "statusDescription"; - @SerializedName(SERIALIZED_NAME_STATUS_DESCRIPTION) - private String statusDescription; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = new ArrayList(); - - public static final String SERIALIZED_NAME_USER_ICON = "userIcon"; - @SerializedName(SERIALIZED_NAME_USER_ICON) - private String userIcon; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - @SerializedName(SERIALIZED_NAME_USERNAME) - private String username; - - public static final String SERIALIZED_NAME_LOCATION = "location"; - @SerializedName(SERIALIZED_NAME_LOCATION) - private String location; - - public static final String SERIALIZED_NAME_FRIEND_KEY = "friendKey"; - @SerializedName(SERIALIZED_NAME_FRIEND_KEY) - private String friendKey; - - - public LimitedUser bio(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) { - this.bio = bio; - } - - - public LimitedUser currentAvatarImageUrl(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) { - this.currentAvatarImageUrl = currentAvatarImageUrl; - } - - - public LimitedUser currentAvatarThumbnailImageUrl(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) { - this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; - } - - - public LimitedUser developerType(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) { - this.developerType = developerType; - } - - - public LimitedUser displayName(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) { - this.displayName = displayName; - } - - - public LimitedUser fallbackAvatar(String fallbackAvatar) { - - this.fallbackAvatar = fallbackAvatar; - return this; - } - - /** - * Get fallbackAvatar - * @return fallbackAvatar - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "avtr_912d66a4-4714-43b8-8407-7de2cafbf55b", required = true, value = "") - - public String getFallbackAvatar() { - return fallbackAvatar; - } - - - public void setFallbackAvatar(String fallbackAvatar) { - this.fallbackAvatar = fallbackAvatar; - } - - - public LimitedUser id(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) { - this.id = id; - } - - - public LimitedUser isFriend(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) { - this.isFriend = isFriend; - } - - - public LimitedUser lastPlatform(String lastPlatform) { - - this.lastPlatform = lastPlatform; - return this; - } - - /** - * This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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) { - this.lastPlatform = lastPlatform; - } - - - public LimitedUser profilePicOverride(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) { - this.profilePicOverride = profilePicOverride; - } - - - public LimitedUser status(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) { - this.status = status; - } - - - public LimitedUser statusDescription(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) { - this.statusDescription = statusDescription; - } - - - public LimitedUser tags(List tags) { - - this.tags = tags; - return this; - } - - public LimitedUser addTagsItem(String tagsItem) { - 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) { - this.tags = tags; - } - - - public LimitedUser userIcon(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) { - this.userIcon = userIcon; - } - - - public LimitedUser username(String username) { - - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getUsername() { - return username; - } - - - public void setUsername(String username) { - this.username = username; - } - - - public LimitedUser location(String location) { - - this.location = location; - return this; - } - - /** - * Get location - * @return location - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getLocation() { - return location; - } - - - public void setLocation(String location) { - this.location = location; - } - - - public LimitedUser friendKey(String friendKey) { - - this.friendKey = friendKey; - return this; - } - - /** - * Get friendKey - * @return friendKey - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getFriendKey() { - return friendKey; - } - - - public void setFriendKey(String friendKey) { - this.friendKey = friendKey; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LimitedUser limitedUser = (LimitedUser) o; - return Objects.equals(this.bio, limitedUser.bio) && - Objects.equals(this.currentAvatarImageUrl, limitedUser.currentAvatarImageUrl) && - Objects.equals(this.currentAvatarThumbnailImageUrl, limitedUser.currentAvatarThumbnailImageUrl) && - Objects.equals(this.developerType, limitedUser.developerType) && - Objects.equals(this.displayName, limitedUser.displayName) && - Objects.equals(this.fallbackAvatar, limitedUser.fallbackAvatar) && - Objects.equals(this.id, limitedUser.id) && - Objects.equals(this.isFriend, limitedUser.isFriend) && - Objects.equals(this.lastPlatform, limitedUser.lastPlatform) && - Objects.equals(this.profilePicOverride, limitedUser.profilePicOverride) && - Objects.equals(this.status, limitedUser.status) && - Objects.equals(this.statusDescription, limitedUser.statusDescription) && - Objects.equals(this.tags, limitedUser.tags) && - Objects.equals(this.userIcon, limitedUser.userIcon) && - Objects.equals(this.username, limitedUser.username) && - Objects.equals(this.location, limitedUser.location) && - Objects.equals(this.friendKey, limitedUser.friendKey); - } - - @Override - public int hashCode() { - return Objects.hash(bio, currentAvatarImageUrl, currentAvatarThumbnailImageUrl, developerType, displayName, fallbackAvatar, id, isFriend, lastPlatform, profilePicOverride, status, statusDescription, tags, userIcon, username, location, friendKey); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LimitedUser {\n"); - sb.append(" bio: ").append(toIndentedString(bio)).append("\n"); - sb.append(" currentAvatarImageUrl: ").append(toIndentedString(currentAvatarImageUrl)).append("\n"); - 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(" fallbackAvatar: ").append(toIndentedString(fallbackAvatar)).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(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" userIcon: ").append(toIndentedString(userIcon)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" location: ").append(toIndentedString(location)).append("\n"); - sb.append(" friendKey: ").append(toIndentedString(friendKey)).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 "); - } - -} - diff --git a/src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java b/src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java new file mode 100644 index 00000000..e5560045 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserFriend.java @@ -0,0 +1,866 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.DeveloperType; +import io.github.vrchatapi.model.UserStatus; +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; +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; + +/** + * User object received when querying your friends list + */ +@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) + @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) + @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(@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 LimitedUserFriend bioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + return this; + } + + public LimitedUserFriend addBioLinksItem(String bioLinksItem) { + if (this.bioLinks == null) { + this.bioLinks = new ArrayList<>(); + } + this.bioLinks.add(bioLinksItem); + return this; + } + + /** + * + * @return bioLinks + */ + @javax.annotation.Nullable + public List getBioLinks() { + return bioLinks; + } + + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + } + + + 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 + public String getCurrentAvatarImageUrl() { + return currentAvatarImageUrl; + } + + public void setCurrentAvatarImageUrl(@javax.annotation.Nullable String currentAvatarImageUrl) { + this.currentAvatarImageUrl = currentAvatarImageUrl; + } + + + public LimitedUserFriend currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + return this; + } + + public LimitedUserFriend addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } + this.currentAvatarTags.add(currentAvatarTagsItem); + return this; + } + + /** + * Get currentAvatarTags + * @return currentAvatarTags + */ + @javax.annotation.Nullable + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + 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 + public String getCurrentAvatarThumbnailImageUrl() { + return currentAvatarThumbnailImageUrl; + } + + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + } + + + public LimitedUserFriend developerType(@javax.annotation.Nonnull DeveloperType developerType) { + this.developerType = developerType; + return this; + } + + /** + * Get developerType + * @return developerType + */ + @javax.annotation.Nonnull + public DeveloperType getDeveloperType() { + return developerType; + } + + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { + this.developerType = developerType; + } + + + public LimitedUserFriend displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public LimitedUserFriend friendKey(@javax.annotation.Nonnull String friendKey) { + this.friendKey = friendKey; + return this; + } + + /** + * Get friendKey + * @return friendKey + */ + @javax.annotation.Nonnull + public String getFriendKey() { + return friendKey; + } + + public void setFriendKey(@javax.annotation.Nonnull String friendKey) { + this.friendKey = friendKey; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public LimitedUserFriend imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public LimitedUserFriend isFriend(@javax.annotation.Nonnull Boolean isFriend) { + this.isFriend = isFriend; + return this; + } + + /** + * Get isFriend + * @return isFriend + */ + @javax.annotation.Nonnull + public Boolean getIsFriend() { + return isFriend; + } + + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { + this.isFriend = isFriend; + } + + + public LimitedUserFriend lastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { + this.lastActivity = lastActivity; + return this; + } + + /** + * Get lastActivity + * @return lastActivity + */ + @javax.annotation.Nullable + public OffsetDateTime getLastActivity() { + return lastActivity; + } + + public void setLastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { + this.lastActivity = lastActivity; + } + + + public LimitedUserFriend lastLogin(@javax.annotation.Nullable OffsetDateTime lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + * Get lastLogin + * @return lastLogin + */ + @javax.annotation.Nullable + public OffsetDateTime getLastLogin() { + return lastLogin; + } + + public void setLastLogin(@javax.annotation.Nullable OffsetDateTime lastLogin) { + this.lastLogin = lastLogin; + } + + + public LimitedUserFriend lastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { + this.lastMobile = lastMobile; + return this; + } + + /** + * Get lastMobile + * @return lastMobile + */ + @javax.annotation.Nullable + public OffsetDateTime getLastMobile() { + return lastMobile; + } + + public void setLastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { + this.lastMobile = lastMobile; + } + + + 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 + public String getLastPlatform() { + return lastPlatform; + } + + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { + this.lastPlatform = lastPlatform; + } + + + public LimitedUserFriend location(@javax.annotation.Nonnull String location) { + this.location = location; + return this; + } + + /** + * Get location + * @return location + */ + @javax.annotation.Nonnull + public String getLocation() { + return location; + } + + public void setLocation(@javax.annotation.Nonnull String location) { + this.location = location; + } + + + public LimitedUserFriend platform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + */ + @javax.annotation.Nonnull + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + } + + + public LimitedUserFriend profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + return this; + } + + /** + * Get profilePicOverride + * @return profilePicOverride + */ + @javax.annotation.Nullable + public String getProfilePicOverride() { + return profilePicOverride; + } + + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + } + + + public LimitedUserFriend profilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; + return this; + } + + /** + * Get profilePicOverrideThumbnail + * @return profilePicOverrideThumbnail + */ + @javax.annotation.Nullable + public String getProfilePicOverrideThumbnail() { + return profilePicOverrideThumbnail; + } + + public void setProfilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; + } + + + public LimitedUserFriend status(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public UserStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + } + + + public LimitedUserFriend statusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + return this; + } + + /** + * Get statusDescription + * @return statusDescription + */ + @javax.annotation.Nonnull + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public LimitedUserFriend userIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + return this; + } + + /** + * Get userIcon + * @return userIcon + */ + @javax.annotation.Nullable + public String getUserIcon() { + return userIcon; + } + + public void setUserIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitedUserFriend limitedUserFriend = (LimitedUserFriend) o; + return Objects.equals(this.bio, limitedUserFriend.bio) && + Objects.equals(this.bioLinks, limitedUserFriend.bioLinks) && + Objects.equals(this.currentAvatarImageUrl, limitedUserFriend.currentAvatarImageUrl) && + Objects.equals(this.currentAvatarTags, limitedUserFriend.currentAvatarTags) && + Objects.equals(this.currentAvatarThumbnailImageUrl, limitedUserFriend.currentAvatarThumbnailImageUrl) && + Objects.equals(this.developerType, limitedUserFriend.developerType) && + Objects.equals(this.displayName, limitedUserFriend.displayName) && + Objects.equals(this.friendKey, limitedUserFriend.friendKey) && + Objects.equals(this.id, limitedUserFriend.id) && + Objects.equals(this.imageUrl, limitedUserFriend.imageUrl) && + Objects.equals(this.isFriend, limitedUserFriend.isFriend) && + Objects.equals(this.lastActivity, limitedUserFriend.lastActivity) && + Objects.equals(this.lastLogin, limitedUserFriend.lastLogin) && + Objects.equals(this.lastMobile, limitedUserFriend.lastMobile) && + Objects.equals(this.lastPlatform, limitedUserFriend.lastPlatform) && + Objects.equals(this.location, limitedUserFriend.location) && + Objects.equals(this.platform, limitedUserFriend.platform) && + Objects.equals(this.profilePicOverride, limitedUserFriend.profilePicOverride) && + Objects.equals(this.profilePicOverrideThumbnail, limitedUserFriend.profilePicOverrideThumbnail) && + Objects.equals(this.status, limitedUserFriend.status) && + Objects.equals(this.statusDescription, limitedUserFriend.statusDescription) && + Objects.equals(this.tags, limitedUserFriend.tags) && + Objects.equals(this.userIcon, limitedUserFriend.userIcon); + } + + @Override + public int hashCode() { + return Objects.hash(bio, bioLinks, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, developerType, displayName, friendKey, id, imageUrl, isFriend, lastActivity, lastLogin, lastMobile, lastPlatform, location, platform, profilePicOverride, profilePicOverrideThumbnail, status, statusDescription, tags, userIcon); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LimitedUserFriend {\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"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); + 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(" friendKey: ").append(toIndentedString(friendKey)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).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(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).append("\n"); + sb.append(" profilePicOverrideThumbnail: ").append(toIndentedString(profilePicOverrideThumbnail)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" userIcon: ").append(toIndentedString(userIcon)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LimitedUserFriend.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 `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 (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(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("currentAvatarImageUrl") != null && !jsonObj.get("currentAvatarImageUrl").isJsonNull()) && !jsonObj.get("currentAvatarImageUrl").isJsonPrimitive()) { + 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").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(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(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(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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LimitedUserFriend.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LimitedUserFriend' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LimitedUserFriend.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LimitedUserFriend value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LimitedUserFriend read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..1ddf40ae --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserGroups.java @@ -0,0 +1,692 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * LimitedUserGroups + */ +@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(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + return this; + } + + /** + * Get bannerId + * @return bannerId + */ + @javax.annotation.Nullable + public String getBannerId() { + return bannerId; + } + + public void setBannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + } + + + public LimitedUserGroups 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 LimitedUserGroups description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public LimitedUserGroups discriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + return this; + } + + /** + * Get discriminator + * @return discriminator + */ + @javax.annotation.Nullable + public String getDiscriminator() { + return discriminator; + } + + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + } + + + public LimitedUserGroups groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public LimitedUserGroups iconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + return this; + } + + /** + * Get iconId + * @return iconId + */ + @javax.annotation.Nullable + public String getIconId() { + return iconId; + } + + public void setIconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + } + + + public LimitedUserGroups 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 LimitedUserGroups 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 LimitedUserGroups isRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + return this; + } + + /** + * Get isRepresenting + * @return isRepresenting + */ + @javax.annotation.Nullable + public Boolean getIsRepresenting() { + return isRepresenting; + } + + public void setIsRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + } + + + public LimitedUserGroups lastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { + this.lastPostCreatedAt = lastPostCreatedAt; + return this; + } + + /** + * Get lastPostCreatedAt + * @return lastPostCreatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastPostCreatedAt() { + return lastPostCreatedAt; + } + + public void setLastPostCreatedAt(@javax.annotation.Nullable OffsetDateTime lastPostCreatedAt) { + this.lastPostCreatedAt = lastPostCreatedAt; + } + + + public LimitedUserGroups lastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { + this.lastPostReadAt = lastPostReadAt; + return this; + } + + /** + * Get lastPostReadAt + * @return lastPostReadAt + */ + @javax.annotation.Nullable + public OffsetDateTime getLastPostReadAt() { + return lastPostReadAt; + } + + public void setLastPostReadAt(@javax.annotation.Nullable OffsetDateTime lastPostReadAt) { + this.lastPostReadAt = lastPostReadAt; + } + + + public LimitedUserGroups memberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + return this; + } + + /** + * Get memberCount + * @return memberCount + */ + @javax.annotation.Nullable + public Integer getMemberCount() { + return memberCount; + } + + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + } + + + public LimitedUserGroups memberVisibility(@javax.annotation.Nullable String memberVisibility) { + this.memberVisibility = memberVisibility; + return this; + } + + /** + * Get memberVisibility + * @return memberVisibility + */ + @javax.annotation.Nullable + public String getMemberVisibility() { + return memberVisibility; + } + + public void setMemberVisibility(@javax.annotation.Nullable String memberVisibility) { + this.memberVisibility = memberVisibility; + } + + + public LimitedUserGroups mutualGroup(@javax.annotation.Nullable Boolean mutualGroup) { + this.mutualGroup = mutualGroup; + return this; + } + + /** + * Get mutualGroup + * @return mutualGroup + */ + @javax.annotation.Nullable + public Boolean getMutualGroup() { + return mutualGroup; + } + + public void setMutualGroup(@javax.annotation.Nullable Boolean mutualGroup) { + this.mutualGroup = mutualGroup; + } + + + public LimitedUserGroups name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public 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 + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public LimitedUserGroups privacy(@javax.annotation.Nullable String privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public String getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable String privacy) { + this.privacy = privacy; + } + + + public LimitedUserGroups shortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + return this; + } + + /** + * Get shortCode + * @return shortCode + */ + @javax.annotation.Nullable + public String getShortCode() { + return shortCode; + } + + public void setShortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitedUserGroups limitedUserGroups = (LimitedUserGroups) o; + return Objects.equals(this.bannerId, limitedUserGroups.bannerId) && + Objects.equals(this.bannerUrl, limitedUserGroups.bannerUrl) && + Objects.equals(this.description, limitedUserGroups.description) && + Objects.equals(this.discriminator, limitedUserGroups.discriminator) && + Objects.equals(this.groupId, limitedUserGroups.groupId) && + Objects.equals(this.iconId, limitedUserGroups.iconId) && + Objects.equals(this.iconUrl, limitedUserGroups.iconUrl) && + Objects.equals(this.id, limitedUserGroups.id) && + Objects.equals(this.isRepresenting, limitedUserGroups.isRepresenting) && + Objects.equals(this.lastPostCreatedAt, limitedUserGroups.lastPostCreatedAt) && + Objects.equals(this.lastPostReadAt, limitedUserGroups.lastPostReadAt) && + Objects.equals(this.memberCount, limitedUserGroups.memberCount) && + Objects.equals(this.memberVisibility, limitedUserGroups.memberVisibility) && + Objects.equals(this.mutualGroup, limitedUserGroups.mutualGroup) && + Objects.equals(this.name, limitedUserGroups.name) && + Objects.equals(this.ownerId, limitedUserGroups.ownerId) && + Objects.equals(this.privacy, limitedUserGroups.privacy) && + Objects.equals(this.shortCode, limitedUserGroups.shortCode); + } + + 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(bannerId, bannerUrl, description, discriminator, groupId, iconId, iconUrl, id, isRepresenting, lastPostCreatedAt, lastPostReadAt, memberCount, memberVisibility, mutualGroup, name, ownerId, privacy, shortCode); + } + + 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 LimitedUserGroups {\n"); + sb.append(" bannerId: ").append(toIndentedString(bannerId)).append("\n"); + sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" discriminator: ").append(toIndentedString(discriminator)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" iconId: ").append(toIndentedString(iconId)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isRepresenting: ").append(toIndentedString(isRepresenting)).append("\n"); + sb.append(" lastPostCreatedAt: ").append(toIndentedString(lastPostCreatedAt)).append("\n"); + sb.append(" lastPostReadAt: ").append(toIndentedString(lastPostReadAt)).append("\n"); + sb.append(" memberCount: ").append(toIndentedString(memberCount)).append("\n"); + sb.append(" memberVisibility: ").append(toIndentedString(memberVisibility)).append("\n"); + sb.append(" mutualGroup: ").append(toIndentedString(mutualGroup)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" shortCode: ").append(toIndentedString(shortCode)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LimitedUserGroups.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 `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(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(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(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(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(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(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(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("memberVisibility") != null && !jsonObj.get("memberVisibility").isJsonNull()) && !jsonObj.get("memberVisibility").isJsonPrimitive()) { + 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(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(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(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(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LimitedUserGroups.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LimitedUserGroups' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LimitedUserGroups.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LimitedUserGroups value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LimitedUserGroups read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..931b4a37 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserInstance.java @@ -0,0 +1,992 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.DeveloperType; +import io.github.vrchatapi.model.UserState; +import io.github.vrchatapi.model.UserStatus; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * User object received when querying your own instance + */ +@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) + @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(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; + return this; + } + + /** + * Get ageVerificationStatus + * @return ageVerificationStatus + */ + @javax.annotation.Nonnull + public AgeVerificationStatus getAgeVerificationStatus() { + return ageVerificationStatus; + } + + public void setAgeVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; + } + + + 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 + public Boolean getAgeVerified() { + return ageVerified; + } + + public void setAgeVerified(@javax.annotation.Nonnull Boolean ageVerified) { + this.ageVerified = ageVerified; + } + + + public LimitedUserInstance allowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { + this.allowAvatarCopying = allowAvatarCopying; + return this; + } + + /** + * Get allowAvatarCopying + * @return allowAvatarCopying + */ + @javax.annotation.Nonnull + public Boolean getAllowAvatarCopying() { + return allowAvatarCopying; + } + + public void setAllowAvatarCopying(@javax.annotation.Nonnull Boolean allowAvatarCopying) { + this.allowAvatarCopying = allowAvatarCopying; + } + + + public LimitedUserInstance 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 LimitedUserInstance bioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + return this; + } + + public LimitedUserInstance addBioLinksItem(String bioLinksItem) { + if (this.bioLinks == null) { + this.bioLinks = new ArrayList<>(); + } + this.bioLinks.add(bioLinksItem); + return this; + } + + /** + * + * @return bioLinks + */ + @javax.annotation.Nullable + public List getBioLinks() { + return bioLinks; + } + + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + } + + + 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 + public String getCurrentAvatarImageUrl() { + return currentAvatarImageUrl; + } + + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { + this.currentAvatarImageUrl = currentAvatarImageUrl; + } + + + 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 + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + 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 + public String getCurrentAvatarThumbnailImageUrl() { + return currentAvatarThumbnailImageUrl; + } + + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + } + + + public LimitedUserInstance dateJoined(@javax.annotation.Nullable OffsetDateTime dateJoined) { + this.dateJoined = dateJoined; + return this; + } + + /** + * Get dateJoined + * @return dateJoined + */ + @javax.annotation.Nullable + public OffsetDateTime getDateJoined() { + return dateJoined; + } + + public void setDateJoined(@javax.annotation.Nullable OffsetDateTime dateJoined) { + this.dateJoined = dateJoined; + } + + + public LimitedUserInstance developerType(@javax.annotation.Nonnull DeveloperType developerType) { + this.developerType = developerType; + return this; + } + + /** + * Get developerType + * @return developerType + */ + @javax.annotation.Nonnull + public DeveloperType getDeveloperType() { + return developerType; + } + + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { + this.developerType = developerType; + } + + + public LimitedUserInstance displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public LimitedUserInstance friendKey(@javax.annotation.Nonnull String friendKey) { + this.friendKey = friendKey; + return this; + } + + /** + * Get friendKey + * @return friendKey + */ + @javax.annotation.Nonnull + public String getFriendKey() { + return friendKey; + } + + public void setFriendKey(@javax.annotation.Nonnull String friendKey) { + this.friendKey = friendKey; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public LimitedUserInstance imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public LimitedUserInstance isFriend(@javax.annotation.Nonnull Boolean isFriend) { + this.isFriend = isFriend; + return this; + } + + /** + * Get isFriend + * @return isFriend + */ + @javax.annotation.Nonnull + public Boolean getIsFriend() { + return isFriend; + } + + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { + this.isFriend = isFriend; + } + + + public LimitedUserInstance lastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { + this.lastActivity = lastActivity; + return this; + } + + /** + * Get lastActivity + * @return lastActivity + */ + @javax.annotation.Nullable + public OffsetDateTime getLastActivity() { + return lastActivity; + } + + public void setLastActivity(@javax.annotation.Nullable OffsetDateTime lastActivity) { + this.lastActivity = lastActivity; + } + + + public LimitedUserInstance lastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { + this.lastMobile = lastMobile; + return this; + } + + /** + * Get lastMobile + * @return lastMobile + */ + @javax.annotation.Nullable + public OffsetDateTime getLastMobile() { + return lastMobile; + } + + public void setLastMobile(@javax.annotation.Nullable OffsetDateTime lastMobile) { + this.lastMobile = lastMobile; + } + + + 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 + public String getLastPlatform() { + return lastPlatform; + } + + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { + this.lastPlatform = lastPlatform; + } + + + 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nullable String platform) { + this.platform = platform; + } + + + public LimitedUserInstance profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + return this; + } + + /** + * Get profilePicOverride + * @return profilePicOverride + */ + @javax.annotation.Nullable + public String getProfilePicOverride() { + return profilePicOverride; + } + + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + } + + + public LimitedUserInstance profilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; + return this; + } + + /** + * Get profilePicOverrideThumbnail + * @return profilePicOverrideThumbnail + */ + @javax.annotation.Nullable + public String getProfilePicOverrideThumbnail() { + return profilePicOverrideThumbnail; + } + + public void setProfilePicOverrideThumbnail(@javax.annotation.Nullable String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; + } + + + public LimitedUserInstance pronouns(@javax.annotation.Nonnull String pronouns) { + this.pronouns = pronouns; + return this; + } + + /** + * Get pronouns + * @return pronouns + */ + @javax.annotation.Nonnull + public String getPronouns() { + return pronouns; + } + + public void setPronouns(@javax.annotation.Nonnull String pronouns) { + this.pronouns = pronouns; + } + + + public LimitedUserInstance 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 LimitedUserInstance status(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public UserStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + } + + + public LimitedUserInstance statusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + return this; + } + + /** + * Get statusDescription + * @return statusDescription + */ + @javax.annotation.Nonnull + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public LimitedUserInstance userIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + return this; + } + + /** + * Get userIcon + * @return userIcon + */ + @javax.annotation.Nullable + public String getUserIcon() { + return userIcon; + } + + public void setUserIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitedUserInstance limitedUserInstance = (LimitedUserInstance) o; + return Objects.equals(this.ageVerificationStatus, limitedUserInstance.ageVerificationStatus) && + Objects.equals(this.ageVerified, limitedUserInstance.ageVerified) && + Objects.equals(this.allowAvatarCopying, limitedUserInstance.allowAvatarCopying) && + Objects.equals(this.bio, limitedUserInstance.bio) && + Objects.equals(this.bioLinks, limitedUserInstance.bioLinks) && + Objects.equals(this.currentAvatarImageUrl, limitedUserInstance.currentAvatarImageUrl) && + Objects.equals(this.currentAvatarTags, limitedUserInstance.currentAvatarTags) && + Objects.equals(this.currentAvatarThumbnailImageUrl, limitedUserInstance.currentAvatarThumbnailImageUrl) && + Objects.equals(this.dateJoined, limitedUserInstance.dateJoined) && + Objects.equals(this.developerType, limitedUserInstance.developerType) && + Objects.equals(this.displayName, limitedUserInstance.displayName) && + Objects.equals(this.friendKey, limitedUserInstance.friendKey) && + Objects.equals(this.id, limitedUserInstance.id) && + Objects.equals(this.imageUrl, limitedUserInstance.imageUrl) && + Objects.equals(this.isFriend, limitedUserInstance.isFriend) && + Objects.equals(this.lastActivity, limitedUserInstance.lastActivity) && + Objects.equals(this.lastMobile, limitedUserInstance.lastMobile) && + Objects.equals(this.lastPlatform, limitedUserInstance.lastPlatform) && + Objects.equals(this.platform, limitedUserInstance.platform) && + Objects.equals(this.profilePicOverride, limitedUserInstance.profilePicOverride) && + Objects.equals(this.profilePicOverrideThumbnail, limitedUserInstance.profilePicOverrideThumbnail) && + Objects.equals(this.pronouns, limitedUserInstance.pronouns) && + Objects.equals(this.state, limitedUserInstance.state) && + Objects.equals(this.status, limitedUserInstance.status) && + Objects.equals(this.statusDescription, limitedUserInstance.statusDescription) && + Objects.equals(this.tags, limitedUserInstance.tags) && + Objects.equals(this.userIcon, limitedUserInstance.userIcon); + } + + 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, allowAvatarCopying, bio, bioLinks, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, dateJoined, developerType, displayName, friendKey, id, imageUrl, isFriend, lastActivity, lastMobile, lastPlatform, platform, profilePicOverride, profilePicOverrideThumbnail, pronouns, state, status, statusDescription, tags, userIcon); + } + + 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 LimitedUserInstance {\n"); + 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(" bio: ").append(toIndentedString(bio)).append("\n"); + sb.append(" bioLinks: ").append(toIndentedString(bioLinks)).append("\n"); + sb.append(" currentAvatarImageUrl: ").append(toIndentedString(currentAvatarImageUrl)).append("\n"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); + sb.append(" currentAvatarThumbnailImageUrl: ").append(toIndentedString(currentAvatarThumbnailImageUrl)).append("\n"); + sb.append(" dateJoined: ").append(toIndentedString(dateJoined)).append("\n"); + sb.append(" developerType: ").append(toIndentedString(developerType)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" friendKey: ").append(toIndentedString(friendKey)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" isFriend: ").append(toIndentedString(isFriend)).append("\n"); + sb.append(" lastActivity: ").append(toIndentedString(lastActivity)).append("\n"); + sb.append(" lastMobile: ").append(toIndentedString(lastMobile)).append("\n"); + sb.append(" lastPlatform: ").append(toIndentedString(lastPlatform)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).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"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" userIcon: ").append(toIndentedString(userIcon)).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", "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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LimitedUserInstance.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 `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 (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(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("currentAvatarImageUrl").isJsonPrimitive()) { + 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(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(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(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(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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LimitedUserInstance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LimitedUserInstance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LimitedUserInstance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LimitedUserInstance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LimitedUserInstance read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..43585b4a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/LimitedUserSearch.java @@ -0,0 +1,876 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.DeveloperType; +import io.github.vrchatapi.model.UserStatus; +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; + +/** + * User object received when searching + */ +@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) + @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 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 + public String getBio() { + return bio; + } + + public void setBio(@javax.annotation.Nullable String bio) { + this.bio = bio; + } + + + public LimitedUserSearch bioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + return this; + } + + public LimitedUserSearch addBioLinksItem(String bioLinksItem) { + if (this.bioLinks == null) { + this.bioLinks = new ArrayList<>(); + } + this.bioLinks.add(bioLinksItem); + return this; + } + + /** + * + * @return bioLinks + */ + @javax.annotation.Nullable + public List getBioLinks() { + return bioLinks; + } + + public void setBioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + } + + + 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 + public String getCurrentAvatarImageUrl() { + return currentAvatarImageUrl; + } + + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { + this.currentAvatarImageUrl = currentAvatarImageUrl; + } + + + 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 + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + 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 + public String getCurrentAvatarThumbnailImageUrl() { + return currentAvatarThumbnailImageUrl; + } + + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nonnull String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + } + + + public LimitedUserSearch developerType(@javax.annotation.Nonnull DeveloperType developerType) { + this.developerType = developerType; + return this; + } + + /** + * Get developerType + * @return developerType + */ + @javax.annotation.Nonnull + public DeveloperType getDeveloperType() { + return developerType; + } + + public void setDeveloperType(@javax.annotation.Nonnull DeveloperType developerType) { + this.developerType = developerType; + } + + + public LimitedUserSearch displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public LimitedUserSearch isFriend(@javax.annotation.Nonnull Boolean isFriend) { + this.isFriend = isFriend; + return this; + } + + /** + * Get isFriend + * @return isFriend + */ + @javax.annotation.Nonnull + public Boolean getIsFriend() { + return isFriend; + } + + public void setIsFriend(@javax.annotation.Nonnull Boolean isFriend) { + this.isFriend = isFriend; + } + + + 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 + public String getLastPlatform() { + return lastPlatform; + } + + public void setLastPlatform(@javax.annotation.Nonnull String lastPlatform) { + this.lastPlatform = lastPlatform; + } + + + 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 + public String getProfilePicOverride() { + return profilePicOverride; + } + + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + } + + + public LimitedUserSearch 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 LimitedUserSearch status(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public UserStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + } + + + public LimitedUserSearch statusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + return this; + } + + /** + * Get statusDescription + * @return statusDescription + */ + @javax.annotation.Nonnull + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public LimitedUserSearch userIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + return this; + } + + /** + * Get userIcon + * @return userIcon + */ + @javax.annotation.Nullable + public String getUserIcon() { + return userIcon; + } + + public void setUserIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitedUserSearch limitedUserSearch = (LimitedUserSearch) o; + 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) && + Objects.equals(this.statusDescription, limitedUserSearch.statusDescription) && + Objects.equals(this.tags, limitedUserSearch.tags) && + Objects.equals(this.userIcon, limitedUserSearch.userIcon); + } + + @Override + public int hashCode() { + 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"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); + 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"); + sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" userIcon: ").append(toIndentedString(userIcon)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LimitedUserSearch.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 `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 (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(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("currentAvatarImageUrl").isJsonPrimitive()) { + 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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LimitedUserSearch.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LimitedUserSearch' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LimitedUserSearch.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LimitedUserSearch value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LimitedUserSearch read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 7f11b280..4ee11670 100644 --- a/src/main/java/io/github/vrchatapi/model/LimitedWorld.java +++ b/src/main/java/io/github/vrchatapi/model/LimitedWorld.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,556 +13,682 @@ package io.github.vrchatapi.model; import 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.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.threeten.bp.OffsetDateTime; +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; /** - * LimitedWorld + * */ -@javax.annotation.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) - private List tags = new ArrayList(); + @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) + @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 = new ArrayList(); + @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 authorId(String authorId) { - + public LimitedWorld() { + } + + 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 - * minimum: 0 - * maximum: 40 * @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 favorites(Integer favorites) { - + public LimitedWorld defaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { + this.defaultContentSettings = defaultContentSettings; + return this; + } + + /** + * Get defaultContentSettings + * @return defaultContentSettings + */ + @javax.annotation.Nullable + public InstanceContentSettings getDefaultContentSettings() { + return defaultContentSettings; + } + + public void setDefaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { + this.defaultContentSettings = defaultContentSettings; + } + + + 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_ba913a96-fac4-4048-a062-9aa5db092812", 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 publicationDate(String publicationDate) { - + public LimitedWorld previewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { + this.previewYoutubeId = previewYoutubeId; + return this; + } + + /** + * Get previewYoutubeId + * @return previewYoutubeId + */ + @javax.annotation.Nullable + public String getPreviewYoutubeId() { + return previewYoutubeId; + } + + public void setPreviewYoutubeId(@javax.annotation.Nullable String previewYoutubeId) { + this.previewYoutubeId = previewYoutubeId; + } + + + 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 releaseStatus(ReleaseStatus releaseStatus) { - + public LimitedWorld recommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + return this; + } + + /** + * Get recommendedCapacity + * @return recommendedCapacity + */ + @javax.annotation.Nullable + public Integer getRecommendedCapacity() { + return recommendedCapacity; + } + + public void setRecommendedCapacity(@javax.annotation.Nullable Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + } + + + 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 tags(List tags) { - + public LimitedWorld storeId(@javax.annotation.Nullable String storeId) { + this.storeId = storeId; + return this; + } + + /** + * Get storeId + * @return storeId + */ + @javax.annotation.Nullable + public String getStoreId() { + return storeId; + } + + public void setStoreId(@javax.annotation.Nullable String storeId) { + this.storeId = storeId; + } + + + 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; } - /** - * 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 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 unityPackages(List unityPackages) { - + public LimitedWorld udonProducts(@javax.annotation.Nullable List udonProducts) { + this.udonProducts = udonProducts; + return this; + } + + public LimitedWorld addUdonProductsItem(String udonProductsItem) { + if (this.udonProducts == null) { + this.udonProducts = new ArrayList<>(); + } + this.udonProducts.add(udonProductsItem); + return this; + } + + /** + * Get udonProducts + * @return udonProducts + */ + @javax.annotation.Nullable + public List getUdonProducts() { + return udonProducts; + } + + public void setUdonProducts(@javax.annotation.Nullable List udonProducts) { + this.udonProducts = udonProducts; + } + + + 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; } - /** - * Get unityPackages + /** + * * @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(@javax.annotation.Nullable Integer visits) { + this.visits = visits; + return this; + } + + /** + * Get visits + * minimum: 0 + * @return visits + */ + @javax.annotation.Nullable + public Integer getVisits() { + return visits; + } + + public void setVisits(@javax.annotation.Nullable Integer visits) { + this.visits = visits; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -576,6 +702,7 @@ public boolean equals(Object o) { Objects.equals(this.authorName, limitedWorld.authorName) && Objects.equals(this.capacity, limitedWorld.capacity) && Objects.equals(this.createdAt, limitedWorld.createdAt) && + Objects.equals(this.defaultContentSettings, limitedWorld.defaultContentSettings) && Objects.equals(this.favorites, limitedWorld.favorites) && Objects.equals(this.heat, limitedWorld.heat) && Objects.equals(this.id, limitedWorld.id) && @@ -585,17 +712,33 @@ public boolean equals(Object o) { Objects.equals(this.occupants, limitedWorld.occupants) && Objects.equals(this.organization, limitedWorld.organization) && Objects.equals(this.popularity, limitedWorld.popularity) && + Objects.equals(this.previewYoutubeId, limitedWorld.previewYoutubeId) && Objects.equals(this.publicationDate, limitedWorld.publicationDate) && + Objects.equals(this.recommendedCapacity, limitedWorld.recommendedCapacity) && Objects.equals(this.releaseStatus, limitedWorld.releaseStatus) && + Objects.equals(this.storeId, limitedWorld.storeId) && Objects.equals(this.tags, limitedWorld.tags) && Objects.equals(this.thumbnailImageUrl, limitedWorld.thumbnailImageUrl) && + Objects.equals(this.udonProducts, limitedWorld.udonProducts) && Objects.equals(this.unityPackages, limitedWorld.unityPackages) && - Objects.equals(this.updatedAt, limitedWorld.updatedAt); + Objects.equals(this.updatedAt, limitedWorld.updatedAt) && + Objects.equals(this.visits, limitedWorld.visits); + } + + 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(authorId, authorName, capacity, createdAt, favorites, heat, id, imageUrl, labsPublicationDate, name, occupants, organization, popularity, publicationDate, releaseStatus, tags, thumbnailImageUrl, unityPackages, updatedAt); + return Objects.hash(authorId, authorName, capacity, createdAt, defaultContentSettings, favorites, heat, id, imageUrl, labsPublicationDate, name, occupants, organization, popularity, previewYoutubeId, publicationDate, recommendedCapacity, releaseStatus, storeId, tags, thumbnailImageUrl, udonProducts, unityPackages, updatedAt, visits); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -606,6 +749,7 @@ public String toString() { sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); sb.append(" capacity: ").append(toIndentedString(capacity)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" defaultContentSettings: ").append(toIndentedString(defaultContentSettings)).append("\n"); sb.append(" favorites: ").append(toIndentedString(favorites)).append("\n"); sb.append(" heat: ").append(toIndentedString(heat)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -615,12 +759,17 @@ public String toString() { sb.append(" occupants: ").append(toIndentedString(occupants)).append("\n"); sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); sb.append(" popularity: ").append(toIndentedString(popularity)).append("\n"); + sb.append(" previewYoutubeId: ").append(toIndentedString(previewYoutubeId)).append("\n"); sb.append(" publicationDate: ").append(toIndentedString(publicationDate)).append("\n"); + sb.append(" recommendedCapacity: ").append(toIndentedString(recommendedCapacity)).append("\n"); sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" thumbnailImageUrl: ").append(toIndentedString(thumbnailImageUrl)).append("\n"); + sb.append(" udonProducts: ").append(toIndentedString(udonProducts)).append("\n"); sb.append(" unityPackages: ").append(toIndentedString(unityPackages)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" visits: ").append(toIndentedString(visits)).append("\n"); sb.append("}"); return sb.toString(); } @@ -630,11 +779,157 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!LimitedWorld.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 `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 (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(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(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.validateJsonElement(jsonObj.get("defaultContentSettings")); + } + if (!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("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("labsPublicationDate").isJsonPrimitive()) { + 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(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(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(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(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(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(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(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").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) { + 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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LimitedWorld.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LimitedWorld' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LimitedWorld.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LimitedWorld value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LimitedWorld read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 82e8e54b..c2a87bf0 100644 --- a/src/main/java/io/github/vrchatapi/model/MIMEType.java +++ b/src/main/java/io/github/vrchatapi/model/MIMEType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,33 +28,35 @@ @JsonAdapter(MIMEType.Adapter.class) public enum MIMEType { - IMAGE_JPEG("image/jpeg"), + APPLICATION_GZIP("application/gzip"), - IMAGE_JPG("image/jpg"), + APPLICATION_OCTET_STREAM("application/octet-stream"), - IMAGE_PNG("image/png"), + APPLICATION_X_AVATAR("application/x-avatar"), - IMAGE_WEBP("image/webp"), + APPLICATION_X_PROP("application/x-prop"), - IMAGE_GIF("image/gif"), + APPLICATION_X_RSYNC_DELTA("application/x-rsync-delta"), - IMAGE_BMP("image/bmp"), + APPLICATION_X_RSYNC_SIGNATURE("application/x-rsync-signature"), - IMAGE_SVG_XML("image/svg+xml"), + APPLICATION_X_WORLD("application/x-world"), - IMAGE_TIFF("image/tiff"), + IMAGE_BMP("image/bmp"), - APPLICATION_X_AVATAR("application/x-avatar"), + IMAGE_GIF("image/gif"), - APPLICATION_X_WORLD("application/x-world"), + IMAGE_JPEG("image/jpeg"), - APPLICATION_GZIP("application/gzip"), + IMAGE_JPG("image/jpg"), - APPLICATION_X_RSYNC_SIGNATURE("application/x-rsync-signature"), + IMAGE_PNG("image/png"), - APPLICATION_X_RSYNC_DELTA("application/x-rsync-delta"), + IMAGE_SVG_XML("image/svg+xml"), + + IMAGE_TIFF("image/tiff"), - APPLICATION_OCTET_STREAM("application/octet-stream"); + IMAGE_WEBP("image/webp"); private String value; @@ -92,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 new file mode 100644 index 00000000..fcefc0f1 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ModelFile.java @@ -0,0 +1,591 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.FileVersion; +import io.github.vrchatapi.model.ImageAnimationStyle; +import io.github.vrchatapi.model.ImageLoopStyle; +import io.github.vrchatapi.model.ImageMask; +import io.github.vrchatapi.model.MIMEType; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +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; + +/** + * + */ +@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(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { + this.animationStyle = animationStyle; + return this; + } + + /** + * Get animationStyle + * @return animationStyle + */ + @javax.annotation.Nullable + public ImageAnimationStyle getAnimationStyle() { + return animationStyle; + } + + public void setAnimationStyle(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { + this.animationStyle = animationStyle; + } + + + public ModelFile extension(@javax.annotation.Nonnull String extension) { + this.extension = extension; + return this; + } + + /** + * Get extension + * @return extension + */ + @javax.annotation.Nonnull + public String getExtension() { + return extension; + } + + public void setExtension(@javax.annotation.Nonnull String extension) { + this.extension = extension; + } + + + 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 + public Integer getFrames() { + return frames; + } + + public void setFrames(@javax.annotation.Nullable Integer frames) { + this.frames = frames; + } + + + 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 + public Integer getFramesOverTime() { + return framesOverTime; + } + + public void setFramesOverTime(@javax.annotation.Nullable Integer framesOverTime) { + this.framesOverTime = framesOverTime; + } + + + public ModelFile id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ModelFile loopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { + this.loopStyle = loopStyle; + return this; + } + + /** + * Get loopStyle + * @return loopStyle + */ + @javax.annotation.Nullable + public ImageLoopStyle getLoopStyle() { + return loopStyle; + } + + public void setLoopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { + this.loopStyle = loopStyle; + } + + + public ModelFile maskTag(@javax.annotation.Nullable ImageMask maskTag) { + this.maskTag = maskTag; + return this; + } + + /** + * Get maskTag + * @return maskTag + */ + @javax.annotation.Nullable + public ImageMask getMaskTag() { + return maskTag; + } + + public void setMaskTag(@javax.annotation.Nullable ImageMask maskTag) { + this.maskTag = maskTag; + } + + + public ModelFile mimeType(@javax.annotation.Nonnull MIMEType mimeType) { + this.mimeType = mimeType; + return this; + } + + /** + * Get mimeType + * @return mimeType + */ + @javax.annotation.Nonnull + public MIMEType getMimeType() { + return mimeType; + } + + public void setMimeType(@javax.annotation.Nonnull MIMEType mimeType) { + this.mimeType = mimeType; + } + + + public ModelFile modifiedThumbnailFileName(@javax.annotation.Nullable String modifiedThumbnailFileName) { + this.modifiedThumbnailFileName = modifiedThumbnailFileName; + return this; + } + + /** + * Get modifiedThumbnailFileName + * @return modifiedThumbnailFileName + */ + @javax.annotation.Nullable + public String getModifiedThumbnailFileName() { + return modifiedThumbnailFileName; + } + + public void setModifiedThumbnailFileName(@javax.annotation.Nullable String modifiedThumbnailFileName) { + this.modifiedThumbnailFileName = modifiedThumbnailFileName; + } + + + public ModelFile name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + 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 + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nonnull String ownerId) { + this.ownerId = ownerId; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + 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 + public Set getVersions() { + return versions; + } + + public void setVersions(@javax.annotation.Nonnull Set versions) { + this.versions = versions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelFile _file = (ModelFile) o; + return Objects.equals(this.animationStyle, _file.animationStyle) && + Objects.equals(this.extension, _file.extension) && + Objects.equals(this.frames, _file.frames) && + Objects.equals(this.framesOverTime, _file.framesOverTime) && + Objects.equals(this.id, _file.id) && + Objects.equals(this.loopStyle, _file.loopStyle) && + Objects.equals(this.maskTag, _file.maskTag) && + Objects.equals(this.mimeType, _file.mimeType) && + Objects.equals(this.modifiedThumbnailFileName, _file.modifiedThumbnailFileName) && + Objects.equals(this.name, _file.name) && + Objects.equals(this.ownerId, _file.ownerId) && + Objects.equals(this.tags, _file.tags) && + Objects.equals(this.versions, _file.versions); + } + + @Override + public int hashCode() { + return Objects.hash(animationStyle, extension, frames, framesOverTime, id, loopStyle, maskTag, mimeType, modifiedThumbnailFileName, name, ownerId, tags, versions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelFile {\n"); + sb.append(" animationStyle: ").append(toIndentedString(animationStyle)).append("\n"); + sb.append(" extension: ").append(toIndentedString(extension)).append("\n"); + sb.append(" frames: ").append(toIndentedString(frames)).append("\n"); + sb.append(" framesOverTime: ").append(toIndentedString(framesOverTime)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" loopStyle: ").append(toIndentedString(loopStyle)).append("\n"); + sb.append(" maskTag: ").append(toIndentedString(maskTag)).append("\n"); + sb.append(" mimeType: ").append(toIndentedString(mimeType)).append("\n"); + sb.append(" modifiedThumbnailFileName: ").append(toIndentedString(modifiedThumbnailFileName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" versions: ").append(toIndentedString(versions)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ModelFile.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 `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 (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(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(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(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(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(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(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("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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModelFile.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModelFile' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModelFile.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModelFile value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModelFile read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 66546d03..6e199cfa 100644 --- a/src/main/java/io/github/vrchatapi/model/ModerateUserRequest.java +++ b/src/main/java/io/github/vrchatapi/model/ModerateUserRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,77 +13,95 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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) - private PlayerModerationType type = PlayerModerationType.SHOWAVATAR; + @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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -117,11 +135,103 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("moderated", "type")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ModerateUserRequest.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 `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 (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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ModerateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModerateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModerateUserRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModerateUserRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModerateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..91f98469 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ModerationReport.java @@ -0,0 +1,463 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * ModerationReport + */ +@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(@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 + public String getCategory() { + return category; + } + + public void setCategory(@javax.annotation.Nonnull String category) { + this.category = category; + } + + + public ModerationReport contentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + return this; + } + + /** + * Get contentId + * @return contentId + */ + @javax.annotation.Nonnull + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + public ModerationReport contentName(@javax.annotation.Nonnull String contentName) { + this.contentName = contentName; + return this; + } + + /** + * Get contentName + * @return contentName + */ + @javax.annotation.Nonnull + public String getContentName() { + return contentName; + } + + public void setContentName(@javax.annotation.Nonnull String contentName) { + this.contentName = contentName; + } + + + public ModerationReport contentThumbnailImageUrl(@javax.annotation.Nullable String contentThumbnailImageUrl) { + this.contentThumbnailImageUrl = contentThumbnailImageUrl; + return this; + } + + /** + * Get contentThumbnailImageUrl + * @return contentThumbnailImageUrl + */ + @javax.annotation.Nullable + public String getContentThumbnailImageUrl() { + return contentThumbnailImageUrl; + } + + public void setContentThumbnailImageUrl(@javax.annotation.Nullable String contentThumbnailImageUrl) { + this.contentThumbnailImageUrl = contentThumbnailImageUrl; + } + + + public ModerationReport description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * The subjective reason for the report + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public ModerationReport evidenceRequired(@javax.annotation.Nonnull Boolean evidenceRequired) { + this.evidenceRequired = evidenceRequired; + return this; + } + + /** + * Get evidenceRequired + * @return evidenceRequired + */ + @javax.annotation.Nonnull + public Boolean getEvidenceRequired() { + return evidenceRequired; + } + + public void setEvidenceRequired(@javax.annotation.Nonnull Boolean evidenceRequired) { + this.evidenceRequired = evidenceRequired; + } + + + public ModerationReport id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + 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 + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + } + + + public ModerationReport supportRequired(@javax.annotation.Nonnull Boolean supportRequired) { + this.supportRequired = supportRequired; + return this; + } + + /** + * Get supportRequired + * @return supportRequired + */ + @javax.annotation.Nonnull + public Boolean getSupportRequired() { + return supportRequired; + } + + public void setSupportRequired(@javax.annotation.Nonnull Boolean supportRequired) { + this.supportRequired = supportRequired; + } + + + 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 + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModerationReport moderationReport = (ModerationReport) o; + return Objects.equals(this.category, moderationReport.category) && + Objects.equals(this.contentId, moderationReport.contentId) && + Objects.equals(this.contentName, moderationReport.contentName) && + Objects.equals(this.contentThumbnailImageUrl, moderationReport.contentThumbnailImageUrl) && + Objects.equals(this.description, moderationReport.description) && + Objects.equals(this.evidenceRequired, moderationReport.evidenceRequired) && + Objects.equals(this.id, moderationReport.id) && + Objects.equals(this.reason, moderationReport.reason) && + Objects.equals(this.supportRequired, moderationReport.supportRequired) && + Objects.equals(this.type, moderationReport.type); + } + + @Override + public int hashCode() { + return Objects.hash(category, contentId, contentName, contentThumbnailImageUrl, description, evidenceRequired, id, reason, supportRequired, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModerationReport {\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" contentName: ").append(toIndentedString(contentName)).append("\n"); + sb.append(" contentThumbnailImageUrl: ").append(toIndentedString(contentThumbnailImageUrl)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" evidenceRequired: ").append(toIndentedString(evidenceRequired)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" supportRequired: ").append(toIndentedString(supportRequired)).append("\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("category", "contentId", "contentName", "contentThumbnailImageUrl", "description", "evidenceRequired", "id", "reason", "supportRequired", "type")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ModerationReport.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 `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 (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(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(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(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") != 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(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(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(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(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 (!ModerationReport.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ModerationReport' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ModerationReport.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ModerationReport value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ModerationReport read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..690ac3a7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/MutualFriend.java @@ -0,0 +1,480 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.UserStatus; +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; + +/** + * User object received when querying mutual friends + */ +@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) + @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(@javax.annotation.Nullable String avatarThumbnail) { + this.avatarThumbnail = avatarThumbnail; + return this; + } + + /** + * When profilePicOverride is not empty, use it instead. + * @return avatarThumbnail + */ + @javax.annotation.Nullable + public String getAvatarThumbnail() { + return avatarThumbnail; + } + + public void setAvatarThumbnail(@javax.annotation.Nullable String avatarThumbnail) { + this.avatarThumbnail = avatarThumbnail; + } + + + 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 + public String getCurrentAvatarImageUrl() { + return currentAvatarImageUrl; + } + + public void setCurrentAvatarImageUrl(@javax.annotation.Nonnull String currentAvatarImageUrl) { + this.currentAvatarImageUrl = currentAvatarImageUrl; + } + + + public MutualFriend currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + return this; + } + + public MutualFriend addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } + this.currentAvatarTags.add(currentAvatarTagsItem); + return this; + } + + /** + * Get currentAvatarTags + * @return currentAvatarTags + */ + @javax.annotation.Nullable + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + 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 + public String getCurrentAvatarThumbnailImageUrl() { + return currentAvatarThumbnailImageUrl; + } + + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + } + + + public MutualFriend displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public MutualFriend imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public MutualFriend profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + return this; + } + + /** + * Get profilePicOverride + * @return profilePicOverride + */ + @javax.annotation.Nullable + public String getProfilePicOverride() { + return profilePicOverride; + } + + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + } + + + public MutualFriend status(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nonnull + public UserStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull UserStatus status) { + this.status = status; + } + + + public MutualFriend statusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + return this; + } + + /** + * Get statusDescription + * @return statusDescription + */ + @javax.annotation.Nonnull + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(@javax.annotation.Nonnull String statusDescription) { + this.statusDescription = statusDescription; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MutualFriend mutualFriend = (MutualFriend) o; + return Objects.equals(this.avatarThumbnail, mutualFriend.avatarThumbnail) && + Objects.equals(this.currentAvatarImageUrl, mutualFriend.currentAvatarImageUrl) && + Objects.equals(this.currentAvatarTags, mutualFriend.currentAvatarTags) && + Objects.equals(this.currentAvatarThumbnailImageUrl, mutualFriend.currentAvatarThumbnailImageUrl) && + Objects.equals(this.displayName, mutualFriend.displayName) && + Objects.equals(this.id, mutualFriend.id) && + Objects.equals(this.imageUrl, mutualFriend.imageUrl) && + Objects.equals(this.profilePicOverride, mutualFriend.profilePicOverride) && + Objects.equals(this.status, mutualFriend.status) && + Objects.equals(this.statusDescription, mutualFriend.statusDescription); + } + + @Override + public int hashCode() { + return Objects.hash(avatarThumbnail, currentAvatarImageUrl, currentAvatarTags, currentAvatarThumbnailImageUrl, displayName, id, imageUrl, profilePicOverride, status, statusDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MutualFriend {\n"); + sb.append(" avatarThumbnail: ").append(toIndentedString(avatarThumbnail)).append("\n"); + sb.append(" currentAvatarImageUrl: ").append(toIndentedString(currentAvatarImageUrl)).append("\n"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); + sb.append(" currentAvatarThumbnailImageUrl: ").append(toIndentedString(currentAvatarThumbnailImageUrl)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).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("avatarThumbnail", "currentAvatarImageUrl", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "displayName", "id", "imageUrl", "profilePicOverride", "status", "statusDescription")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!MutualFriend.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 `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 (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(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(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").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(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(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(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(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(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(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 (!MutualFriend.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MutualFriend' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MutualFriend.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MutualFriend value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MutualFriend read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ad24535e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Mutuals.java @@ -0,0 +1,233 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Mutuals + */ +@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(@javax.annotation.Nonnull Integer friends) { + this.friends = friends; + return this; + } + + /** + * Get friends + * minimum: 0 + * @return friends + */ + @javax.annotation.Nonnull + public Integer getFriends() { + return friends; + } + + public void setFriends(@javax.annotation.Nonnull Integer friends) { + this.friends = friends; + } + + + public Mutuals groups(@javax.annotation.Nonnull Integer groups) { + this.groups = groups; + return this; + } + + /** + * Get groups + * minimum: 0 + * @return groups + */ + @javax.annotation.Nonnull + public Integer getGroups() { + return groups; + } + + public void setGroups(@javax.annotation.Nonnull Integer groups) { + this.groups = groups; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Mutuals mutuals = (Mutuals) o; + return Objects.equals(this.friends, mutuals.friends) && + Objects.equals(this.groups, mutuals.groups); + } + + @Override + public int hashCode() { + return Objects.hash(friends, groups); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Mutuals {\n"); + sb.append(" friends: ").append(toIndentedString(friends)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).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("friends", "groups")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Mutuals.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Mutuals.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Mutuals' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Mutuals.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Mutuals value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Mutuals read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 e224b4ba..fc86e416 100644 --- a/src/main/java/io/github/vrchatapi/model/Notification.java +++ b/src/main/java/io/github/vrchatapi/model/Notification.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,240 +13,269 @@ package io.github.vrchatapi.model; import 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 org.threeten.bp.OffsetDateTime; +import java.time.OffsetDateTime; +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; /** - * Notification + * */ -@javax.annotation.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, this is a json **encoded** object, meaning you have to json-de-encode to get the NotificationDetail object depending on the NotificationType. + /** + * **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: {}, NotificationDetailInvite, NotificationDetailInviteResponse, NotificationDetailRequestInvite, NotificationDetailRequestInviteResponse, NotificationDetailVoteToKick", required = true, value = "**NOTICE:** This is not a JSON object, 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; } - /** - * Get message + /** + * * @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 seen(Boolean seen) { - + 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 + public String getReceiverUserId() { + return receiverUserId; + } + + public void setReceiverUserId(@javax.annotation.Nullable String receiverUserId) { + this.receiverUserId = receiverUserId; + } + + + public Notification seen(@javax.annotation.Nullable Boolean seen) { this.seen = seen; return this; } - /** - * Get seen + /** + * Not included in notification objects received from the Websocket API * @return seen - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - + */ + @javax.annotation.Nullable 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; } - /** - * Get senderUsername + /** + * -| **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 - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -260,6 +289,7 @@ public boolean equals(Object o) { Objects.equals(this.details, notification.details) && Objects.equals(this.id, notification.id) && Objects.equals(this.message, notification.message) && + Objects.equals(this.receiverUserId, notification.receiverUserId) && Objects.equals(this.seen, notification.seen) && Objects.equals(this.senderUserId, notification.senderUserId) && Objects.equals(this.senderUsername, notification.senderUsername) && @@ -268,7 +298,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(createdAt, details, id, message, seen, senderUserId, senderUsername, type); + return Objects.hash(createdAt, details, id, message, receiverUserId, seen, senderUserId, senderUsername, type); } @Override @@ -279,6 +309,7 @@ public String toString() { sb.append(" details: ").append(toIndentedString(details)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" receiverUserId: ").append(toIndentedString(receiverUserId)).append("\n"); sb.append(" seen: ").append(toIndentedString(seen)).append("\n"); sb.append(" senderUserId: ").append(toIndentedString(senderUserId)).append("\n"); sb.append(" senderUsername: ").append(toIndentedString(senderUsername)).append("\n"); @@ -292,11 +323,118 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("created_at", "details", "id", "message", "receiverUserId", "seen", "senderUserId", "senderUsername", "type")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Notification.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 `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 (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(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(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(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(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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Notification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Notification' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Notification.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Notification value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Notification read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..78232f98 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailInvite.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * NotificationDetailInvite + */ +@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(@javax.annotation.Nullable String inviteMessage) { + this.inviteMessage = inviteMessage; + return this; + } + + /** + * Get inviteMessage + * @return inviteMessage + */ + @javax.annotation.Nullable + public String getInviteMessage() { + return inviteMessage; + } + + public void setInviteMessage(@javax.annotation.Nullable String inviteMessage) { + this.inviteMessage = inviteMessage; + } + + + 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 + public String getWorldId() { + return worldId; + } + + public void setWorldId(@javax.annotation.Nonnull String worldId) { + this.worldId = worldId; + } + + + public NotificationDetailInvite worldName(@javax.annotation.Nonnull String worldName) { + this.worldName = worldName; + return this; + } + + /** + * Get worldName + * @return worldName + */ + @javax.annotation.Nonnull + public String getWorldName() { + return worldName; + } + + public void setWorldName(@javax.annotation.Nonnull String worldName) { + this.worldName = worldName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationDetailInvite notificationDetailInvite = (NotificationDetailInvite) o; + return Objects.equals(this.inviteMessage, notificationDetailInvite.inviteMessage) && + Objects.equals(this.worldId, notificationDetailInvite.worldId) && + Objects.equals(this.worldName, notificationDetailInvite.worldName); + } + + @Override + public int hashCode() { + return Objects.hash(inviteMessage, worldId, worldName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationDetailInvite {\n"); + sb.append(" inviteMessage: ").append(toIndentedString(inviteMessage)).append("\n"); + sb.append(" worldId: ").append(toIndentedString(worldId)).append("\n"); + sb.append(" worldName: ").append(toIndentedString(worldName)).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("inviteMessage", "worldId", "worldName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationDetailInvite.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 `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 (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(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(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(java.util.Locale.ROOT, "Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationDetailInvite.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationDetailInvite' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailInvite.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationDetailInvite value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationDetailInvite read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..132ea252 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailInviteResponse.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * NotificationDetailInviteResponse + */ +@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(@javax.annotation.Nonnull String inResponseTo) { + this.inResponseTo = inResponseTo; + return this; + } + + /** + * Get inResponseTo + * @return inResponseTo + */ + @javax.annotation.Nonnull + public String getInResponseTo() { + return inResponseTo; + } + + public void setInResponseTo(@javax.annotation.Nonnull String inResponseTo) { + this.inResponseTo = inResponseTo; + } + + + public NotificationDetailInviteResponse responseMessage(@javax.annotation.Nonnull String responseMessage) { + this.responseMessage = responseMessage; + return this; + } + + /** + * Get responseMessage + * @return responseMessage + */ + @javax.annotation.Nonnull + public String getResponseMessage() { + return responseMessage; + } + + public void setResponseMessage(@javax.annotation.Nonnull String responseMessage) { + this.responseMessage = responseMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationDetailInviteResponse notificationDetailInviteResponse = (NotificationDetailInviteResponse) o; + return Objects.equals(this.inResponseTo, notificationDetailInviteResponse.inResponseTo) && + Objects.equals(this.responseMessage, notificationDetailInviteResponse.responseMessage); + } + + @Override + public int hashCode() { + return Objects.hash(inResponseTo, responseMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationDetailInviteResponse {\n"); + sb.append(" inResponseTo: ").append(toIndentedString(inResponseTo)).append("\n"); + sb.append(" responseMessage: ").append(toIndentedString(responseMessage)).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("inResponseTo", "responseMessage")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationDetailInviteResponse.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `responseMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseMessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationDetailInviteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationDetailInviteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailInviteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationDetailInviteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationDetailInviteResponse read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..b035c2db --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInvite.java @@ -0,0 +1,230 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * NotificationDetailRequestInvite + */ +@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(@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 NotificationDetailRequestInvite requestMessage(@javax.annotation.Nullable String requestMessage) { + this.requestMessage = requestMessage; + return this; + } + + /** + * Used when using InviteMessage Slot. + * @return requestMessage + */ + @javax.annotation.Nullable + public String getRequestMessage() { + return requestMessage; + } + + public void setRequestMessage(@javax.annotation.Nullable String requestMessage) { + this.requestMessage = requestMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationDetailRequestInvite notificationDetailRequestInvite = (NotificationDetailRequestInvite) o; + return Objects.equals(this.platform, notificationDetailRequestInvite.platform) && + Objects.equals(this.requestMessage, notificationDetailRequestInvite.requestMessage); + } + + @Override + public int hashCode() { + return Objects.hash(platform, requestMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationDetailRequestInvite {\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" requestMessage: ").append(toIndentedString(requestMessage)).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("platform", "requestMessage")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationDetailRequestInvite.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 `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(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(java.util.Locale.ROOT, "Expected the field `requestMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestMessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationDetailRequestInvite.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationDetailRequestInvite' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailRequestInvite.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationDetailRequestInvite value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationDetailRequestInvite read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..3f4bef89 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailRequestInviteResponse.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * NotificationDetailRequestInviteResponse + */ +@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(@javax.annotation.Nonnull String inResponseTo) { + this.inResponseTo = inResponseTo; + return this; + } + + /** + * Get inResponseTo + * @return inResponseTo + */ + @javax.annotation.Nonnull + public String getInResponseTo() { + return inResponseTo; + } + + public void setInResponseTo(@javax.annotation.Nonnull String inResponseTo) { + this.inResponseTo = inResponseTo; + } + + + public NotificationDetailRequestInviteResponse requestMessage(@javax.annotation.Nullable String requestMessage) { + this.requestMessage = requestMessage; + return this; + } + + /** + * Used when using InviteMessage Slot. + * @return requestMessage + */ + @javax.annotation.Nullable + public String getRequestMessage() { + return requestMessage; + } + + public void setRequestMessage(@javax.annotation.Nullable String requestMessage) { + this.requestMessage = requestMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationDetailRequestInviteResponse notificationDetailRequestInviteResponse = (NotificationDetailRequestInviteResponse) o; + return Objects.equals(this.inResponseTo, notificationDetailRequestInviteResponse.inResponseTo) && + Objects.equals(this.requestMessage, notificationDetailRequestInviteResponse.requestMessage); + } + + @Override + public int hashCode() { + return Objects.hash(inResponseTo, requestMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationDetailRequestInviteResponse {\n"); + sb.append(" inResponseTo: ").append(toIndentedString(inResponseTo)).append("\n"); + sb.append(" requestMessage: ").append(toIndentedString(requestMessage)).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("inResponseTo", "requestMessage")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationDetailRequestInviteResponse.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `requestMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestMessage").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationDetailRequestInviteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationDetailRequestInviteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailRequestInviteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationDetailRequestInviteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationDetailRequestInviteResponse read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..1a6256e5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationDetailVoteToKick.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * NotificationDetailVoteToKick + */ +@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(@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 + public String getInitiatorUserId() { + return initiatorUserId; + } + + public void setInitiatorUserId(@javax.annotation.Nonnull String initiatorUserId) { + this.initiatorUserId = initiatorUserId; + } + + + 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 + public String getUserToKickId() { + return userToKickId; + } + + public void setUserToKickId(@javax.annotation.Nonnull String userToKickId) { + this.userToKickId = userToKickId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationDetailVoteToKick notificationDetailVoteToKick = (NotificationDetailVoteToKick) o; + return Objects.equals(this.initiatorUserId, notificationDetailVoteToKick.initiatorUserId) && + Objects.equals(this.userToKickId, notificationDetailVoteToKick.userToKickId); + } + + @Override + public int hashCode() { + return Objects.hash(initiatorUserId, userToKickId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationDetailVoteToKick {\n"); + sb.append(" initiatorUserId: ").append(toIndentedString(initiatorUserId)).append("\n"); + sb.append(" userToKickId: ").append(toIndentedString(userToKickId)).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("initiatorUserId", "userToKickId")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationDetailVoteToKick.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `userToKickId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userToKickId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationDetailVoteToKick.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationDetailVoteToKick' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationDetailVoteToKick.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationDetailVoteToKick value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationDetailVoteToKick read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 4372e7a9..f41c077a 100644 --- a/src/main/java/io/github/vrchatapi/model/NotificationType.java +++ b/src/main/java/io/github/vrchatapi/model/NotificationType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,15 +28,19 @@ @JsonAdapter(NotificationType.Adapter.class) public enum NotificationType { - FRIENDREQUEST("friendRequest"), + BOOP("boop"), + + 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"); @@ -76,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 new file mode 100644 index 00000000..450279c5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2.java @@ -0,0 +1,1001 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.NotificationV2DetailsBoop; +import io.github.vrchatapi.model.NotificationV2Response; +import io.github.vrchatapi.model.NotificationV2Type; +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; +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; + +/** + * + */ +@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) + @javax.annotation.Nonnull + private Map data = new HashMap<>(); + + 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(@javax.annotation.Nonnull Boolean canDelete) { + this.canDelete = canDelete; + return this; + } + + /** + * Get canDelete + * @return canDelete + */ + @javax.annotation.Nonnull + public Boolean getCanDelete() { + return canDelete; + } + + public void setCanDelete(@javax.annotation.Nonnull Boolean canDelete) { + this.canDelete = canDelete; + } + + + public NotificationV2 category(@javax.annotation.Nonnull String category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @javax.annotation.Nonnull + public String getCategory() { + return category; + } + + public void setCategory(@javax.annotation.Nonnull String category) { + this.category = category; + } + + + public NotificationV2 createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public NotificationV2 data(@javax.annotation.Nonnull Map data) { + this.data = data; + return this; + } + + public NotificationV2 putDataItem(String key, String dataItem) { + if (this.data == null) { + this.data = new HashMap<>(); + } + this.data.put(key, dataItem); + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public Map getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull Map data) { + this.data = data; + } + + + public NotificationV2 details(@javax.annotation.Nullable NotificationV2DetailsBoop details) { + this.details = details; + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + public NotificationV2DetailsBoop getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable NotificationV2DetailsBoop details) { + this.details = details; + } + + + public NotificationV2 expiresAt(@javax.annotation.Nonnull OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Get expiresAt + * @return expiresAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + public void setExpiresAt(@javax.annotation.Nonnull OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + + public NotificationV2 expiryAfterSeen(@javax.annotation.Nullable Integer expiryAfterSeen) { + this.expiryAfterSeen = expiryAfterSeen; + return this; + } + + /** + * Get expiryAfterSeen + * @return expiryAfterSeen + */ + @javax.annotation.Nullable + public Integer getExpiryAfterSeen() { + return expiryAfterSeen; + } + + public void setExpiryAfterSeen(@javax.annotation.Nullable Integer expiryAfterSeen) { + this.expiryAfterSeen = expiryAfterSeen; + } + + + public NotificationV2 id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public NotificationV2 ignoreDND(@javax.annotation.Nonnull Boolean ignoreDND) { + this.ignoreDND = ignoreDND; + return this; + } + + /** + * Get ignoreDND + * @return ignoreDND + */ + @javax.annotation.Nonnull + public Boolean getIgnoreDND() { + return ignoreDND; + } + + public void setIgnoreDND(@javax.annotation.Nonnull Boolean ignoreDND) { + this.ignoreDND = ignoreDND; + } + + + public NotificationV2 imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public NotificationV2 isSystem(@javax.annotation.Nonnull Boolean isSystem) { + this.isSystem = isSystem; + return this; + } + + /** + * Get isSystem + * @return isSystem + */ + @javax.annotation.Nonnull + public Boolean getIsSystem() { + return isSystem; + } + + public void setIsSystem(@javax.annotation.Nonnull Boolean isSystem) { + this.isSystem = isSystem; + } + + + public NotificationV2 link(@javax.annotation.Nonnull String link) { + this.link = link; + return this; + } + + /** + * Get link + * @return link + */ + @javax.annotation.Nonnull + public String getLink() { + return link; + } + + public void setLink(@javax.annotation.Nonnull String link) { + this.link = link; + } + + + public NotificationV2 linkText(@javax.annotation.Nonnull String linkText) { + this.linkText = linkText; + return this; + } + + /** + * Get linkText + * @return linkText + */ + @javax.annotation.Nonnull + public String getLinkText() { + return linkText; + } + + public void setLinkText(@javax.annotation.Nonnull String linkText) { + this.linkText = linkText; + } + + + public NotificationV2 linkTextKey(@javax.annotation.Nullable String linkTextKey) { + this.linkTextKey = linkTextKey; + return this; + } + + /** + * Get linkTextKey + * @return linkTextKey + */ + @javax.annotation.Nullable + public String getLinkTextKey() { + return linkTextKey; + } + + public void setLinkTextKey(@javax.annotation.Nullable String linkTextKey) { + this.linkTextKey = linkTextKey; + } + + + public NotificationV2 message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + public NotificationV2 messageKey(@javax.annotation.Nullable String messageKey) { + this.messageKey = messageKey; + return this; + } + + /** + * Get messageKey + * @return messageKey + */ + @javax.annotation.Nullable + public String getMessageKey() { + return messageKey; + } + + public void setMessageKey(@javax.annotation.Nullable String messageKey) { + this.messageKey = messageKey; + } + + + 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 + public String getReceiverUserId() { + return receiverUserId; + } + + public void setReceiverUserId(@javax.annotation.Nonnull String receiverUserId) { + this.receiverUserId = receiverUserId; + } + + + public NotificationV2 relatedNotificationsId(@javax.annotation.Nullable String relatedNotificationsId) { + this.relatedNotificationsId = relatedNotificationsId; + return this; + } + + /** + * Get relatedNotificationsId + * @return relatedNotificationsId + */ + @javax.annotation.Nullable + public String getRelatedNotificationsId() { + return relatedNotificationsId; + } + + public void setRelatedNotificationsId(@javax.annotation.Nullable String relatedNotificationsId) { + this.relatedNotificationsId = relatedNotificationsId; + } + + + public NotificationV2 requireSeen(@javax.annotation.Nonnull Boolean requireSeen) { + this.requireSeen = requireSeen; + return this; + } + + /** + * Get requireSeen + * @return requireSeen + */ + @javax.annotation.Nonnull + public Boolean getRequireSeen() { + return requireSeen; + } + + public void setRequireSeen(@javax.annotation.Nonnull Boolean requireSeen) { + this.requireSeen = requireSeen; + } + + + 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 + public List getResponses() { + return responses; + } + + public void setResponses(@javax.annotation.Nonnull List responses) { + this.responses = responses; + } + + + public NotificationV2 seen(@javax.annotation.Nonnull Boolean seen) { + this.seen = seen; + return this; + } + + /** + * Get seen + * @return seen + */ + @javax.annotation.Nonnull + public Boolean getSeen() { + return seen; + } + + public void setSeen(@javax.annotation.Nonnull Boolean seen) { + this.seen = seen; + } + + + 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 + public String getSenderUserId() { + return senderUserId; + } + + public void setSenderUserId(@javax.annotation.Nonnull String senderUserId) { + this.senderUserId = senderUserId; + } + + + public NotificationV2 senderUsername(@javax.annotation.Nullable String senderUsername) { + this.senderUsername = senderUsername; + return this; + } + + /** + * Get senderUsername + * @return senderUsername + */ + @javax.annotation.Nullable + public String getSenderUsername() { + return senderUsername; + } + + public void setSenderUsername(@javax.annotation.Nullable String senderUsername) { + this.senderUsername = senderUsername; + } + + + public NotificationV2 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; + } + + + public NotificationV2 titleKey(@javax.annotation.Nullable String titleKey) { + this.titleKey = titleKey; + return this; + } + + /** + * Get titleKey + * @return titleKey + */ + @javax.annotation.Nullable + public String getTitleKey() { + return titleKey; + } + + public void setTitleKey(@javax.annotation.Nullable String titleKey) { + this.titleKey = titleKey; + } + + + public NotificationV2 type(@javax.annotation.Nonnull NotificationV2Type type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public NotificationV2Type getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull NotificationV2Type type) { + this.type = type; + } + + + public NotificationV2 updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public NotificationV2 version(@javax.annotation.Nonnull Integer version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @javax.annotation.Nonnull + public Integer getVersion() { + return version; + } + + public void setVersion(@javax.annotation.Nonnull Integer version) { + this.version = version; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2 notificationV2 = (NotificationV2) o; + return Objects.equals(this.canDelete, notificationV2.canDelete) && + Objects.equals(this.category, notificationV2.category) && + Objects.equals(this.createdAt, notificationV2.createdAt) && + Objects.equals(this.data, notificationV2.data) && + Objects.equals(this.details, notificationV2.details) && + Objects.equals(this.expiresAt, notificationV2.expiresAt) && + Objects.equals(this.expiryAfterSeen, notificationV2.expiryAfterSeen) && + Objects.equals(this.id, notificationV2.id) && + Objects.equals(this.ignoreDND, notificationV2.ignoreDND) && + Objects.equals(this.imageUrl, notificationV2.imageUrl) && + Objects.equals(this.isSystem, notificationV2.isSystem) && + Objects.equals(this.link, notificationV2.link) && + Objects.equals(this.linkText, notificationV2.linkText) && + Objects.equals(this.linkTextKey, notificationV2.linkTextKey) && + Objects.equals(this.message, notificationV2.message) && + Objects.equals(this.messageKey, notificationV2.messageKey) && + Objects.equals(this.receiverUserId, notificationV2.receiverUserId) && + Objects.equals(this.relatedNotificationsId, notificationV2.relatedNotificationsId) && + Objects.equals(this.requireSeen, notificationV2.requireSeen) && + Objects.equals(this.responses, notificationV2.responses) && + Objects.equals(this.seen, notificationV2.seen) && + Objects.equals(this.senderUserId, notificationV2.senderUserId) && + Objects.equals(this.senderUsername, notificationV2.senderUsername) && + Objects.equals(this.title, notificationV2.title) && + Objects.equals(this.titleKey, notificationV2.titleKey) && + Objects.equals(this.type, notificationV2.type) && + Objects.equals(this.updatedAt, notificationV2.updatedAt) && + Objects.equals(this.version, notificationV2.version); + } + + 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(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); + } + + 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 NotificationV2 {\n"); + sb.append(" canDelete: ").append(toIndentedString(canDelete)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" expiryAfterSeen: ").append(toIndentedString(expiryAfterSeen)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ignoreDND: ").append(toIndentedString(ignoreDND)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" isSystem: ").append(toIndentedString(isSystem)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" linkText: ").append(toIndentedString(linkText)).append("\n"); + sb.append(" linkTextKey: ").append(toIndentedString(linkTextKey)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" messageKey: ").append(toIndentedString(messageKey)).append("\n"); + sb.append(" receiverUserId: ").append(toIndentedString(receiverUserId)).append("\n"); + sb.append(" relatedNotificationsId: ").append(toIndentedString(relatedNotificationsId)).append("\n"); + sb.append(" requireSeen: ").append(toIndentedString(requireSeen)).append("\n"); + sb.append(" responses: ").append(toIndentedString(responses)).append("\n"); + sb.append(" seen: ").append(toIndentedString(seen)).append("\n"); + sb.append(" senderUserId: ").append(toIndentedString(senderUserId)).append("\n"); + sb.append(" senderUsername: ").append(toIndentedString(senderUsername)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" titleKey: ").append(toIndentedString(titleKey)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2.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 `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 (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(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 optional field `details` + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + NotificationV2DetailsBoop.validateJsonElement(jsonObj.get("details")); + } + if (!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("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(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(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") != 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(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(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(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") != 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())); + } + 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)); + } + } + if (!jsonObj.get("senderUserId").isJsonPrimitive()) { + 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(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(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") != 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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NotificationV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2 read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..b02b74b9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2DetailsBoop.java @@ -0,0 +1,263 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 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(@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 + public String getEmojiId() { + return emojiId; + } + + public void setEmojiId(@javax.annotation.Nonnull String emojiId) { + this.emojiId = emojiId; + } + + + public NotificationV2DetailsBoop 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 NotificationV2DetailsBoop inventoryItemId(@javax.annotation.Nonnull String inventoryItemId) { + this.inventoryItemId = inventoryItemId; + return this; + } + + /** + * Get inventoryItemId + * @return inventoryItemId + */ + @javax.annotation.Nonnull + public String getInventoryItemId() { + return inventoryItemId; + } + + public void setInventoryItemId(@javax.annotation.Nonnull String inventoryItemId) { + this.inventoryItemId = inventoryItemId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2DetailsBoop notificationV2DetailsBoop = (NotificationV2DetailsBoop) o; + return Objects.equals(this.emojiId, notificationV2DetailsBoop.emojiId) && + Objects.equals(this.emojiVersion, notificationV2DetailsBoop.emojiVersion) && + Objects.equals(this.inventoryItemId, notificationV2DetailsBoop.inventoryItemId); + } + + @Override + public int hashCode() { + return Objects.hash(emojiId, emojiVersion, inventoryItemId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2DetailsBoop {\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(Arrays.asList("emojiId", "emojiVersion", "inventoryItemId")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2DetailsBoop.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 `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 (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(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(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 (!NotificationV2DetailsBoop.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2DetailsBoop' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2DetailsBoop.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2DetailsBoop value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2DetailsBoop read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..5dac05e8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2Response.java @@ -0,0 +1,324 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * NotificationV2Response + */ +@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(@javax.annotation.Nonnull String data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public String getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull String data) { + this.data = data; + } + + + public NotificationV2Response icon(@javax.annotation.Nonnull String icon) { + this.icon = icon; + return this; + } + + /** + * Get icon + * @return icon + */ + @javax.annotation.Nonnull + public String getIcon() { + return icon; + } + + public void setIcon(@javax.annotation.Nonnull String icon) { + this.icon = icon; + } + + + public NotificationV2Response text(@javax.annotation.Nonnull String text) { + this.text = text; + return this; + } + + /** + * Get text + * @return text + */ + @javax.annotation.Nonnull + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nonnull String text) { + this.text = text; + } + + + public NotificationV2Response textKey(@javax.annotation.Nullable String textKey) { + this.textKey = textKey; + return this; + } + + /** + * Get textKey + * @return textKey + */ + @javax.annotation.Nullable + public String getTextKey() { + return textKey; + } + + public void setTextKey(@javax.annotation.Nullable String textKey) { + this.textKey = textKey; + } + + + public NotificationV2Response type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationV2Response notificationV2Response = (NotificationV2Response) o; + return Objects.equals(this.data, notificationV2Response.data) && + Objects.equals(this.icon, notificationV2Response.icon) && + Objects.equals(this.text, notificationV2Response.text) && + Objects.equals(this.textKey, notificationV2Response.textKey) && + Objects.equals(this.type, notificationV2Response.type); + } + + @Override + public int hashCode() { + return Objects.hash(data, icon, text, textKey, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationV2Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" textKey: ").append(toIndentedString(textKey)).append("\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("data", "icon", "text", "textKey", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("data", "icon", "text", "textKey", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NotificationV2Response.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 `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 (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(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(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(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") != 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(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 (!NotificationV2Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NotificationV2Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NotificationV2Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NotificationV2Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NotificationV2Response read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..5ed4e443 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/NotificationV2Type.java @@ -0,0 +1,119 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 NotificationV2Type + */ +@JsonAdapter(NotificationV2Type.Adapter.class) +public enum NotificationV2Type { + + AVATARREVIEW_FAILURE("avatarreview.failure"), + + AVATARREVIEW_SUCCESS("avatarreview.success"), + + BADGE_EARNED("badge.earned"), + + BOOP("boop"), + + ECONOMY_ALERT("economy.alert"), + + ECONOMY_RECEIVED_GIFT("economy.received.gift"), + + EVENT_ANNOUNCEMENT("event.announcement"), + + GROUP_ANNOUNCEMENT("group.announcement"), + + GROUP_EVENT_CREATED("group.event.created"), + + GROUP_EVENT_STARTING("group.event.starting"), + + GROUP_INFORMATIVE("group.informative"), + + GROUP_INVITE("group.invite"), + + GROUP_JOIN_REQUEST("group.joinRequest"), + + GROUP_POST("group.post"), + + GROUP_TRANSFER("group.transfer"), + + INVITE_INSTANCE_CONTENT_GATED("invite.instance.contentGated"), + + MODERATION_CONTENTRESTRICTION("moderation.contentrestriction"), + + MODERATION_NOTICE("moderation.notice"), + + MODERATION_REPORT_CLOSED("moderation.report.closed"), + + MODERATION_WARNING_GROUP("moderation.warning.group"), + + PROMO_REDEEM("promo.redeem"), + + TEXT_ADVENTURE("text.adventure"), + + VRCPLUS_GIFT("vrcplus.gift"); + + private String value; + + NotificationV2Type(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static NotificationV2Type fromValue(String value) { + for (NotificationV2Type b : NotificationV2Type.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 NotificationV2Type enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public NotificationV2Type read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..44f70d0f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/OkStatus.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * 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", 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(@javax.annotation.Nonnull String ok) { + this.ok = ok; + return this; + } + + /** + * The actual status itself + * @return ok + */ + @javax.annotation.Nonnull + public String getOk() { + return ok; + } + + public void setOk(@javax.annotation.Nonnull String ok) { + this.ok = ok; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OkStatus okStatus = (OkStatus) o; + return Objects.equals(this.ok, okStatus.ok); + } + + @Override + public int hashCode() { + return Objects.hash(ok); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OkStatus {\n"); + sb.append(" ok: ").append(toIndentedString(ok)).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("ok")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ok")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OkStatus.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 `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 (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(java.util.Locale.ROOT, "Expected the field `ok` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ok").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OkStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OkStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OkStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OkStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OkStatus read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..27be5109 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/OkStatus2.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * 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", 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(@javax.annotation.Nonnull String OK) { + this.OK = OK; + return this; + } + + /** + * The actual status itself + * @return OK + */ + @javax.annotation.Nonnull + public String getOK() { + return OK; + } + + public void setOK(@javax.annotation.Nonnull String OK) { + this.OK = OK; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OkStatus2 okStatus2 = (OkStatus2) o; + return Objects.equals(this.OK, okStatus2.OK); + } + + @Override + public int hashCode() { + return Objects.hash(OK); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OkStatus2 {\n"); + sb.append(" OK: ").append(toIndentedString(OK)).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("OK")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("OK")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OkStatus2.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 `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 (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(java.util.Locale.ROOT, "Expected the field `OK` to be a primitive type in the JSON string but got `%s`", jsonObj.get("OK").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OkStatus2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OkStatus2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OkStatus2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OkStatus2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OkStatus2 read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ab46e5a0 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/OrderOption.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 OrderOption + */ +@JsonAdapter(OrderOption.Adapter.class) +public enum OrderOption { + + ASCENDING("ascending"), + + DESCENDING("descending"); + + private String value; + + OrderOption(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderOption fromValue(String value) { + for (OrderOption b : OrderOption.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 OrderOption enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderOption read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..2f21c33a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/OrderOptionShort.java @@ -0,0 +1,77 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 OrderOptionShort + */ +@JsonAdapter(OrderOptionShort.Adapter.class) +public enum OrderOptionShort { + + ASC("asc"), + + DESC("desc"); + + private String value; + + OrderOptionShort(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderOptionShort fromValue(String value) { + for (OrderOptionShort b : OrderOptionShort.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 OrderOptionShort enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderOptionShort read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..894b7e2a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PaginatedCalendarEventList.java @@ -0,0 +1,275 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.CalendarEvent; +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; + +/** + * An offset-based list of CalendarEvents + */ +@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) + @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(@javax.annotation.Nullable Boolean hasNext) { + this.hasNext = hasNext; + return this; + } + + /** + * Whether there are more results after this page. + * @return hasNext + */ + @javax.annotation.Nullable + public Boolean getHasNext() { + return hasNext; + } + + public void setHasNext(@javax.annotation.Nullable Boolean hasNext) { + this.hasNext = hasNext; + } + + + public PaginatedCalendarEventList results(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public PaginatedCalendarEventList addResultsItem(CalendarEvent resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * + * @return results + */ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + + 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 + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(@javax.annotation.Nullable Integer totalCount) { + this.totalCount = totalCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginatedCalendarEventList paginatedCalendarEventList = (PaginatedCalendarEventList) o; + return Objects.equals(this.hasNext, paginatedCalendarEventList.hasNext) && + Objects.equals(this.results, paginatedCalendarEventList.results) && + Objects.equals(this.totalCount, paginatedCalendarEventList.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(hasNext, results, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaginatedCalendarEventList {\n"); + sb.append(" hasNext: ").append(toIndentedString(hasNext)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).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("hasNext", "results", "totalCount")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PaginatedCalendarEventList.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 `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(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.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PaginatedCalendarEventList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PaginatedCalendarEventList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PaginatedCalendarEventList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PaginatedCalendarEventList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PaginatedCalendarEventList read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ffe8c2b7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PaginatedGroupAuditLogEntryList.java @@ -0,0 +1,275 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupAuditLogEntry; +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; + +/** + * PaginatedGroupAuditLogEntryList + */ +@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) + @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(@javax.annotation.Nullable Boolean hasNext) { + this.hasNext = hasNext; + return this; + } + + /** + * Whether there are more results after this page. + * @return hasNext + */ + @javax.annotation.Nullable + public Boolean getHasNext() { + return hasNext; + } + + public void setHasNext(@javax.annotation.Nullable Boolean hasNext) { + this.hasNext = hasNext; + } + + + public PaginatedGroupAuditLogEntryList results(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public PaginatedGroupAuditLogEntryList addResultsItem(GroupAuditLogEntry resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * + * @return results + */ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + + 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 + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(@javax.annotation.Nullable Integer totalCount) { + this.totalCount = totalCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginatedGroupAuditLogEntryList paginatedGroupAuditLogEntryList = (PaginatedGroupAuditLogEntryList) o; + return Objects.equals(this.hasNext, paginatedGroupAuditLogEntryList.hasNext) && + Objects.equals(this.results, paginatedGroupAuditLogEntryList.results) && + Objects.equals(this.totalCount, paginatedGroupAuditLogEntryList.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(hasNext, results, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaginatedGroupAuditLogEntryList {\n"); + sb.append(" hasNext: ").append(toIndentedString(hasNext)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).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("hasNext", "results", "totalCount")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PaginatedGroupAuditLogEntryList.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 `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(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.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PaginatedGroupAuditLogEntryList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PaginatedGroupAuditLogEntryList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PaginatedGroupAuditLogEntryList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PaginatedGroupAuditLogEntryList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PaginatedGroupAuditLogEntryList read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..4a2465da --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PaginatedModerationReportList.java @@ -0,0 +1,275 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ModerationReport; +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; + +/** + * PaginatedModerationReportList + */ +@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) + @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(@javax.annotation.Nullable Boolean hasNext) { + this.hasNext = hasNext; + return this; + } + + /** + * Whether there are more results after this page. + * @return hasNext + */ + @javax.annotation.Nullable + public Boolean getHasNext() { + return hasNext; + } + + public void setHasNext(@javax.annotation.Nullable Boolean hasNext) { + this.hasNext = hasNext; + } + + + public PaginatedModerationReportList results(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public PaginatedModerationReportList addResultsItem(ModerationReport resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * The list of moderation reports. + * @return results + */ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + + 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 + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(@javax.annotation.Nullable Integer totalCount) { + this.totalCount = totalCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginatedModerationReportList paginatedModerationReportList = (PaginatedModerationReportList) o; + return Objects.equals(this.hasNext, paginatedModerationReportList.hasNext) && + Objects.equals(this.results, paginatedModerationReportList.results) && + Objects.equals(this.totalCount, paginatedModerationReportList.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(hasNext, results, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaginatedModerationReportList {\n"); + sb.append(" hasNext: ").append(toIndentedString(hasNext)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).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("hasNext", "results", "totalCount")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PaginatedModerationReportList.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 `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(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.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PaginatedModerationReportList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PaginatedModerationReportList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PaginatedModerationReportList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PaginatedModerationReportList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PaginatedModerationReportList read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 da24a53d..0cc9cbd0 100644 --- a/src/main/java/io/github/vrchatapi/model/PastDisplayName.java +++ b/src/main/java/io/github/vrchatapi/model/PastDisplayName.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,77 +13,95 @@ package io.github.vrchatapi.model; import 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 org.threeten.bp.OffsetDateTime; +import java.time.OffsetDateTime; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -117,11 +135,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("displayName", "updated_at")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PastDisplayName.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 `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 (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(java.util.Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PastDisplayName.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PastDisplayName' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PastDisplayName.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PastDisplayName value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PastDisplayName read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..9ed720ef --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Pending2FAResult.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Pending2FAResult + */ +@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(@javax.annotation.Nonnull String qrCodeDataUrl) { + this.qrCodeDataUrl = qrCodeDataUrl; + return this; + } + + /** + * Get qrCodeDataUrl + * @return qrCodeDataUrl + */ + @javax.annotation.Nonnull + public String getQrCodeDataUrl() { + return qrCodeDataUrl; + } + + public void setQrCodeDataUrl(@javax.annotation.Nonnull String qrCodeDataUrl) { + this.qrCodeDataUrl = qrCodeDataUrl; + } + + + public Pending2FAResult secret(@javax.annotation.Nonnull String secret) { + this.secret = secret; + return this; + } + + /** + * Get secret + * @return secret + */ + @javax.annotation.Nonnull + public String getSecret() { + return secret; + } + + public void setSecret(@javax.annotation.Nonnull String secret) { + this.secret = secret; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pending2FAResult pending2FAResult = (Pending2FAResult) o; + return Objects.equals(this.qrCodeDataUrl, pending2FAResult.qrCodeDataUrl) && + Objects.equals(this.secret, pending2FAResult.secret); + } + + @Override + public int hashCode() { + return Objects.hash(qrCodeDataUrl, secret); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pending2FAResult {\n"); + sb.append(" qrCodeDataUrl: ").append(toIndentedString(qrCodeDataUrl)).append("\n"); + sb.append(" secret: ").append(toIndentedString(secret)).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("qrCodeDataUrl", "secret")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Pending2FAResult.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Pending2FAResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Pending2FAResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Pending2FAResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Pending2FAResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Pending2FAResult read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..16ee97cf --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PerformanceLimiterInfo.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Info about the performance limits on a platform + */ +@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(@javax.annotation.Nonnull Integer maxSeats) { + this.maxSeats = maxSeats; + return this; + } + + /** + * Maximum amount of seats. -1 means no limit. + * @return maxSeats + */ + @javax.annotation.Nonnull + public Integer getMaxSeats() { + return maxSeats; + } + + public void setMaxSeats(@javax.annotation.Nonnull Integer maxSeats) { + this.maxSeats = maxSeats; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceLimiterInfo performanceLimiterInfo = (PerformanceLimiterInfo) o; + return Objects.equals(this.maxSeats, performanceLimiterInfo.maxSeats); + } + + @Override + public int hashCode() { + return Objects.hash(maxSeats); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceLimiterInfo {\n"); + sb.append(" maxSeats: ").append(toIndentedString(maxSeats)).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("maxSeats")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("maxSeats")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PerformanceLimiterInfo.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PerformanceLimiterInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PerformanceLimiterInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PerformanceLimiterInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PerformanceLimiterInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PerformanceLimiterInfo read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..df7504cc --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PerformanceRatings.java @@ -0,0 +1,85 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Avatar Performance ratings. + */ +@JsonAdapter(PerformanceRatings.Adapter.class) +public enum PerformanceRatings { + + EXCELLENT("Excellent"), + + GOOD("Good"), + + MEDIUM("Medium"), + + NONE("None"), + + POOR("Poor"), + + VERY_POOR("VeryPoor"); + + private String value; + + PerformanceRatings(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PerformanceRatings fromValue(String value) { + for (PerformanceRatings b : PerformanceRatings.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 PerformanceRatings enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PerformanceRatings read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 60822b27..caad6a6c 100644 --- a/src/main/java/io/github/vrchatapi/model/Permission.java +++ b/src/main/java/io/github/vrchatapi/model/Permission.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,130 +13,239 @@ package io.github.vrchatapi.model; import 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 io.github.vrchatapi.model.PermissionData; +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; + /** - * 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 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_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private Object data; + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public Permission() { + } + public Permission data(@javax.annotation.Nullable PermissionData data) { + this.data = data; + return this; + } - public Permission id(String id) { - + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public PermissionData getData() { + return data; + } + + public void setData(@javax.annotation.Nullable PermissionData data) { + this.data = data; + } + + + public Permission description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public Permission 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 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 ownerId(String ownerId) { - + public Permission ownerDisplayName(@javax.annotation.Nonnull String ownerDisplayName) { + this.ownerDisplayName = ownerDisplayName; + return this; + } + + /** + * Get ownerDisplayName + * @return ownerDisplayName + */ + @javax.annotation.Nonnull + public String getOwnerDisplayName() { + return ownerDisplayName; + } + + public void setOwnerDisplayName(@javax.annotation.Nonnull String ownerDisplayName) { + this.ownerDisplayName = ownerDisplayName; + } + + + 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 data(Object data) { - - this.data = data; + public Permission type(@javax.annotation.Nullable String type) { + this.type = type; return this; } - /** - * Get data - * @return data - **/ + /** + * Get type + * @return type + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getData() { - return data; + public String getType() { + return type; } - - public void setData(Object data) { - this.data = data; + public void setType(@javax.annotation.Nullable String type) { + this.type = type; } + @Override public boolean equals(Object o) { if (this == o) { @@ -146,25 +255,33 @@ public boolean equals(Object o) { return false; } Permission permission = (Permission) o; - return Objects.equals(this.id, permission.id) && + return Objects.equals(this.data, permission.data) && + Objects.equals(this.description, permission.description) && + Objects.equals(this.displayName, permission.displayName) && + Objects.equals(this.id, permission.id) && Objects.equals(this.name, permission.name) && + Objects.equals(this.ownerDisplayName, permission.ownerDisplayName) && Objects.equals(this.ownerId, permission.ownerId) && - Objects.equals(this.data, permission.data); + Objects.equals(this.type, permission.type); } @Override public int hashCode() { - return Objects.hash(id, name, ownerId, data); + return Objects.hash(data, description, displayName, id, name, ownerDisplayName, ownerId, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Permission {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" ownerDisplayName: ").append(toIndentedString(ownerDisplayName)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } @@ -174,11 +291,123 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("data", "description", "displayName", "id", "name", "ownerDisplayName", "ownerId", "type")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Permission.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 `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 (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.validateJsonElement(jsonObj.get("data")); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + 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(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(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(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(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(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(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 (!Permission.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Permission' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Permission.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Permission value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Permission read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..0ae1fc8a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PermissionData.java @@ -0,0 +1,346 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ArrayList; +import java.util.Arrays; +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.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; + +/** + * Specific values afforded the user by this permission + */ +@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) + @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) + @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) + @javax.annotation.Nullable + private Map maxFavoritesPerGroup = new HashMap<>(); + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public PermissionData() { + } + + public PermissionData badges(@javax.annotation.Nullable List badges) { + this.badges = badges; + return this; + } + + public PermissionData addBadgesItem(String badgesItem) { + if (this.badges == null) { + this.badges = new ArrayList<>(); + } + this.badges.add(badgesItem); + return this; + } + + /** + * Badges afforded the user by this permission + * @return badges + */ + @javax.annotation.Nullable + public List getBadges() { + return badges; + } + + public void setBadges(@javax.annotation.Nullable List badges) { + this.badges = badges; + } + + + 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 + public Integer getMax() { + return max; + } + + public void setMax(@javax.annotation.Nullable Integer max) { + this.max = max; + } + + + public PermissionData maxFavoriteGroups(@javax.annotation.Nullable Map maxFavoriteGroups) { + this.maxFavoriteGroups = maxFavoriteGroups; + return this; + } + + public PermissionData putMaxFavoriteGroupsItem(String key, Integer maxFavoriteGroupsItem) { + if (this.maxFavoriteGroups == null) { + this.maxFavoriteGroups = new HashMap<>(); + } + this.maxFavoriteGroups.put(key, maxFavoriteGroupsItem); + return this; + } + + /** + * Maximum favorite groups afforded the user by this permission + * @return maxFavoriteGroups + */ + @javax.annotation.Nullable + public Map getMaxFavoriteGroups() { + return maxFavoriteGroups; + } + + public void setMaxFavoriteGroups(@javax.annotation.Nullable Map maxFavoriteGroups) { + this.maxFavoriteGroups = maxFavoriteGroups; + } + + + public PermissionData maxFavoritesPerGroup(@javax.annotation.Nullable Map maxFavoritesPerGroup) { + this.maxFavoritesPerGroup = maxFavoritesPerGroup; + return this; + } + + public PermissionData putMaxFavoritesPerGroupItem(String key, Integer maxFavoritesPerGroupItem) { + if (this.maxFavoritesPerGroup == null) { + this.maxFavoritesPerGroup = new HashMap<>(); + } + this.maxFavoritesPerGroup.put(key, maxFavoritesPerGroupItem); + return this; + } + + /** + * Maximum favorites per group afforded the user by this permission + * @return maxFavoritesPerGroup + */ + @javax.annotation.Nullable + public Map getMaxFavoritesPerGroup() { + return maxFavoritesPerGroup; + } + + public void setMaxFavoritesPerGroup(@javax.annotation.Nullable Map maxFavoritesPerGroup) { + this.maxFavoritesPerGroup = maxFavoritesPerGroup; + } + + + public PermissionData tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public PermissionData addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags afforded the user by this permission + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionData permissionData = (PermissionData) o; + return Objects.equals(this.badges, permissionData.badges) && + Objects.equals(this.max, permissionData.max) && + Objects.equals(this.maxFavoriteGroups, permissionData.maxFavoriteGroups) && + Objects.equals(this.maxFavoritesPerGroup, permissionData.maxFavoritesPerGroup) && + Objects.equals(this.tags, permissionData.tags); + } + + @Override + public int hashCode() { + return Objects.hash(badges, max, maxFavoriteGroups, maxFavoritesPerGroup, tags); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PermissionData {\n"); + sb.append(" badges: ").append(toIndentedString(badges)).append("\n"); + sb.append(" max: ").append(toIndentedString(max)).append("\n"); + sb.append(" maxFavoriteGroups: ").append(toIndentedString(maxFavoriteGroups)).append("\n"); + sb.append(" maxFavoritesPerGroup: ").append(toIndentedString(maxFavoritesPerGroup)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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("badges", "max", "maxFavoriteGroups", "maxFavoritesPerGroup", "tags")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PermissionData.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 `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").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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PermissionData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PermissionData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PermissionData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PermissionData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PermissionData read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..98c12e9f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PlatformBuildInfo.java @@ -0,0 +1,234 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Build information for a platform + */ +@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(@javax.annotation.Nonnull Integer minBuildNumber) { + this.minBuildNumber = minBuildNumber; + return this; + } + + /** + * Minimum build number required for the platform + * @return minBuildNumber + */ + @javax.annotation.Nonnull + public Integer getMinBuildNumber() { + return minBuildNumber; + } + + public void setMinBuildNumber(@javax.annotation.Nonnull Integer minBuildNumber) { + this.minBuildNumber = minBuildNumber; + } + + + public PlatformBuildInfo redirectionAddress(@javax.annotation.Nullable String redirectionAddress) { + this.redirectionAddress = redirectionAddress; + return this; + } + + /** + * Redirection URL for updating the app + * @return redirectionAddress + */ + @javax.annotation.Nullable + public String getRedirectionAddress() { + return redirectionAddress; + } + + public void setRedirectionAddress(@javax.annotation.Nullable String redirectionAddress) { + this.redirectionAddress = redirectionAddress; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformBuildInfo platformBuildInfo = (PlatformBuildInfo) o; + return Objects.equals(this.minBuildNumber, platformBuildInfo.minBuildNumber) && + Objects.equals(this.redirectionAddress, platformBuildInfo.redirectionAddress); + } + + @Override + public int hashCode() { + return Objects.hash(minBuildNumber, redirectionAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlatformBuildInfo {\n"); + sb.append(" minBuildNumber: ").append(toIndentedString(minBuildNumber)).append("\n"); + sb.append(" redirectionAddress: ").append(toIndentedString(redirectionAddress)).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("minBuildNumber", "redirectionAddress")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PlatformBuildInfo.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 `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 (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(java.util.Locale.ROOT, "Expected the field `redirectionAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectionAddress").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PlatformBuildInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PlatformBuildInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PlatformBuildInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PlatformBuildInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PlatformBuildInfo read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 ca3d9ee0..f6771f31 100644 --- a/src/main/java/io/github/vrchatapi/model/PlayerModeration.java +++ b/src/main/java/io/github/vrchatapi/model/PlayerModeration.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,213 +13,216 @@ package io.github.vrchatapi.model; import 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 org.threeten.bp.OffsetDateTime; +import java.time.OffsetDateTime; +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; /** * 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) - private PlayerModerationType type = PlayerModerationType.SHOWAVATAR; + @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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -263,11 +266,115 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("created", "id", "sourceDisplayName", "sourceUserId", "targetDisplayName", "targetUserId", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("created", "id", "sourceDisplayName", "sourceUserId", "targetDisplayName", "targetUserId", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PlayerModeration.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 `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 (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(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(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(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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PlayerModeration.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PlayerModeration' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PlayerModeration.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PlayerModeration value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PlayerModeration read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 df678f8c..4f08ac2b 100644 --- a/src/main/java/io/github/vrchatapi/model/PlayerModerationType.java +++ b/src/main/java/io/github/vrchatapi/model/PlayerModerationType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,17 +28,23 @@ @JsonAdapter(PlayerModerationType.Adapter.class) public enum PlayerModerationType { - MUTE("mute"), + BLOCK("block"), - UNMUTE("unmute"), + HIDE_AVATAR("hideAvatar"), - BLOCK("block"), + INTERACT_OFF("interactOff"), + + INTERACT_ON("interactOn"), - UNBLOCK("unblock"), + MUTE("mute"), - HIDEAVATAR("hideAvatar"), + MUTE_CHAT("muteChat"), - SHOWAVATAR("showAvatar"); + SHOW_AVATAR("showAvatar"), + + UNMUTE("unmute"), + + UNMUTE_CHAT("unmuteChat"); private String value; @@ -76,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 new file mode 100644 index 00000000..c69dc1fd --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Print.java @@ -0,0 +1,464 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.PrintFiles; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * Info about a print + */ +@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(@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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nonnull String authorId) { + this.authorId = authorId; + } + + + public Print authorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Get authorName + * @return authorName + */ + @javax.annotation.Nonnull + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + } + + + public Print createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public Print files(@javax.annotation.Nonnull PrintFiles files) { + this.files = files; + return this; + } + + /** + * Get files + * @return files + */ + @javax.annotation.Nonnull + public PrintFiles getFiles() { + return files; + } + + public void setFiles(@javax.annotation.Nonnull PrintFiles files) { + this.files = files; + } + + + public Print id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Print note(@javax.annotation.Nonnull String note) { + this.note = note; + return this; + } + + /** + * Get note + * @return note + */ + @javax.annotation.Nonnull + public String getNote() { + return note; + } + + public void setNote(@javax.annotation.Nonnull String note) { + this.note = note; + } + + + 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 + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public Print timestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get timestamp + * @return timestamp + */ + @javax.annotation.Nonnull + public OffsetDateTime getTimestamp() { + return timestamp; + } + + public void setTimestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + + 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 + public String getWorldId() { + return worldId; + } + + public void setWorldId(@javax.annotation.Nonnull String worldId) { + this.worldId = worldId; + } + + + public Print worldName(@javax.annotation.Nonnull String worldName) { + this.worldName = worldName; + return this; + } + + /** + * Get worldName + * @return worldName + */ + @javax.annotation.Nonnull + public String getWorldName() { + return worldName; + } + + public void setWorldName(@javax.annotation.Nonnull String worldName) { + this.worldName = worldName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Print print = (Print) o; + return Objects.equals(this.authorId, print.authorId) && + Objects.equals(this.authorName, print.authorName) && + Objects.equals(this.createdAt, print.createdAt) && + Objects.equals(this.files, print.files) && + Objects.equals(this.id, print.id) && + Objects.equals(this.note, print.note) && + Objects.equals(this.ownerId, print.ownerId) && + Objects.equals(this.timestamp, print.timestamp) && + Objects.equals(this.worldId, print.worldId) && + Objects.equals(this.worldName, print.worldName); + } + + @Override + public int hashCode() { + return Objects.hash(authorId, authorName, createdAt, files, id, note, ownerId, timestamp, worldId, worldName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Print {\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" worldId: ").append(toIndentedString(worldId)).append("\n"); + sb.append(" worldName: ").append(toIndentedString(worldName)).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("authorId", "authorName", "createdAt", "files", "id", "note", "ownerId", "timestamp", "worldId", "worldName")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Print.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 `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 (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(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(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.validateJsonElement(jsonObj.get("files")); + if (!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").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())); + } + if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !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("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())); + } + if (!jsonObj.get("worldName").isJsonPrimitive()) { + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Print.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Print' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Print.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Print value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Print read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..3d1ab68c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PrintFiles.java @@ -0,0 +1,230 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * PrintFiles + */ +@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(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + */ + @javax.annotation.Nullable + public String getFileId() { + return fileId; + } + + public void setFileId(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + } + + + 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 + public String getImage() { + return image; + } + + public void setImage(@javax.annotation.Nullable String image) { + this.image = image; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrintFiles printFiles = (PrintFiles) o; + return Objects.equals(this.fileId, printFiles.fileId) && + Objects.equals(this.image, printFiles.image); + } + + @Override + public int hashCode() { + return Objects.hash(fileId, image); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrintFiles {\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).append("\n"); + sb.append(" image: ").append(toIndentedString(image)).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("fileId", "image")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrintFiles.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 `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(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(java.util.Locale.ROOT, "Expected the field `image` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrintFiles.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrintFiles' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrintFiles.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrintFiles value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrintFiles read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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..06919d86 --- /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 + * 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..42e3d416 --- /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 + * 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 new file mode 100644 index 00000000..06e4f4ac --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Product.java @@ -0,0 +1,801 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductType; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * Product + */ +@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(@javax.annotation.Nullable Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Get archived + * @return archived + */ + @javax.annotation.Nullable + public Boolean getArchived() { + return archived; + } + + public void setArchived(@javax.annotation.Nullable Boolean archived) { + this.archived = archived; + } + + + public Product created(@javax.annotation.Nullable OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + */ + @javax.annotation.Nullable + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nullable OffsetDateTime created) { + this.created = created; + } + + + public Product description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public Product displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public Product groupAccess(@javax.annotation.Nullable Boolean groupAccess) { + this.groupAccess = groupAccess; + return this; + } + + /** + * Get groupAccess + * @return groupAccess + */ + @javax.annotation.Nullable + public Boolean getGroupAccess() { + return groupAccess; + } + + public void setGroupAccess(@javax.annotation.Nullable Boolean groupAccess) { + this.groupAccess = groupAccess; + } + + + public Product groupAccessRemove(@javax.annotation.Nullable Boolean groupAccessRemove) { + this.groupAccessRemove = groupAccessRemove; + return this; + } + + /** + * Get groupAccessRemove + * @return groupAccessRemove + */ + @javax.annotation.Nullable + public Boolean getGroupAccessRemove() { + return groupAccessRemove; + } + + public void setGroupAccessRemove(@javax.annotation.Nullable Boolean groupAccessRemove) { + this.groupAccessRemove = groupAccessRemove; + } + + + public Product groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public Product groupRoleId(@javax.annotation.Nullable String groupRoleId) { + this.groupRoleId = groupRoleId; + return this; + } + + /** + * Get groupRoleId + * @return groupRoleId + */ + @javax.annotation.Nullable + public String getGroupRoleId() { + return groupRoleId; + } + + public void setGroupRoleId(@javax.annotation.Nullable String groupRoleId) { + this.groupRoleId = groupRoleId; + } + + + public Product id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Product imageId(@javax.annotation.Nonnull String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nonnull + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nonnull String imageId) { + this.imageId = imageId; + } + + + public Product imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public 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 + public List getParentListings() { + return parentListings; + } + + public void setParentListings(@javax.annotation.Nonnull List parentListings) { + this.parentListings = parentListings; + } + + + public Product productType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get productType + * @return productType + */ + @javax.annotation.Nonnull + public ProductType getProductType() { + return productType; + } + + public void setProductType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + } + + + public Product productTypeLabel(@javax.annotation.Nullable String productTypeLabel) { + this.productTypeLabel = productTypeLabel; + return this; + } + + /** + * Get productTypeLabel + * @return productTypeLabel + */ + @javax.annotation.Nullable + public String getProductTypeLabel() { + return productTypeLabel; + } + + public void setProductTypeLabel(@javax.annotation.Nullable String productTypeLabel) { + this.productTypeLabel = productTypeLabel; + } + + + public Product purchaseCount(@javax.annotation.Nullable Integer purchaseCount) { + this.purchaseCount = purchaseCount; + return this; + } + + /** + * Get purchaseCount + * @return purchaseCount + */ + @javax.annotation.Nullable + public Integer getPurchaseCount() { + return purchaseCount; + } + + public void setPurchaseCount(@javax.annotation.Nullable Integer purchaseCount) { + this.purchaseCount = purchaseCount; + } + + + public Product purchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { + this.purchaseCountQuantity = purchaseCountQuantity; + return this; + } + + /** + * Get purchaseCountQuantity + * @return purchaseCountQuantity + */ + @javax.annotation.Nullable + public Integer getPurchaseCountQuantity() { + return purchaseCountQuantity; + } + + public void setPurchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { + this.purchaseCountQuantity = purchaseCountQuantity; + } + + + public Product sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + return this; + } + + /** + * Get sellerDisplayName + * @return sellerDisplayName + */ + @javax.annotation.Nonnull + public String getSellerDisplayName() { + return sellerDisplayName; + } + + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + } + + + public Product sellerId(@javax.annotation.Nonnull String sellerId) { + this.sellerId = sellerId; + return this; + } + + /** + * Get sellerId + * @return sellerId + */ + @javax.annotation.Nonnull + public String getSellerId() { + return sellerId; + } + + public void setSellerId(@javax.annotation.Nonnull String sellerId) { + this.sellerId = sellerId; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public Product updated(@javax.annotation.Nullable OffsetDateTime updated) { + this.updated = updated; + return this; + } + + /** + * Get updated + * @return updated + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdated() { + return updated; + } + + public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) { + this.updated = updated; + } + + + public Product useForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { + this.useForSubscriberList = useForSubscriberList; + return this; + } + + /** + * Get useForSubscriberList + * @return useForSubscriberList + */ + @javax.annotation.Nullable + public Boolean getUseForSubscriberList() { + return useForSubscriberList; + } + + public void setUseForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { + this.useForSubscriberList = useForSubscriberList; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Product product = (Product) o; + return Objects.equals(this.archived, product.archived) && + Objects.equals(this.created, product.created) && + Objects.equals(this.description, product.description) && + Objects.equals(this.displayName, product.displayName) && + Objects.equals(this.groupAccess, product.groupAccess) && + Objects.equals(this.groupAccessRemove, product.groupAccessRemove) && + Objects.equals(this.groupId, product.groupId) && + Objects.equals(this.groupRoleId, product.groupRoleId) && + Objects.equals(this.id, product.id) && + Objects.equals(this.imageId, product.imageId) && + Objects.equals(this.imageUrl, product.imageUrl) && + Objects.equals(this.parentListings, product.parentListings) && + Objects.equals(this.productType, product.productType) && + Objects.equals(this.productTypeLabel, product.productTypeLabel) && + Objects.equals(this.purchaseCount, product.purchaseCount) && + Objects.equals(this.purchaseCountQuantity, product.purchaseCountQuantity) && + Objects.equals(this.sellerDisplayName, product.sellerDisplayName) && + Objects.equals(this.sellerId, product.sellerId) && + Objects.equals(this.tags, product.tags) && + Objects.equals(this.updated, product.updated) && + Objects.equals(this.useForSubscriberList, product.useForSubscriberList); + } + + 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(archived, created, description, displayName, groupAccess, groupAccessRemove, groupId, groupRoleId, id, imageId, imageUrl, parentListings, productType, productTypeLabel, purchaseCount, purchaseCountQuantity, sellerDisplayName, sellerId, tags, updated, useForSubscriberList); + } + + 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 Product {\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groupAccess: ").append(toIndentedString(groupAccess)).append("\n"); + sb.append(" groupAccessRemove: ").append(toIndentedString(groupAccessRemove)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" groupRoleId: ").append(toIndentedString(groupRoleId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" parentListings: ").append(toIndentedString(parentListings)).append("\n"); + sb.append(" productType: ").append(toIndentedString(productType)).append("\n"); + sb.append(" productTypeLabel: ").append(toIndentedString(productTypeLabel)).append("\n"); + sb.append(" purchaseCount: ").append(toIndentedString(purchaseCount)).append("\n"); + sb.append(" purchaseCountQuantity: ").append(toIndentedString(purchaseCountQuantity)).append("\n"); + sb.append(" sellerDisplayName: ").append(toIndentedString(sellerDisplayName)).append("\n"); + sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); + sb.append(" useForSubscriberList: ").append(toIndentedString(useForSubscriberList)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Product.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 `Product` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Product.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(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(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(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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Product.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Product' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Product.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Product value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Product read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..a1574871 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductListing.java @@ -0,0 +1,1350 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.Product; +import io.github.vrchatapi.model.ProductListingType; +import io.github.vrchatapi.model.ProductListingVariant; +import io.github.vrchatapi.model.ProductType; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * ProductListing + */ +@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) + @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) + @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) + @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(@javax.annotation.Nonnull Boolean active) { + this.active = active; + return this; + } + + /** + * Get active + * @return active + */ + @javax.annotation.Nonnull + public Boolean getActive() { + return active; + } + + public void setActive(@javax.annotation.Nonnull Boolean active) { + this.active = active; + } + + + public ProductListing archived(@javax.annotation.Nullable Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Get archived + * @return archived + */ + @javax.annotation.Nullable + public Boolean getArchived() { + return archived; + } + + public void setArchived(@javax.annotation.Nullable Boolean archived) { + this.archived = archived; + } + + + public ProductListing buyerRefundable(@javax.annotation.Nonnull Boolean buyerRefundable) { + this.buyerRefundable = buyerRefundable; + return this; + } + + /** + * Get buyerRefundable + * @return buyerRefundable + */ + @javax.annotation.Nonnull + public Boolean getBuyerRefundable() { + return buyerRefundable; + } + + public void setBuyerRefundable(@javax.annotation.Nonnull Boolean buyerRefundable) { + this.buyerRefundable = buyerRefundable; + } + + + public ProductListing created(@javax.annotation.Nullable OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + */ + @javax.annotation.Nullable + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nullable OffsetDateTime created) { + this.created = created; + } + + + public ProductListing description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public ProductListing displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public ProductListing duration(@javax.annotation.Nullable Integer duration) { + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + */ + @javax.annotation.Nullable + public Integer getDuration() { + return duration; + } + + public void setDuration(@javax.annotation.Nullable Integer duration) { + this.duration = duration; + } + + + public ProductListing durationType(@javax.annotation.Nullable String durationType) { + this.durationType = durationType; + return this; + } + + /** + * Get durationType + * @return durationType + */ + @javax.annotation.Nullable + public String getDurationType() { + return durationType; + } + + public void setDurationType(@javax.annotation.Nullable String durationType) { + this.durationType = durationType; + } + + + public ProductListing groupIcon(@javax.annotation.Nullable String groupIcon) { + this.groupIcon = groupIcon; + return this; + } + + /** + * Get groupIcon + * @return groupIcon + */ + @javax.annotation.Nullable + public String getGroupIcon() { + return groupIcon; + } + + public void setGroupIcon(@javax.annotation.Nullable String groupIcon) { + this.groupIcon = groupIcon; + } + + + public ProductListing groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public ProductListing groupName(@javax.annotation.Nullable String groupName) { + this.groupName = groupName; + return this; + } + + /** + * Get groupName + * @return groupName + */ + @javax.annotation.Nullable + public String getGroupName() { + return groupName; + } + + public void setGroupName(@javax.annotation.Nullable String groupName) { + this.groupName = groupName; + } + + + public ProductListing hasAvatar(@javax.annotation.Nonnull Boolean hasAvatar) { + this.hasAvatar = hasAvatar; + return this; + } + + /** + * Get hasAvatar + * @return hasAvatar + */ + @javax.annotation.Nonnull + public Boolean getHasAvatar() { + return hasAvatar; + } + + public void setHasAvatar(@javax.annotation.Nonnull Boolean hasAvatar) { + this.hasAvatar = hasAvatar; + } + + + public ProductListing hasUdon(@javax.annotation.Nonnull Boolean hasUdon) { + this.hasUdon = hasUdon; + return this; + } + + /** + * Get hasUdon + * @return hasUdon + */ + @javax.annotation.Nonnull + public Boolean getHasUdon() { + return hasUdon; + } + + public void setHasUdon(@javax.annotation.Nonnull Boolean hasUdon) { + this.hasUdon = hasUdon; + } + + + public ProductListing hydratedProducts(@javax.annotation.Nullable List hydratedProducts) { + this.hydratedProducts = hydratedProducts; + return this; + } + + public ProductListing addHydratedProductsItem(Product hydratedProductsItem) { + if (this.hydratedProducts == null) { + this.hydratedProducts = new ArrayList<>(); + } + this.hydratedProducts.add(hydratedProductsItem); + return this; + } + + /** + * Get hydratedProducts + * @return hydratedProducts + */ + @javax.annotation.Nullable + public List getHydratedProducts() { + return hydratedProducts; + } + + public void setHydratedProducts(@javax.annotation.Nullable List hydratedProducts) { + this.hydratedProducts = hydratedProducts; + } + + + public ProductListing id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ProductListing imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public ProductListing imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public ProductListing listingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + return this; + } + + /** + * Get listingType + * @return listingType + */ + @javax.annotation.Nonnull + public ProductListingType getListingType() { + return listingType; + } + + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + } + + + public ProductListing listingVariants(@javax.annotation.Nullable List listingVariants) { + this.listingVariants = listingVariants; + return this; + } + + public ProductListing addListingVariantsItem(ProductListingVariant listingVariantsItem) { + if (this.listingVariants == null) { + this.listingVariants = new ArrayList<>(); + } + this.listingVariants.add(listingVariantsItem); + return this; + } + + /** + * Get listingVariants + * @return listingVariants + */ + @javax.annotation.Nullable + public List getListingVariants() { + return listingVariants; + } + + public void setListingVariants(@javax.annotation.Nullable List listingVariants) { + this.listingVariants = listingVariants; + } + + + public ProductListing permanent(@javax.annotation.Nullable Boolean permanent) { + this.permanent = permanent; + return this; + } + + /** + * Get permanent + * @return permanent + */ + @javax.annotation.Nullable + public Boolean getPermanent() { + return permanent; + } + + public void setPermanent(@javax.annotation.Nullable Boolean permanent) { + this.permanent = permanent; + } + + + public ProductListing priceTokens(@javax.annotation.Nonnull Integer priceTokens) { + this.priceTokens = priceTokens; + return this; + } + + /** + * Get priceTokens + * @return priceTokens + */ + @javax.annotation.Nonnull + public Integer getPriceTokens() { + return priceTokens; + } + + public void setPriceTokens(@javax.annotation.Nonnull Integer priceTokens) { + this.priceTokens = priceTokens; + } + + + 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 + public List getProductIds() { + return productIds; + } + + public void setProductIds(@javax.annotation.Nonnull List productIds) { + this.productIds = productIds; + } + + + public ProductListing productType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get productType + * @return productType + */ + @javax.annotation.Nonnull + public ProductType getProductType() { + return productType; + } + + public void setProductType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + } + + + 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 + public List getProducts() { + return products; + } + + public void setProducts(@javax.annotation.Nonnull List products) { + this.products = products; + } + + + public ProductListing purchaseCount(@javax.annotation.Nullable Integer purchaseCount) { + this.purchaseCount = purchaseCount; + return this; + } + + /** + * Get purchaseCount + * @return purchaseCount + */ + @javax.annotation.Nullable + public Integer getPurchaseCount() { + return purchaseCount; + } + + public void setPurchaseCount(@javax.annotation.Nullable Integer purchaseCount) { + this.purchaseCount = purchaseCount; + } + + + public ProductListing purchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { + this.purchaseCountQuantity = purchaseCountQuantity; + return this; + } + + /** + * Get purchaseCountQuantity + * @return purchaseCountQuantity + */ + @javax.annotation.Nullable + public Integer getPurchaseCountQuantity() { + return purchaseCountQuantity; + } + + public void setPurchaseCountQuantity(@javax.annotation.Nullable Integer purchaseCountQuantity) { + this.purchaseCountQuantity = purchaseCountQuantity; + } + + + public ProductListing quantifiable(@javax.annotation.Nullable Boolean quantifiable) { + this.quantifiable = quantifiable; + return this; + } + + /** + * Get quantifiable + * @return quantifiable + */ + @javax.annotation.Nullable + public Boolean getQuantifiable() { + return quantifiable; + } + + public void setQuantifiable(@javax.annotation.Nullable Boolean quantifiable) { + this.quantifiable = quantifiable; + } + + + public ProductListing recurrable(@javax.annotation.Nonnull Boolean recurrable) { + this.recurrable = recurrable; + return this; + } + + /** + * Get recurrable + * @return recurrable + */ + @javax.annotation.Nonnull + public Boolean getRecurrable() { + return recurrable; + } + + public void setRecurrable(@javax.annotation.Nonnull Boolean recurrable) { + this.recurrable = recurrable; + } + + + public ProductListing refundable(@javax.annotation.Nonnull Boolean refundable) { + this.refundable = refundable; + return this; + } + + /** + * Get refundable + * @return refundable + */ + @javax.annotation.Nonnull + public Boolean getRefundable() { + return refundable; + } + + public void setRefundable(@javax.annotation.Nonnull Boolean refundable) { + this.refundable = refundable; + } + + + public ProductListing sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + return this; + } + + /** + * Get sellerDisplayName + * @return sellerDisplayName + */ + @javax.annotation.Nonnull + public String getSellerDisplayName() { + return sellerDisplayName; + } + + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + } + + + public ProductListing sellerId(@javax.annotation.Nonnull String sellerId) { + this.sellerId = sellerId; + return this; + } + + /** + * Get sellerId + * @return sellerId + */ + @javax.annotation.Nonnull + public String getSellerId() { + return sellerId; + } + + public void setSellerId(@javax.annotation.Nonnull String sellerId) { + this.sellerId = sellerId; + } + + + public ProductListing soldByVrc(@javax.annotation.Nullable Boolean soldByVrc) { + this.soldByVrc = soldByVrc; + return this; + } + + /** + * Get soldByVrc + * @return soldByVrc + */ + @javax.annotation.Nullable + public Boolean getSoldByVrc() { + return soldByVrc; + } + + public void setSoldByVrc(@javax.annotation.Nullable Boolean soldByVrc) { + this.soldByVrc = soldByVrc; + } + + + public ProductListing stackable(@javax.annotation.Nonnull Boolean stackable) { + this.stackable = stackable; + return this; + } + + /** + * Get stackable + * @return stackable + */ + @javax.annotation.Nonnull + public Boolean getStackable() { + return stackable; + } + + public void setStackable(@javax.annotation.Nonnull Boolean stackable) { + this.stackable = stackable; + } + + + 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 + public List getStoreIds() { + return storeIds; + } + + public void setStoreIds(@javax.annotation.Nonnull List storeIds) { + this.storeIds = storeIds; + } + + + public ProductListing subtitle(@javax.annotation.Nullable String subtitle) { + this.subtitle = subtitle; + return this; + } + + /** + * Get subtitle + * @return subtitle + */ + @javax.annotation.Nullable + public String getSubtitle() { + return subtitle; + } + + public void setSubtitle(@javax.annotation.Nullable String subtitle) { + this.subtitle = subtitle; + } + + + public ProductListing tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public ProductListing addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public ProductListing updated(@javax.annotation.Nullable OffsetDateTime updated) { + this.updated = updated; + return this; + } + + /** + * Get updated + * @return updated + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdated() { + return updated; + } + + public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) { + this.updated = updated; + } + + + public ProductListing vrcPlusDiscountPrice(@javax.annotation.Nullable Integer vrcPlusDiscountPrice) { + this.vrcPlusDiscountPrice = vrcPlusDiscountPrice; + return this; + } + + /** + * Get vrcPlusDiscountPrice + * @return vrcPlusDiscountPrice + */ + @javax.annotation.Nullable + public Integer getVrcPlusDiscountPrice() { + return vrcPlusDiscountPrice; + } + + public void setVrcPlusDiscountPrice(@javax.annotation.Nullable Integer vrcPlusDiscountPrice) { + this.vrcPlusDiscountPrice = vrcPlusDiscountPrice; + } + + + public ProductListing whenToExpire(@javax.annotation.Nullable OffsetDateTime whenToExpire) { + this.whenToExpire = whenToExpire; + return this; + } + + /** + * Get whenToExpire + * @return whenToExpire + */ + @javax.annotation.Nullable + public OffsetDateTime getWhenToExpire() { + return whenToExpire; + } + + public void setWhenToExpire(@javax.annotation.Nullable OffsetDateTime whenToExpire) { + this.whenToExpire = whenToExpire; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductListing productListing = (ProductListing) o; + return Objects.equals(this.active, productListing.active) && + Objects.equals(this.archived, productListing.archived) && + Objects.equals(this.buyerRefundable, productListing.buyerRefundable) && + Objects.equals(this.created, productListing.created) && + Objects.equals(this.description, productListing.description) && + Objects.equals(this.displayName, productListing.displayName) && + Objects.equals(this.duration, productListing.duration) && + Objects.equals(this.durationType, productListing.durationType) && + Objects.equals(this.groupIcon, productListing.groupIcon) && + Objects.equals(this.groupId, productListing.groupId) && + Objects.equals(this.groupName, productListing.groupName) && + Objects.equals(this.hasAvatar, productListing.hasAvatar) && + Objects.equals(this.hasUdon, productListing.hasUdon) && + Objects.equals(this.hydratedProducts, productListing.hydratedProducts) && + Objects.equals(this.id, productListing.id) && + Objects.equals(this.imageId, productListing.imageId) && + Objects.equals(this.imageUrl, productListing.imageUrl) && + Objects.equals(this.listingType, productListing.listingType) && + Objects.equals(this.listingVariants, productListing.listingVariants) && + Objects.equals(this.permanent, productListing.permanent) && + Objects.equals(this.priceTokens, productListing.priceTokens) && + Objects.equals(this.productIds, productListing.productIds) && + Objects.equals(this.productType, productListing.productType) && + Objects.equals(this.products, productListing.products) && + Objects.equals(this.purchaseCount, productListing.purchaseCount) && + Objects.equals(this.purchaseCountQuantity, productListing.purchaseCountQuantity) && + Objects.equals(this.quantifiable, productListing.quantifiable) && + Objects.equals(this.recurrable, productListing.recurrable) && + Objects.equals(this.refundable, productListing.refundable) && + Objects.equals(this.sellerDisplayName, productListing.sellerDisplayName) && + Objects.equals(this.sellerId, productListing.sellerId) && + Objects.equals(this.soldByVrc, productListing.soldByVrc) && + Objects.equals(this.stackable, productListing.stackable) && + Objects.equals(this.storeIds, productListing.storeIds) && + Objects.equals(this.subtitle, productListing.subtitle) && + Objects.equals(this.tags, productListing.tags) && + Objects.equals(this.updated, productListing.updated) && + Objects.equals(this.vrcPlusDiscountPrice, productListing.vrcPlusDiscountPrice) && + Objects.equals(this.whenToExpire, productListing.whenToExpire); + } + + 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(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); + } + + 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 ProductListing {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" buyerRefundable: ").append(toIndentedString(buyerRefundable)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" durationType: ").append(toIndentedString(durationType)).append("\n"); + sb.append(" groupIcon: ").append(toIndentedString(groupIcon)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); + sb.append(" hasAvatar: ").append(toIndentedString(hasAvatar)).append("\n"); + sb.append(" hasUdon: ").append(toIndentedString(hasUdon)).append("\n"); + sb.append(" hydratedProducts: ").append(toIndentedString(hydratedProducts)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" listingType: ").append(toIndentedString(listingType)).append("\n"); + sb.append(" listingVariants: ").append(toIndentedString(listingVariants)).append("\n"); + sb.append(" permanent: ").append(toIndentedString(permanent)).append("\n"); + sb.append(" priceTokens: ").append(toIndentedString(priceTokens)).append("\n"); + sb.append(" productIds: ").append(toIndentedString(productIds)).append("\n"); + sb.append(" productType: ").append(toIndentedString(productType)).append("\n"); + sb.append(" products: ").append(toIndentedString(products)).append("\n"); + sb.append(" purchaseCount: ").append(toIndentedString(purchaseCount)).append("\n"); + sb.append(" purchaseCountQuantity: ").append(toIndentedString(purchaseCountQuantity)).append("\n"); + sb.append(" quantifiable: ").append(toIndentedString(quantifiable)).append("\n"); + sb.append(" recurrable: ").append(toIndentedString(recurrable)).append("\n"); + sb.append(" refundable: ").append(toIndentedString(refundable)).append("\n"); + sb.append(" sellerDisplayName: ").append(toIndentedString(sellerDisplayName)).append("\n"); + sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n"); + sb.append(" soldByVrc: ").append(toIndentedString(soldByVrc)).append("\n"); + sb.append(" stackable: ").append(toIndentedString(stackable)).append("\n"); + sb.append(" storeIds: ").append(toIndentedString(storeIds)).append("\n"); + sb.append(" subtitle: ").append(toIndentedString(subtitle)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); + sb.append(" vrcPlusDiscountPrice: ").append(toIndentedString(vrcPlusDiscountPrice)).append("\n"); + sb.append(" whenToExpire: ").append(toIndentedString(whenToExpire)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductListing.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 `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 (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(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(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(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(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(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(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(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.validateJsonElement(jsonArrayhydratedProducts.get(i)); + }; + } + } + if (!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("imageId") != null && !jsonObj.get("imageId").isJsonNull()) && !jsonObj.get("imageId").isJsonPrimitive()) { + 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(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(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.validateJsonElement(jsonArraylistingVariants.get(i)); + }; + } + } + // 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(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(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(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(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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductListing.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductListing' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductListing.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductListing value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductListing read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..23719443 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductListingType.java @@ -0,0 +1,81 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 ProductListingType + */ +@JsonAdapter(ProductListingType.Adapter.class) +public enum ProductListingType { + + DURATION("duration"), + + INSTANT("instant"), + + PERMANENT("permanent"), + + SUBSCRIPTION("subscription"); + + private String value; + + ProductListingType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProductListingType fromValue(String value) { + for (ProductListingType b : ProductListingType.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 ProductListingType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProductListingType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..aa106ad9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductListingVariant.java @@ -0,0 +1,339 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * ProductListingVariant + */ +@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(@javax.annotation.Nullable OffsetDateTime effectiveFrom) { + this.effectiveFrom = effectiveFrom; + return this; + } + + /** + * Get effectiveFrom + * @return effectiveFrom + */ + @javax.annotation.Nullable + public OffsetDateTime getEffectiveFrom() { + return effectiveFrom; + } + + public void setEffectiveFrom(@javax.annotation.Nullable OffsetDateTime effectiveFrom) { + this.effectiveFrom = effectiveFrom; + } + + + public ProductListingVariant listingVariantId(@javax.annotation.Nonnull String listingVariantId) { + this.listingVariantId = listingVariantId; + return this; + } + + /** + * Get listingVariantId + * @return listingVariantId + */ + @javax.annotation.Nonnull + public String getListingVariantId() { + return listingVariantId; + } + + public void setListingVariantId(@javax.annotation.Nonnull String listingVariantId) { + this.listingVariantId = listingVariantId; + } + + + public ProductListingVariant nonRefundable(@javax.annotation.Nonnull Boolean nonRefundable) { + this.nonRefundable = nonRefundable; + return this; + } + + /** + * Get nonRefundable + * @return nonRefundable + */ + @javax.annotation.Nonnull + public Boolean getNonRefundable() { + return nonRefundable; + } + + public void setNonRefundable(@javax.annotation.Nonnull Boolean nonRefundable) { + this.nonRefundable = nonRefundable; + } + + + public ProductListingVariant quantity(@javax.annotation.Nonnull Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + @javax.annotation.Nonnull + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(@javax.annotation.Nonnull Integer quantity) { + this.quantity = quantity; + } + + + public ProductListingVariant sellerVariant(@javax.annotation.Nonnull Boolean sellerVariant) { + this.sellerVariant = sellerVariant; + return this; + } + + /** + * Get sellerVariant + * @return sellerVariant + */ + @javax.annotation.Nonnull + public Boolean getSellerVariant() { + return sellerVariant; + } + + public void setSellerVariant(@javax.annotation.Nonnull Boolean sellerVariant) { + this.sellerVariant = sellerVariant; + } + + + public ProductListingVariant unitPriceTokens(@javax.annotation.Nonnull Integer unitPriceTokens) { + this.unitPriceTokens = unitPriceTokens; + return this; + } + + /** + * Get unitPriceTokens + * @return unitPriceTokens + */ + @javax.annotation.Nonnull + public Integer getUnitPriceTokens() { + return unitPriceTokens; + } + + public void setUnitPriceTokens(@javax.annotation.Nonnull Integer unitPriceTokens) { + this.unitPriceTokens = unitPriceTokens; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductListingVariant productListingVariant = (ProductListingVariant) o; + return Objects.equals(this.effectiveFrom, productListingVariant.effectiveFrom) && + Objects.equals(this.listingVariantId, productListingVariant.listingVariantId) && + Objects.equals(this.nonRefundable, productListingVariant.nonRefundable) && + Objects.equals(this.quantity, productListingVariant.quantity) && + Objects.equals(this.sellerVariant, productListingVariant.sellerVariant) && + Objects.equals(this.unitPriceTokens, productListingVariant.unitPriceTokens); + } + + @Override + public int hashCode() { + return Objects.hash(effectiveFrom, listingVariantId, nonRefundable, quantity, sellerVariant, unitPriceTokens); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductListingVariant {\n"); + sb.append(" effectiveFrom: ").append(toIndentedString(effectiveFrom)).append("\n"); + sb.append(" listingVariantId: ").append(toIndentedString(listingVariantId)).append("\n"); + sb.append(" nonRefundable: ").append(toIndentedString(nonRefundable)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" sellerVariant: ").append(toIndentedString(sellerVariant)).append("\n"); + sb.append(" unitPriceTokens: ").append(toIndentedString(unitPriceTokens)).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("effectiveFrom", "listingVariantId", "nonRefundable", "quantity", "sellerVariant", "unitPriceTokens")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("listingVariantId", "nonRefundable", "quantity", "sellerVariant", "unitPriceTokens")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductListingVariant.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 `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 (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(java.util.Locale.ROOT, "Expected the field `listingVariantId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingVariantId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductListingVariant.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductListingVariant' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductListingVariant.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductListingVariant value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductListingVariant read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..259446ea --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchase.java @@ -0,0 +1,1318 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductListingType; +import io.github.vrchatapi.model.ProductPurchaseProduct; +import io.github.vrchatapi.model.ProductPurchasePurchaseContext; +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; +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; + +/** + * ProductPurchase + */ +@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(@javax.annotation.Nonnull String buyerDisplayName) { + this.buyerDisplayName = buyerDisplayName; + return this; + } + + /** + * Get buyerDisplayName + * @return buyerDisplayName + */ + @javax.annotation.Nonnull + public String getBuyerDisplayName() { + return buyerDisplayName; + } + + public void setBuyerDisplayName(@javax.annotation.Nonnull String buyerDisplayName) { + this.buyerDisplayName = buyerDisplayName; + } + + + 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 + public String getBuyerId() { + return buyerId; + } + + public void setBuyerId(@javax.annotation.Nonnull String buyerId) { + this.buyerId = buyerId; + } + + + public ProductPurchase firstParty(@javax.annotation.Nullable Boolean firstParty) { + this.firstParty = firstParty; + return this; + } + + /** + * Get firstParty + * @return firstParty + */ + @javax.annotation.Nullable + public Boolean getFirstParty() { + return firstParty; + } + + public void setFirstParty(@javax.annotation.Nullable Boolean firstParty) { + this.firstParty = firstParty; + } + + + public ProductPurchase isBuyer(@javax.annotation.Nonnull Boolean isBuyer) { + this.isBuyer = isBuyer; + return this; + } + + /** + * Get isBuyer + * @return isBuyer + */ + @javax.annotation.Nonnull + public Boolean getIsBuyer() { + return isBuyer; + } + + public void setIsBuyer(@javax.annotation.Nonnull Boolean isBuyer) { + this.isBuyer = isBuyer; + } + + + public ProductPurchase isGift(@javax.annotation.Nonnull Boolean isGift) { + this.isGift = isGift; + return this; + } + + /** + * Get isGift + * @return isGift + */ + @javax.annotation.Nonnull + public Boolean getIsGift() { + return isGift; + } + + public void setIsGift(@javax.annotation.Nonnull Boolean isGift) { + this.isGift = isGift; + } + + + public ProductPurchase isReceiver(@javax.annotation.Nonnull Boolean isReceiver) { + this.isReceiver = isReceiver; + return this; + } + + /** + * Get isReceiver + * @return isReceiver + */ + @javax.annotation.Nonnull + public Boolean getIsReceiver() { + return isReceiver; + } + + public void setIsReceiver(@javax.annotation.Nonnull Boolean isReceiver) { + this.isReceiver = isReceiver; + } + + + public ProductPurchase isSeller(@javax.annotation.Nonnull Boolean isSeller) { + this.isSeller = isSeller; + return this; + } + + /** + * Get isSeller + * @return isSeller + */ + @javax.annotation.Nonnull + public Boolean getIsSeller() { + return isSeller; + } + + public void setIsSeller(@javax.annotation.Nonnull Boolean isSeller) { + this.isSeller = isSeller; + } + + + public ProductPurchase ledgerTransactionId(@javax.annotation.Nullable Integer ledgerTransactionId) { + this.ledgerTransactionId = ledgerTransactionId; + return this; + } + + /** + * Get ledgerTransactionId + * @return ledgerTransactionId + */ + @javax.annotation.Nullable + public Integer getLedgerTransactionId() { + return ledgerTransactionId; + } + + public void setLedgerTransactionId(@javax.annotation.Nullable Integer ledgerTransactionId) { + this.ledgerTransactionId = ledgerTransactionId; + } + + + public ProductPurchase listingCurrentlyAvailable(@javax.annotation.Nonnull Boolean listingCurrentlyAvailable) { + this.listingCurrentlyAvailable = listingCurrentlyAvailable; + return this; + } + + /** + * Get listingCurrentlyAvailable + * @return listingCurrentlyAvailable + */ + @javax.annotation.Nonnull + public Boolean getListingCurrentlyAvailable() { + return listingCurrentlyAvailable; + } + + public void setListingCurrentlyAvailable(@javax.annotation.Nonnull Boolean listingCurrentlyAvailable) { + this.listingCurrentlyAvailable = listingCurrentlyAvailable; + } + + + public ProductPurchase listingDescription(@javax.annotation.Nullable String listingDescription) { + this.listingDescription = listingDescription; + return this; + } + + /** + * Get listingDescription + * @return listingDescription + */ + @javax.annotation.Nullable + public String getListingDescription() { + return listingDescription; + } + + public void setListingDescription(@javax.annotation.Nullable String listingDescription) { + this.listingDescription = listingDescription; + } + + + public ProductPurchase listingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { + this.listingDisplayName = listingDisplayName; + return this; + } + + /** + * Get listingDisplayName + * @return listingDisplayName + */ + @javax.annotation.Nonnull + public String getListingDisplayName() { + return listingDisplayName; + } + + public void setListingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { + this.listingDisplayName = listingDisplayName; + } + + + public ProductPurchase listingId(@javax.annotation.Nonnull String listingId) { + this.listingId = listingId; + return this; + } + + /** + * Get listingId + * @return listingId + */ + @javax.annotation.Nonnull + public String getListingId() { + return listingId; + } + + public void setListingId(@javax.annotation.Nonnull String listingId) { + this.listingId = listingId; + } + + + public ProductPurchase listingImageId(@javax.annotation.Nonnull String listingImageId) { + this.listingImageId = listingImageId; + return this; + } + + /** + * Get listingImageId + * @return listingImageId + */ + @javax.annotation.Nonnull + public String getListingImageId() { + return listingImageId; + } + + public void setListingImageId(@javax.annotation.Nonnull String listingImageId) { + this.listingImageId = listingImageId; + } + + + public ProductPurchase listingSubtitle(@javax.annotation.Nonnull String listingSubtitle) { + this.listingSubtitle = listingSubtitle; + return this; + } + + /** + * Get listingSubtitle + * @return listingSubtitle + */ + @javax.annotation.Nonnull + public String getListingSubtitle() { + return listingSubtitle; + } + + public void setListingSubtitle(@javax.annotation.Nonnull String listingSubtitle) { + this.listingSubtitle = listingSubtitle; + } + + + public ProductPurchase listingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + return this; + } + + /** + * Get listingType + * @return listingType + */ + @javax.annotation.Nonnull + public ProductListingType getListingType() { + return listingType; + } + + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + } + + + 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 + public List getProducts() { + return products; + } + + public void setProducts(@javax.annotation.Nonnull List products) { + this.products = products; + } + + + public ProductPurchase purchaseActive(@javax.annotation.Nonnull Boolean purchaseActive) { + this.purchaseActive = purchaseActive; + return this; + } + + /** + * Get purchaseActive + * @return purchaseActive + */ + @javax.annotation.Nonnull + public Boolean getPurchaseActive() { + return purchaseActive; + } + + public void setPurchaseActive(@javax.annotation.Nonnull Boolean purchaseActive) { + this.purchaseActive = purchaseActive; + } + + + public ProductPurchase purchaseContext(@javax.annotation.Nonnull ProductPurchasePurchaseContext purchaseContext) { + this.purchaseContext = purchaseContext; + return this; + } + + /** + * Get purchaseContext + * @return purchaseContext + */ + @javax.annotation.Nonnull + public ProductPurchasePurchaseContext getPurchaseContext() { + return purchaseContext; + } + + public void setPurchaseContext(@javax.annotation.Nonnull ProductPurchasePurchaseContext purchaseContext) { + this.purchaseContext = purchaseContext; + } + + + public ProductPurchase purchaseCurrentStatus(@javax.annotation.Nonnull String purchaseCurrentStatus) { + this.purchaseCurrentStatus = purchaseCurrentStatus; + return this; + } + + /** + * Get purchaseCurrentStatus + * @return purchaseCurrentStatus + */ + @javax.annotation.Nonnull + public String getPurchaseCurrentStatus() { + return purchaseCurrentStatus; + } + + public void setPurchaseCurrentStatus(@javax.annotation.Nonnull String purchaseCurrentStatus) { + this.purchaseCurrentStatus = purchaseCurrentStatus; + } + + + public ProductPurchase purchaseDate(@javax.annotation.Nonnull OffsetDateTime purchaseDate) { + this.purchaseDate = purchaseDate; + return this; + } + + /** + * Get purchaseDate + * @return purchaseDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getPurchaseDate() { + return purchaseDate; + } + + public void setPurchaseDate(@javax.annotation.Nonnull OffsetDateTime purchaseDate) { + this.purchaseDate = purchaseDate; + } + + + public ProductPurchase purchaseDuration(@javax.annotation.Nullable Integer purchaseDuration) { + this.purchaseDuration = purchaseDuration; + return this; + } + + /** + * Get purchaseDuration + * @return purchaseDuration + */ + @javax.annotation.Nullable + public Integer getPurchaseDuration() { + return purchaseDuration; + } + + public void setPurchaseDuration(@javax.annotation.Nullable Integer purchaseDuration) { + this.purchaseDuration = purchaseDuration; + } + + + public ProductPurchase purchaseDurationType(@javax.annotation.Nullable String purchaseDurationType) { + this.purchaseDurationType = purchaseDurationType; + return this; + } + + /** + * Get purchaseDurationType + * @return purchaseDurationType + */ + @javax.annotation.Nullable + public String getPurchaseDurationType() { + return purchaseDurationType; + } + + public void setPurchaseDurationType(@javax.annotation.Nullable String purchaseDurationType) { + this.purchaseDurationType = purchaseDurationType; + } + + + public ProductPurchase purchaseEndDate(@javax.annotation.Nullable OffsetDateTime purchaseEndDate) { + this.purchaseEndDate = purchaseEndDate; + return this; + } + + /** + * Get purchaseEndDate + * @return purchaseEndDate + */ + @javax.annotation.Nullable + public OffsetDateTime getPurchaseEndDate() { + return purchaseEndDate; + } + + public void setPurchaseEndDate(@javax.annotation.Nullable OffsetDateTime purchaseEndDate) { + this.purchaseEndDate = purchaseEndDate; + } + + + public ProductPurchase purchaseFee(@javax.annotation.Nullable Integer purchaseFee) { + this.purchaseFee = purchaseFee; + return this; + } + + /** + * Get purchaseFee + * @return purchaseFee + */ + @javax.annotation.Nullable + public Integer getPurchaseFee() { + return purchaseFee; + } + + public void setPurchaseFee(@javax.annotation.Nullable Integer purchaseFee) { + this.purchaseFee = purchaseFee; + } + + + public ProductPurchase purchaseId(@javax.annotation.Nonnull String purchaseId) { + this.purchaseId = purchaseId; + return this; + } + + /** + * Get purchaseId + * @return purchaseId + */ + @javax.annotation.Nonnull + public String getPurchaseId() { + return purchaseId; + } + + public void setPurchaseId(@javax.annotation.Nonnull String purchaseId) { + this.purchaseId = purchaseId; + } + + + public ProductPurchase purchaseLatest(@javax.annotation.Nonnull Boolean purchaseLatest) { + this.purchaseLatest = purchaseLatest; + return this; + } + + /** + * Get purchaseLatest + * @return purchaseLatest + */ + @javax.annotation.Nonnull + public Boolean getPurchaseLatest() { + return purchaseLatest; + } + + public void setPurchaseLatest(@javax.annotation.Nonnull Boolean purchaseLatest) { + this.purchaseLatest = purchaseLatest; + } + + + public ProductPurchase purchasePrice(@javax.annotation.Nonnull Integer purchasePrice) { + this.purchasePrice = purchasePrice; + return this; + } + + /** + * Get purchasePrice + * @return purchasePrice + */ + @javax.annotation.Nonnull + public Integer getPurchasePrice() { + return purchasePrice; + } + + public void setPurchasePrice(@javax.annotation.Nonnull Integer purchasePrice) { + this.purchasePrice = purchasePrice; + } + + + public ProductPurchase purchaseQuantity(@javax.annotation.Nonnull Integer purchaseQuantity) { + this.purchaseQuantity = purchaseQuantity; + return this; + } + + /** + * Get purchaseQuantity + * @return purchaseQuantity + */ + @javax.annotation.Nonnull + public Integer getPurchaseQuantity() { + return purchaseQuantity; + } + + public void setPurchaseQuantity(@javax.annotation.Nonnull Integer purchaseQuantity) { + this.purchaseQuantity = purchaseQuantity; + } + + + public ProductPurchase purchaseStartDate(@javax.annotation.Nullable OffsetDateTime purchaseStartDate) { + this.purchaseStartDate = purchaseStartDate; + return this; + } + + /** + * Get purchaseStartDate + * @return purchaseStartDate + */ + @javax.annotation.Nullable + public OffsetDateTime getPurchaseStartDate() { + return purchaseStartDate; + } + + public void setPurchaseStartDate(@javax.annotation.Nullable OffsetDateTime purchaseStartDate) { + this.purchaseStartDate = purchaseStartDate; + } + + + public ProductPurchase purchaseToken(@javax.annotation.Nullable Object purchaseToken) { + this.purchaseToken = purchaseToken; + return this; + } + + /** + * Get purchaseToken + * @return purchaseToken + */ + @javax.annotation.Nullable + public Object getPurchaseToken() { + return purchaseToken; + } + + public void setPurchaseToken(@javax.annotation.Nullable Object purchaseToken) { + this.purchaseToken = purchaseToken; + } + + + public ProductPurchase purchaseType(@javax.annotation.Nonnull String purchaseType) { + this.purchaseType = purchaseType; + return this; + } + + /** + * Get purchaseType + * @return purchaseType + */ + @javax.annotation.Nonnull + public String getPurchaseType() { + return purchaseType; + } + + public void setPurchaseType(@javax.annotation.Nonnull String purchaseType) { + this.purchaseType = purchaseType; + } + + + public ProductPurchase purchaseUnitPrice(@javax.annotation.Nonnull Integer purchaseUnitPrice) { + this.purchaseUnitPrice = purchaseUnitPrice; + return this; + } + + /** + * Get purchaseUnitPrice + * @return purchaseUnitPrice + */ + @javax.annotation.Nonnull + public Integer getPurchaseUnitPrice() { + return purchaseUnitPrice; + } + + public void setPurchaseUnitPrice(@javax.annotation.Nonnull Integer purchaseUnitPrice) { + this.purchaseUnitPrice = purchaseUnitPrice; + } + + + public ProductPurchase purchaseValue(@javax.annotation.Nullable Integer purchaseValue) { + this.purchaseValue = purchaseValue; + return this; + } + + /** + * Get purchaseValue + * @return purchaseValue + */ + @javax.annotation.Nullable + public Integer getPurchaseValue() { + return purchaseValue; + } + + public void setPurchaseValue(@javax.annotation.Nullable Integer purchaseValue) { + this.purchaseValue = purchaseValue; + } + + + public ProductPurchase receiverDisplayName(@javax.annotation.Nonnull String receiverDisplayName) { + this.receiverDisplayName = receiverDisplayName; + return this; + } + + /** + * Get receiverDisplayName + * @return receiverDisplayName + */ + @javax.annotation.Nonnull + public String getReceiverDisplayName() { + return receiverDisplayName; + } + + public void setReceiverDisplayName(@javax.annotation.Nonnull String receiverDisplayName) { + this.receiverDisplayName = receiverDisplayName; + } + + + 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 + public String getReceiverId() { + return receiverId; + } + + public void setReceiverId(@javax.annotation.Nonnull String receiverId) { + this.receiverId = receiverId; + } + + + public ProductPurchase recurrable(@javax.annotation.Nonnull Boolean recurrable) { + this.recurrable = recurrable; + return this; + } + + /** + * Get recurrable + * @return recurrable + */ + @javax.annotation.Nonnull + public Boolean getRecurrable() { + return recurrable; + } + + public void setRecurrable(@javax.annotation.Nonnull Boolean recurrable) { + this.recurrable = recurrable; + } + + + public ProductPurchase refundable(@javax.annotation.Nonnull Boolean refundable) { + this.refundable = refundable; + return this; + } + + /** + * Get refundable + * @return refundable + */ + @javax.annotation.Nonnull + public Boolean getRefundable() { + return refundable; + } + + public void setRefundable(@javax.annotation.Nonnull Boolean refundable) { + this.refundable = refundable; + } + + + public ProductPurchase sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + return this; + } + + /** + * Get sellerDisplayName + * @return sellerDisplayName + */ + @javax.annotation.Nonnull + public String getSellerDisplayName() { + return sellerDisplayName; + } + + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + } + + + 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 + public String getSellerId() { + return sellerId; + } + + public void setSellerId(@javax.annotation.Nonnull String sellerId) { + this.sellerId = sellerId; + } + + + public ProductPurchase stackable(@javax.annotation.Nonnull Boolean stackable) { + this.stackable = stackable; + return this; + } + + /** + * Get stackable + * @return stackable + */ + @javax.annotation.Nonnull + public Boolean getStackable() { + return stackable; + } + + public void setStackable(@javax.annotation.Nonnull Boolean stackable) { + this.stackable = stackable; + } + + + public ProductPurchase willRecur(@javax.annotation.Nonnull Boolean willRecur) { + this.willRecur = willRecur; + return this; + } + + /** + * Get willRecur + * @return willRecur + */ + @javax.annotation.Nonnull + public Boolean getWillRecur() { + return willRecur; + } + + public void setWillRecur(@javax.annotation.Nonnull Boolean willRecur) { + this.willRecur = willRecur; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductPurchase productPurchase = (ProductPurchase) o; + return Objects.equals(this.buyerDisplayName, productPurchase.buyerDisplayName) && + Objects.equals(this.buyerId, productPurchase.buyerId) && + Objects.equals(this.firstParty, productPurchase.firstParty) && + Objects.equals(this.isBuyer, productPurchase.isBuyer) && + Objects.equals(this.isGift, productPurchase.isGift) && + Objects.equals(this.isReceiver, productPurchase.isReceiver) && + Objects.equals(this.isSeller, productPurchase.isSeller) && + Objects.equals(this.ledgerTransactionId, productPurchase.ledgerTransactionId) && + Objects.equals(this.listingCurrentlyAvailable, productPurchase.listingCurrentlyAvailable) && + Objects.equals(this.listingDescription, productPurchase.listingDescription) && + Objects.equals(this.listingDisplayName, productPurchase.listingDisplayName) && + Objects.equals(this.listingId, productPurchase.listingId) && + Objects.equals(this.listingImageId, productPurchase.listingImageId) && + Objects.equals(this.listingSubtitle, productPurchase.listingSubtitle) && + Objects.equals(this.listingType, productPurchase.listingType) && + Objects.equals(this.products, productPurchase.products) && + Objects.equals(this.purchaseActive, productPurchase.purchaseActive) && + Objects.equals(this.purchaseContext, productPurchase.purchaseContext) && + Objects.equals(this.purchaseCurrentStatus, productPurchase.purchaseCurrentStatus) && + Objects.equals(this.purchaseDate, productPurchase.purchaseDate) && + Objects.equals(this.purchaseDuration, productPurchase.purchaseDuration) && + Objects.equals(this.purchaseDurationType, productPurchase.purchaseDurationType) && + Objects.equals(this.purchaseEndDate, productPurchase.purchaseEndDate) && + Objects.equals(this.purchaseFee, productPurchase.purchaseFee) && + Objects.equals(this.purchaseId, productPurchase.purchaseId) && + Objects.equals(this.purchaseLatest, productPurchase.purchaseLatest) && + Objects.equals(this.purchasePrice, productPurchase.purchasePrice) && + Objects.equals(this.purchaseQuantity, productPurchase.purchaseQuantity) && + Objects.equals(this.purchaseStartDate, productPurchase.purchaseStartDate) && + Objects.equals(this.purchaseToken, productPurchase.purchaseToken) && + Objects.equals(this.purchaseType, productPurchase.purchaseType) && + Objects.equals(this.purchaseUnitPrice, productPurchase.purchaseUnitPrice) && + Objects.equals(this.purchaseValue, productPurchase.purchaseValue) && + Objects.equals(this.receiverDisplayName, productPurchase.receiverDisplayName) && + Objects.equals(this.receiverId, productPurchase.receiverId) && + Objects.equals(this.recurrable, productPurchase.recurrable) && + Objects.equals(this.refundable, productPurchase.refundable) && + Objects.equals(this.sellerDisplayName, productPurchase.sellerDisplayName) && + Objects.equals(this.sellerId, productPurchase.sellerId) && + Objects.equals(this.stackable, productPurchase.stackable) && + Objects.equals(this.willRecur, productPurchase.willRecur); + } + + @Override + public int hashCode() { + return Objects.hash(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); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductPurchase {\n"); + sb.append(" buyerDisplayName: ").append(toIndentedString(buyerDisplayName)).append("\n"); + sb.append(" buyerId: ").append(toIndentedString(buyerId)).append("\n"); + sb.append(" firstParty: ").append(toIndentedString(firstParty)).append("\n"); + sb.append(" isBuyer: ").append(toIndentedString(isBuyer)).append("\n"); + sb.append(" isGift: ").append(toIndentedString(isGift)).append("\n"); + sb.append(" isReceiver: ").append(toIndentedString(isReceiver)).append("\n"); + sb.append(" isSeller: ").append(toIndentedString(isSeller)).append("\n"); + sb.append(" ledgerTransactionId: ").append(toIndentedString(ledgerTransactionId)).append("\n"); + sb.append(" listingCurrentlyAvailable: ").append(toIndentedString(listingCurrentlyAvailable)).append("\n"); + sb.append(" listingDescription: ").append(toIndentedString(listingDescription)).append("\n"); + sb.append(" listingDisplayName: ").append(toIndentedString(listingDisplayName)).append("\n"); + sb.append(" listingId: ").append(toIndentedString(listingId)).append("\n"); + sb.append(" listingImageId: ").append(toIndentedString(listingImageId)).append("\n"); + sb.append(" listingSubtitle: ").append(toIndentedString(listingSubtitle)).append("\n"); + sb.append(" listingType: ").append(toIndentedString(listingType)).append("\n"); + sb.append(" products: ").append(toIndentedString(products)).append("\n"); + sb.append(" purchaseActive: ").append(toIndentedString(purchaseActive)).append("\n"); + sb.append(" purchaseContext: ").append(toIndentedString(purchaseContext)).append("\n"); + sb.append(" purchaseCurrentStatus: ").append(toIndentedString(purchaseCurrentStatus)).append("\n"); + sb.append(" purchaseDate: ").append(toIndentedString(purchaseDate)).append("\n"); + sb.append(" purchaseDuration: ").append(toIndentedString(purchaseDuration)).append("\n"); + sb.append(" purchaseDurationType: ").append(toIndentedString(purchaseDurationType)).append("\n"); + sb.append(" purchaseEndDate: ").append(toIndentedString(purchaseEndDate)).append("\n"); + sb.append(" purchaseFee: ").append(toIndentedString(purchaseFee)).append("\n"); + sb.append(" purchaseId: ").append(toIndentedString(purchaseId)).append("\n"); + sb.append(" purchaseLatest: ").append(toIndentedString(purchaseLatest)).append("\n"); + sb.append(" purchasePrice: ").append(toIndentedString(purchasePrice)).append("\n"); + sb.append(" purchaseQuantity: ").append(toIndentedString(purchaseQuantity)).append("\n"); + sb.append(" purchaseStartDate: ").append(toIndentedString(purchaseStartDate)).append("\n"); + sb.append(" purchaseToken: ").append(toIndentedString(purchaseToken)).append("\n"); + sb.append(" purchaseType: ").append(toIndentedString(purchaseType)).append("\n"); + sb.append(" purchaseUnitPrice: ").append(toIndentedString(purchaseUnitPrice)).append("\n"); + sb.append(" purchaseValue: ").append(toIndentedString(purchaseValue)).append("\n"); + sb.append(" receiverDisplayName: ").append(toIndentedString(receiverDisplayName)).append("\n"); + sb.append(" receiverId: ").append(toIndentedString(receiverId)).append("\n"); + sb.append(" recurrable: ").append(toIndentedString(recurrable)).append("\n"); + sb.append(" refundable: ").append(toIndentedString(refundable)).append("\n"); + sb.append(" sellerDisplayName: ").append(toIndentedString(sellerDisplayName)).append("\n"); + sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n"); + sb.append(" stackable: ").append(toIndentedString(stackable)).append("\n"); + sb.append(" willRecur: ").append(toIndentedString(willRecur)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductPurchase.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 `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 (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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `listingSubtitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listingSubtitle").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)); + } + } + // validate the required field `purchaseContext` + ProductPurchasePurchaseContext.validateJsonElement(jsonObj.get("purchaseContext")); + if (!jsonObj.get("purchaseCurrentStatus").isJsonPrimitive()) { + 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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductPurchase.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductPurchase' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductPurchase.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductPurchase value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductPurchase read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..4a161b14 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseHistory.java @@ -0,0 +1,279 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductPurchaseRecord; +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; +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; + +/** + * ProductPurchaseHistory + */ +@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(@javax.annotation.Nonnull OffsetDateTime endDate) { + this.endDate = endDate; + return this; + } + + /** + * Get endDate + * @return endDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getEndDate() { + return endDate; + } + + public void setEndDate(@javax.annotation.Nonnull OffsetDateTime endDate) { + this.endDate = endDate; + } + + + public ProductPurchaseHistory startDate(@javax.annotation.Nonnull OffsetDateTime startDate) { + this.startDate = startDate; + return this; + } + + /** + * Get startDate + * @return startDate + */ + @javax.annotation.Nonnull + public OffsetDateTime getStartDate() { + return startDate; + } + + public void setStartDate(@javax.annotation.Nonnull OffsetDateTime startDate) { + this.startDate = startDate; + } + + + 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 + public List getTransactions() { + return transactions; + } + + public void setTransactions(@javax.annotation.Nonnull List transactions) { + this.transactions = transactions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductPurchaseHistory productPurchaseHistory = (ProductPurchaseHistory) o; + return Objects.equals(this.endDate, productPurchaseHistory.endDate) && + Objects.equals(this.startDate, productPurchaseHistory.startDate) && + Objects.equals(this.transactions, productPurchaseHistory.transactions); + } + + @Override + public int hashCode() { + return Objects.hash(endDate, startDate, transactions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductPurchaseHistory {\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" transactions: ").append(toIndentedString(transactions)).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("endDate", "startDate", "transactions")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("endDate", "startDate", "transactions")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductPurchaseHistory.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 `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 (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("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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductPurchaseHistory.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductPurchaseHistory' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductPurchaseHistory.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductPurchaseHistory value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductPurchaseHistory read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..c94a8896 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseLocationType.java @@ -0,0 +1,95 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 ProductPurchaseLocationType + */ +@JsonAdapter(ProductPurchaseLocationType.Adapter.class) +public enum ProductPurchaseLocationType { + + CLIENT_AVATAR_MARKETPLACE("client_avatar_marketplace"), + + CLIENT_CREATOR_STORE("client_creator_store"), + + CLIENT_GROUP_STORE("client_group_store"), + + CLIENT_WORLD_COMPONENT("client_world_component"), + + CLIENT_WORLD_STORE("client_world_store"), + + UNDEFINED("undefined"), + + WEB_ANY("web_any"), + + WEB_AVATAR_MARKETPLACE("web_avatar_marketplace"), + + WEB_CREATOR_STORE("web_creator_store"), + + WEB_GROUP_STORE("web_group_store"), + + WEB_WORLD_STORE("web_world_store"); + + private String value; + + ProductPurchaseLocationType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProductPurchaseLocationType fromValue(String value) { + for (ProductPurchaseLocationType b : ProductPurchaseLocationType.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 ProductPurchaseLocationType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProductPurchaseLocationType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..ab3dc8e1 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseProduct.java @@ -0,0 +1,336 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductType; +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; + +/** + * ProductPurchaseProduct + */ +@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(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public ProductPurchaseProduct id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public ProductPurchaseProduct imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public ProductPurchaseProduct licenseId(@javax.annotation.Nullable String licenseId) { + this.licenseId = licenseId; + return this; + } + + /** + * Get licenseId + * @return licenseId + */ + @javax.annotation.Nullable + public String getLicenseId() { + return licenseId; + } + + public void setLicenseId(@javax.annotation.Nullable String licenseId) { + this.licenseId = licenseId; + } + + + public ProductPurchaseProduct productType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get productType + * @return productType + */ + @javax.annotation.Nonnull + public ProductType getProductType() { + return productType; + } + + public void setProductType(@javax.annotation.Nonnull ProductType productType) { + this.productType = productType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductPurchaseProduct productPurchaseProduct = (ProductPurchaseProduct) o; + return Objects.equals(this.displayName, productPurchaseProduct.displayName) && + Objects.equals(this.id, productPurchaseProduct.id) && + Objects.equals(this.imageId, productPurchaseProduct.imageId) && + Objects.equals(this.licenseId, productPurchaseProduct.licenseId) && + Objects.equals(this.productType, productPurchaseProduct.productType); + } + + 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(displayName, id, imageId, licenseId, productType); + } + + 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 ProductPurchaseProduct {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" licenseId: ").append(toIndentedString(licenseId)).append("\n"); + sb.append(" productType: ").append(toIndentedString(productType)).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("displayName", "id", "imageId", "licenseId", "productType")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("displayName", "id", "productType")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductPurchaseProduct.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 `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 (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(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(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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductPurchaseProduct.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductPurchaseProduct' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductPurchaseProduct.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductPurchaseProduct value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductPurchaseProduct read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..055f18d8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchasePurchaseContext.java @@ -0,0 +1,259 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * ProductPurchasePurchaseContext + */ +@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(@javax.annotation.Nullable String locationType) { + this.locationType = locationType; + return this; + } + + /** + * Get locationType + * @return locationType + */ + @javax.annotation.Nullable + public String getLocationType() { + return locationType; + } + + public void setLocationType(@javax.annotation.Nullable String locationType) { + this.locationType = locationType; + } + + + 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 + public String getWorldId() { + return worldId; + } + + public void setWorldId(@javax.annotation.Nullable String worldId) { + this.worldId = worldId; + } + + + public ProductPurchasePurchaseContext worldName(@javax.annotation.Nullable String worldName) { + this.worldName = worldName; + return this; + } + + /** + * Get worldName + * @return worldName + */ + @javax.annotation.Nullable + public String getWorldName() { + return worldName; + } + + public void setWorldName(@javax.annotation.Nullable String worldName) { + this.worldName = worldName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductPurchasePurchaseContext productPurchasePurchaseContext = (ProductPurchasePurchaseContext) o; + return Objects.equals(this.locationType, productPurchasePurchaseContext.locationType) && + Objects.equals(this.worldId, productPurchasePurchaseContext.worldId) && + Objects.equals(this.worldName, productPurchasePurchaseContext.worldName); + } + + @Override + public int hashCode() { + return Objects.hash(locationType, worldId, worldName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductPurchasePurchaseContext {\n"); + sb.append(" locationType: ").append(toIndentedString(locationType)).append("\n"); + sb.append(" worldId: ").append(toIndentedString(worldId)).append("\n"); + sb.append(" worldName: ").append(toIndentedString(worldName)).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("locationType", "worldId", "worldName")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductPurchasePurchaseContext.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 `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(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(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(java.util.Locale.ROOT, "Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductPurchasePurchaseContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductPurchasePurchaseContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductPurchasePurchaseContext.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductPurchasePurchaseContext value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductPurchasePurchaseContext read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..cc255b57 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductPurchaseRecord.java @@ -0,0 +1,510 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductListingType; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * ProductPurchaseRecord + */ +@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(@javax.annotation.Nonnull Integer amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * @return amount + */ + @javax.annotation.Nonnull + public Integer getAmount() { + return amount; + } + + public void setAmount(@javax.annotation.Nonnull Integer amount) { + this.amount = amount; + } + + + public ProductPurchaseRecord balance(@javax.annotation.Nonnull Integer balance) { + this.balance = balance; + return this; + } + + /** + * Get balance + * @return balance + */ + @javax.annotation.Nonnull + public Integer getBalance() { + return balance; + } + + public void setBalance(@javax.annotation.Nonnull Integer balance) { + this.balance = balance; + } + + + public ProductPurchaseRecord date(@javax.annotation.Nonnull OffsetDateTime date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + */ + @javax.annotation.Nonnull + public OffsetDateTime getDate() { + return date; + } + + public void setDate(@javax.annotation.Nonnull OffsetDateTime date) { + this.date = date; + } + + + public ProductPurchaseRecord fromUserDisplayName(@javax.annotation.Nonnull String fromUserDisplayName) { + this.fromUserDisplayName = fromUserDisplayName; + return this; + } + + /** + * Get fromUserDisplayName + * @return fromUserDisplayName + */ + @javax.annotation.Nonnull + public String getFromUserDisplayName() { + return fromUserDisplayName; + } + + public void setFromUserDisplayName(@javax.annotation.Nonnull String fromUserDisplayName) { + this.fromUserDisplayName = fromUserDisplayName; + } + + + public ProductPurchaseRecord listingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { + this.listingDisplayName = listingDisplayName; + return this; + } + + /** + * Get listingDisplayName + * @return listingDisplayName + */ + @javax.annotation.Nonnull + public String getListingDisplayName() { + return listingDisplayName; + } + + public void setListingDisplayName(@javax.annotation.Nonnull String listingDisplayName) { + this.listingDisplayName = listingDisplayName; + } + + + public ProductPurchaseRecord listingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + return this; + } + + /** + * Get listingType + * @return listingType + */ + @javax.annotation.Nonnull + public ProductListingType getListingType() { + return listingType; + } + + public void setListingType(@javax.annotation.Nonnull ProductListingType listingType) { + this.listingType = listingType; + } + + + 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + } + + + public ProductPurchaseRecord purchaseId(@javax.annotation.Nonnull String purchaseId) { + this.purchaseId = purchaseId; + return this; + } + + /** + * Get purchaseId + * @return purchaseId + */ + @javax.annotation.Nonnull + public String getPurchaseId() { + return purchaseId; + } + + public void setPurchaseId(@javax.annotation.Nonnull String purchaseId) { + this.purchaseId = purchaseId; + } + + + public ProductPurchaseRecord reason(@javax.annotation.Nonnull Integer reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nonnull + public Integer getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nonnull Integer reason) { + this.reason = reason; + } + + + public ProductPurchaseRecord reasonLabel(@javax.annotation.Nonnull String reasonLabel) { + this.reasonLabel = reasonLabel; + return this; + } + + /** + * Get reasonLabel + * @return reasonLabel + */ + @javax.annotation.Nonnull + public String getReasonLabel() { + return reasonLabel; + } + + public void setReasonLabel(@javax.annotation.Nonnull String reasonLabel) { + this.reasonLabel = reasonLabel; + } + + + public ProductPurchaseRecord transactionId(@javax.annotation.Nonnull Integer transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * Get transactionId + * @return transactionId + */ + @javax.annotation.Nonnull + public Integer getTransactionId() { + return transactionId; + } + + public void setTransactionId(@javax.annotation.Nonnull Integer transactionId) { + this.transactionId = transactionId; + } + + + public ProductPurchaseRecord transactionLineId(@javax.annotation.Nonnull Integer transactionLineId) { + this.transactionLineId = transactionLineId; + return this; + } + + /** + * Get transactionLineId + * @return transactionLineId + */ + @javax.annotation.Nonnull + public Integer getTransactionLineId() { + return transactionLineId; + } + + public void setTransactionLineId(@javax.annotation.Nonnull Integer transactionLineId) { + this.transactionLineId = transactionLineId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductPurchaseRecord productPurchaseRecord = (ProductPurchaseRecord) o; + return Objects.equals(this.amount, productPurchaseRecord.amount) && + Objects.equals(this.balance, productPurchaseRecord.balance) && + Objects.equals(this.date, productPurchaseRecord.date) && + Objects.equals(this.fromUserDisplayName, productPurchaseRecord.fromUserDisplayName) && + Objects.equals(this.listingDisplayName, productPurchaseRecord.listingDisplayName) && + Objects.equals(this.listingType, productPurchaseRecord.listingType) && + Objects.equals(this.platform, productPurchaseRecord.platform) && + Objects.equals(this.purchaseId, productPurchaseRecord.purchaseId) && + Objects.equals(this.reason, productPurchaseRecord.reason) && + Objects.equals(this.reasonLabel, productPurchaseRecord.reasonLabel) && + Objects.equals(this.transactionId, productPurchaseRecord.transactionId) && + Objects.equals(this.transactionLineId, productPurchaseRecord.transactionLineId); + } + + @Override + public int hashCode() { + return Objects.hash(amount, balance, date, fromUserDisplayName, listingDisplayName, listingType, platform, purchaseId, reason, reasonLabel, transactionId, transactionLineId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductPurchaseRecord {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" fromUserDisplayName: ").append(toIndentedString(fromUserDisplayName)).append("\n"); + sb.append(" listingDisplayName: ").append(toIndentedString(listingDisplayName)).append("\n"); + sb.append(" listingType: ").append(toIndentedString(listingType)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" purchaseId: ").append(toIndentedString(purchaseId)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" reasonLabel: ").append(toIndentedString(reasonLabel)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" transactionLineId: ").append(toIndentedString(transactionLineId)).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("amount", "balance", "date", "fromUserDisplayName", "listingDisplayName", "listingType", "platform", "purchaseId", "reason", "reasonLabel", "transactionId", "transactionLineId")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ProductPurchaseRecord.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `reasonLabel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reasonLabel").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProductPurchaseRecord.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductPurchaseRecord' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductPurchaseRecord.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProductPurchaseRecord value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ProductPurchaseRecord read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..849973a5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ProductType.java @@ -0,0 +1,81 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 ProductType + */ +@JsonAdapter(ProductType.Adapter.class) +public enum ProductType { + + INVENTORY("inventory"), + + LISTING("listing"), + + ROLE("role"), + + UDON("udon"); + + private String value; + + ProductType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProductType fromValue(String value) { + for (ProductType b : ProductType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ProductType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProductType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ProductType.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProductType.fromValue(value); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/ProfileRepresentedGroup.java b/src/main/java/io/github/vrchatapi/model/ProfileRepresentedGroup.java new file mode 100644 index 00000000..d53bdb2c --- /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 + * 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 new file mode 100644 index 00000000..c1ecc3dc --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Prop.java @@ -0,0 +1,662 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.PropUnityPackage; +import io.github.vrchatapi.model.ReleaseStatus; +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; + +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; + +/** + * + */ +@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(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public Prop updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + 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 + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nonnull String authorId) { + this.authorId = authorId; + } + + + public Prop authorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Get authorName + * @return authorName + */ + @javax.annotation.Nonnull + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nonnull String authorName) { + this.authorName = authorName; + } + + + public Prop description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public Prop id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Prop imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public Prop maxCountPerUser(@javax.annotation.Nonnull Integer maxCountPerUser) { + this.maxCountPerUser = maxCountPerUser; + return this; + } + + /** + * Get maxCountPerUser + * @return maxCountPerUser + */ + @javax.annotation.Nonnull + public Integer getMaxCountPerUser() { + return maxCountPerUser; + } + + public void setMaxCountPerUser(@javax.annotation.Nonnull Integer maxCountPerUser) { + this.maxCountPerUser = maxCountPerUser; + } + + + public Prop name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public Prop releaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; + return this; + } + + /** + * Get releaseStatus + * @return releaseStatus + */ + @javax.annotation.Nonnull + public ReleaseStatus getReleaseStatus() { + return releaseStatus; + } + + public void setReleaseStatus(@javax.annotation.Nonnull ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; + } + + + 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 + public Integer getSpawnType() { + return spawnType; + } + + public void setSpawnType(@javax.annotation.Nonnull Integer spawnType) { + this.spawnType = spawnType; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public Prop thumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; + return this; + } + + /** + * Get thumbnailImageUrl + * @return thumbnailImageUrl + */ + @javax.annotation.Nonnull + public String getThumbnailImageUrl() { + return thumbnailImageUrl; + } + + public void setThumbnailImageUrl(@javax.annotation.Nonnull String thumbnailImageUrl) { + this.thumbnailImageUrl = thumbnailImageUrl; + } + + + public Prop unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; + return this; + } + + /** + * Get unityPackageUrl + * @return unityPackageUrl + */ + @javax.annotation.Nullable + public String getUnityPackageUrl() { + return unityPackageUrl; + } + + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; + } + + + 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 + public Set getUnityPackages() { + return unityPackages; + } + + public void setUnityPackages(@javax.annotation.Nonnull Set unityPackages) { + this.unityPackages = unityPackages; + } + + + 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 + public Integer getWorldPlacementMask() { + return worldPlacementMask; + } + + public void setWorldPlacementMask(@javax.annotation.Nonnull Integer worldPlacementMask) { + this.worldPlacementMask = worldPlacementMask; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Prop prop = (Prop) o; + return Objects.equals(this.createdAt, prop.createdAt) && + Objects.equals(this.updatedAt, prop.updatedAt) && + Objects.equals(this.authorId, prop.authorId) && + Objects.equals(this.authorName, prop.authorName) && + Objects.equals(this.description, prop.description) && + Objects.equals(this.id, prop.id) && + Objects.equals(this.imageUrl, prop.imageUrl) && + Objects.equals(this.maxCountPerUser, prop.maxCountPerUser) && + Objects.equals(this.name, prop.name) && + Objects.equals(this.releaseStatus, prop.releaseStatus) && + Objects.equals(this.spawnType, prop.spawnType) && + Objects.equals(this.tags, prop.tags) && + Objects.equals(this.thumbnailImageUrl, prop.thumbnailImageUrl) && + Objects.equals(this.unityPackageUrl, prop.unityPackageUrl) && + Objects.equals(this.unityPackages, prop.unityPackages) && + Objects.equals(this.worldPlacementMask, prop.worldPlacementMask); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, updatedAt, authorId, authorName, description, id, imageUrl, maxCountPerUser, name, releaseStatus, spawnType, tags, thumbnailImageUrl, unityPackageUrl, unityPackages, worldPlacementMask); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Prop {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" maxCountPerUser: ").append(toIndentedString(maxCountPerUser)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); + sb.append(" spawnType: ").append(toIndentedString(spawnType)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" thumbnailImageUrl: ").append(toIndentedString(thumbnailImageUrl)).append("\n"); + sb.append(" unityPackageUrl: ").append(toIndentedString(unityPackageUrl)).append("\n"); + sb.append(" unityPackages: ").append(toIndentedString(unityPackages)).append("\n"); + sb.append(" worldPlacementMask: ").append(toIndentedString(worldPlacementMask)).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("_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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Prop.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 `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 (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(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(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(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(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(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(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(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(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(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("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)); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Prop.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Prop' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Prop.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Prop value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Prop read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..b73a20d4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PropPublishStatus.java @@ -0,0 +1,198 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * PropPublishStatus + */ +@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(@javax.annotation.Nullable Boolean canPublish) { + this.canPublish = canPublish; + return this; + } + + /** + * Get canPublish + * @return canPublish + */ + @javax.annotation.Nullable + public Boolean getCanPublish() { + return canPublish; + } + + public void setCanPublish(@javax.annotation.Nullable Boolean canPublish) { + this.canPublish = canPublish; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PropPublishStatus propPublishStatus = (PropPublishStatus) o; + return Objects.equals(this.canPublish, propPublishStatus.canPublish); + } + + @Override + public int hashCode() { + return Objects.hash(canPublish); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PropPublishStatus {\n"); + sb.append(" canPublish: ").append(toIndentedString(canPublish)).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("canPublish")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PropPublishStatus.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 `PropPublishStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PropPublishStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PropPublishStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PropPublishStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PropPublishStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PropPublishStatus read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..4282439d --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PropUnityPackage.java @@ -0,0 +1,351 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * + */ +@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(@javax.annotation.Nonnull String assetUrl) { + this.assetUrl = assetUrl; + return this; + } + + /** + * Get assetUrl + * @return assetUrl + */ + @javax.annotation.Nonnull + public String getAssetUrl() { + return assetUrl; + } + + public void setAssetUrl(@javax.annotation.Nonnull String assetUrl) { + this.assetUrl = assetUrl; + } + + + public PropUnityPackage assetVersion(@javax.annotation.Nonnull Integer assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get assetVersion + * minimum: 0 + * @return assetVersion + */ + @javax.annotation.Nonnull + public Integer getAssetVersion() { + return assetVersion; + } + + public void setAssetVersion(@javax.annotation.Nonnull Integer assetVersion) { + this.assetVersion = assetVersion; + } + + + 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nonnull String platform) { + this.platform = platform; + } + + + public PropUnityPackage propSignature(@javax.annotation.Nonnull String propSignature) { + this.propSignature = propSignature; + return this; + } + + /** + * Get propSignature + * @return propSignature + */ + @javax.annotation.Nonnull + public String getPropSignature() { + return propSignature; + } + + public void setPropSignature(@javax.annotation.Nonnull String propSignature) { + this.propSignature = propSignature; + } + + + public PropUnityPackage unityVersion(@javax.annotation.Nonnull String unityVersion) { + this.unityVersion = unityVersion; + return this; + } + + /** + * Get unityVersion + * @return unityVersion + */ + @javax.annotation.Nonnull + public String getUnityVersion() { + return unityVersion; + } + + public void setUnityVersion(@javax.annotation.Nonnull String unityVersion) { + this.unityVersion = unityVersion; + } + + + public PropUnityPackage variant(@javax.annotation.Nonnull String variant) { + this.variant = variant; + return this; + } + + /** + * Get variant + * @return variant + */ + @javax.annotation.Nonnull + public String getVariant() { + return variant; + } + + public void setVariant(@javax.annotation.Nonnull String variant) { + this.variant = variant; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PropUnityPackage propUnityPackage = (PropUnityPackage) o; + return Objects.equals(this.assetUrl, propUnityPackage.assetUrl) && + Objects.equals(this.assetVersion, propUnityPackage.assetVersion) && + Objects.equals(this.platform, propUnityPackage.platform) && + Objects.equals(this.propSignature, propUnityPackage.propSignature) && + Objects.equals(this.unityVersion, propUnityPackage.unityVersion) && + Objects.equals(this.variant, propUnityPackage.variant); + } + + @Override + public int hashCode() { + return Objects.hash(assetUrl, assetVersion, platform, propSignature, unityVersion, variant); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PropUnityPackage {\n"); + sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); + sb.append(" assetVersion: ").append(toIndentedString(assetVersion)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" propSignature: ").append(toIndentedString(propSignature)).append("\n"); + sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); + sb.append(" variant: ").append(toIndentedString(variant)).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("assetUrl", "assetVersion", "platform", "propSignature", "unityVersion", "variant")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("assetUrl", "assetVersion", "platform", "propSignature", "unityVersion", "variant")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PropUnityPackage.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 `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 (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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `variant` to be a primitive type in the JSON string but got `%s`", jsonObj.get("variant").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PropUnityPackage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PropUnityPackage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PropUnityPackage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PropUnityPackage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PropUnityPackage read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/io/github/vrchatapi/model/PublicAnnouncement.java b/src/main/java/io/github/vrchatapi/model/PublicAnnouncement.java deleted file mode 100644 index 1678ee15..00000000 --- a/src/main/java/io/github/vrchatapi/model/PublicAnnouncement.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * VRChat API Documentation - * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org - * - * 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; - -/** - * Public Announcement - */ -@ApiModel(description = "Public Announcement") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PublicAnnouncement { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TEXT = "text"; - @SerializedName(SERIALIZED_NAME_TEXT) - private String text; - - - public PublicAnnouncement name(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) { - this.name = name; - } - - - public PublicAnnouncement text(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) { - this.text = text; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PublicAnnouncement publicAnnouncement = (PublicAnnouncement) o; - return Objects.equals(this.name, publicAnnouncement.name) && - Objects.equals(this.text, publicAnnouncement.text); - } - - @Override - public int hashCode() { - return Objects.hash(name, text); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PublicAnnouncement {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).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 "); - } - -} - 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..37acd7e0 --- /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 + * 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 new file mode 100644 index 00000000..ff22cb6e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PurchaseContextData.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductPurchaseLocationType; +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; + +/** + * PurchaseContextData + */ +@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(@javax.annotation.Nonnull ProductPurchaseLocationType locationType) { + this.locationType = locationType; + return this; + } + + /** + * Get locationType + * @return locationType + */ + @javax.annotation.Nonnull + public ProductPurchaseLocationType getLocationType() { + return locationType; + } + + public void setLocationType(@javax.annotation.Nonnull ProductPurchaseLocationType locationType) { + this.locationType = locationType; + } + + + public PurchaseContextData storeId(@javax.annotation.Nullable String storeId) { + this.storeId = storeId; + return this; + } + + /** + * Get storeId + * @return storeId + */ + @javax.annotation.Nullable + public String getStoreId() { + return storeId; + } + + public void setStoreId(@javax.annotation.Nullable String storeId) { + this.storeId = storeId; + } + + + 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 + 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; + } + PurchaseContextData purchaseContextData = (PurchaseContextData) o; + return Objects.equals(this.locationType, purchaseContextData.locationType) && + Objects.equals(this.storeId, purchaseContextData.storeId) && + Objects.equals(this.worldId, purchaseContextData.worldId); + } + + @Override + public int hashCode() { + return Objects.hash(locationType, storeId, worldId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PurchaseContextData {\n"); + sb.append(" locationType: ").append(toIndentedString(locationType)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).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("locationType", "storeId", "worldId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("locationType")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PurchaseContextData.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 `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 (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(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(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 (!PurchaseContextData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PurchaseContextData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PurchaseContextData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PurchaseContextData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PurchaseContextData read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..a4766704 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/PurchaseProductListingRequest.java @@ -0,0 +1,378 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.PurchaseContextData; +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; + +/** + * PurchaseProductListingRequest + */ +@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(@javax.annotation.Nullable PurchaseContextData contextData) { + this.contextData = contextData; + return this; + } + + /** + * Get contextData + * @return contextData + */ + @javax.annotation.Nullable + public PurchaseContextData getContextData() { + return contextData; + } + + public void setContextData(@javax.annotation.Nullable PurchaseContextData contextData) { + this.contextData = contextData; + } + + + public PurchaseProductListingRequest listingId(@javax.annotation.Nonnull String listingId) { + this.listingId = listingId; + return this; + } + + /** + * Get listingId + * @return listingId + */ + @javax.annotation.Nonnull + public String getListingId() { + return listingId; + } + + public void setListingId(@javax.annotation.Nonnull String listingId) { + this.listingId = listingId; + } + + + public PurchaseProductListingRequest listingVariantId(@javax.annotation.Nullable String listingVariantId) { + this.listingVariantId = listingVariantId; + return this; + } + + /** + * Get listingVariantId + * @return listingVariantId + */ + @javax.annotation.Nullable + public String getListingVariantId() { + return listingVariantId; + } + + public void setListingVariantId(@javax.annotation.Nullable String listingVariantId) { + this.listingVariantId = listingVariantId; + } + + + public PurchaseProductListingRequest quantity(@javax.annotation.Nonnull Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * minimum: 1 + * maximum: 99 + * @return quantity + */ + @javax.annotation.Nonnull + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(@javax.annotation.Nonnull Integer quantity) { + this.quantity = quantity; + } + + + 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 + public String getReceiverId() { + return receiverId; + } + + public void setReceiverId(@javax.annotation.Nullable String receiverId) { + this.receiverId = receiverId; + } + + + public PurchaseProductListingRequest stackable(@javax.annotation.Nullable Boolean stackable) { + this.stackable = stackable; + return this; + } + + /** + * Get stackable + * @return stackable + */ + @javax.annotation.Nullable + public Boolean getStackable() { + return stackable; + } + + public void setStackable(@javax.annotation.Nullable Boolean stackable) { + this.stackable = stackable; + } + + + public PurchaseProductListingRequest totalPrice(@javax.annotation.Nonnull Integer totalPrice) { + this.totalPrice = totalPrice; + return this; + } + + /** + * Get totalPrice + * minimum: 0 + * @return totalPrice + */ + @javax.annotation.Nonnull + public Integer getTotalPrice() { + return totalPrice; + } + + public void setTotalPrice(@javax.annotation.Nonnull Integer totalPrice) { + this.totalPrice = totalPrice; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PurchaseProductListingRequest purchaseProductListingRequest = (PurchaseProductListingRequest) o; + return Objects.equals(this.contextData, purchaseProductListingRequest.contextData) && + Objects.equals(this.listingId, purchaseProductListingRequest.listingId) && + Objects.equals(this.listingVariantId, purchaseProductListingRequest.listingVariantId) && + Objects.equals(this.quantity, purchaseProductListingRequest.quantity) && + Objects.equals(this.receiverId, purchaseProductListingRequest.receiverId) && + Objects.equals(this.stackable, purchaseProductListingRequest.stackable) && + Objects.equals(this.totalPrice, purchaseProductListingRequest.totalPrice); + } + + @Override + public int hashCode() { + return Objects.hash(contextData, listingId, listingVariantId, quantity, receiverId, stackable, totalPrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PurchaseProductListingRequest {\n"); + sb.append(" contextData: ").append(toIndentedString(contextData)).append("\n"); + sb.append(" listingId: ").append(toIndentedString(listingId)).append("\n"); + sb.append(" listingVariantId: ").append(toIndentedString(listingVariantId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" receiverId: ").append(toIndentedString(receiverId)).append("\n"); + sb.append(" stackable: ").append(toIndentedString(stackable)).append("\n"); + sb.append(" totalPrice: ").append(toIndentedString(totalPrice)).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("contextData", "listingId", "listingVariantId", "quantity", "receiverId", "stackable", "totalPrice")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("listingId", "quantity", "totalPrice")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PurchaseProductListingRequest.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 `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 (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.validateJsonElement(jsonObj.get("contextData")); + } + if (!jsonObj.get("listingId").isJsonPrimitive()) { + 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(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(java.util.Locale.ROOT, "Expected the field `receiverId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("receiverId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PurchaseProductListingRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PurchaseProductListingRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PurchaseProductListingRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PurchaseProductListingRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PurchaseProductListingRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 ab99bdcb..cb22a40f 100644 --- a/src/main/java/io/github/vrchatapi/model/Region.java +++ b/src/main/java/io/github/vrchatapi/model/Region.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,19 @@ @JsonAdapter(Region.Adapter.class) public enum Region { + EU("eu"), + + JP("jp"), + + UNKNOWN("unknown"), + US("us"), USE("use"), - EU("eu"), - - JP("jp"), + USW("usw"), - UNKNOWN("unknown"); + USX("usx"); private String value; @@ -75,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 new file mode 100644 index 00000000..f21cbb22 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RegisterUserAccountRequest.java @@ -0,0 +1,434 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * RegisterUserAccountRequest + */ +@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(@javax.annotation.Nonnull Integer acceptedTOSVersion) { + this.acceptedTOSVersion = acceptedTOSVersion; + return this; + } + + /** + * The most recent version of the TOS + * @return acceptedTOSVersion + */ + @javax.annotation.Nonnull + public Integer getAcceptedTOSVersion() { + return acceptedTOSVersion; + } + + public void setAcceptedTOSVersion(@javax.annotation.Nonnull Integer acceptedTOSVersion) { + this.acceptedTOSVersion = acceptedTOSVersion; + } + + + public RegisterUserAccountRequest captchaCode(@javax.annotation.Nonnull String captchaCode) { + this.captchaCode = captchaCode; + return this; + } + + /** + * Captcha code + * @return captchaCode + */ + @javax.annotation.Nonnull + public String getCaptchaCode() { + return captchaCode; + } + + public void setCaptchaCode(@javax.annotation.Nonnull String captchaCode) { + this.captchaCode = captchaCode; + } + + + public RegisterUserAccountRequest day(@javax.annotation.Nonnull String day) { + this.day = day; + return this; + } + + /** + * Birth day of month + * @return day + */ + @javax.annotation.Nonnull + public String getDay() { + return day; + } + + public void setDay(@javax.annotation.Nonnull String day) { + this.day = day; + } + + + public RegisterUserAccountRequest email(@javax.annotation.Nonnull String email) { + this.email = email; + return this; + } + + /** + * Email address + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nonnull String email) { + this.email = email; + } + + + public RegisterUserAccountRequest month(@javax.annotation.Nonnull String month) { + this.month = month; + return this; + } + + /** + * Birth month of year + * @return month + */ + @javax.annotation.Nonnull + public String getMonth() { + return month; + } + + public void setMonth(@javax.annotation.Nonnull String month) { + this.month = month; + } + + + public RegisterUserAccountRequest password(@javax.annotation.Nonnull String password) { + this.password = password; + return this; + } + + /** + * Password + * @return password + */ + @javax.annotation.Nonnull + public String getPassword() { + return password; + } + + public void setPassword(@javax.annotation.Nonnull String password) { + this.password = password; + } + + + public RegisterUserAccountRequest subscribe(@javax.annotation.Nonnull Boolean subscribe) { + this.subscribe = subscribe; + return this; + } + + /** + * Whether to receive promotional emails + * @return subscribe + */ + @javax.annotation.Nonnull + public Boolean getSubscribe() { + return subscribe; + } + + public void setSubscribe(@javax.annotation.Nonnull Boolean subscribe) { + this.subscribe = subscribe; + } + + + 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 + public String getUsername() { + return username; + } + + public void setUsername(@javax.annotation.Nonnull String username) { + this.username = username; + } + + + public RegisterUserAccountRequest year(@javax.annotation.Nonnull String year) { + this.year = year; + return this; + } + + /** + * Birth year + * @return year + */ + @javax.annotation.Nonnull + public String getYear() { + return year; + } + + public void setYear(@javax.annotation.Nonnull String year) { + this.year = year; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RegisterUserAccountRequest registerUserAccountRequest = (RegisterUserAccountRequest) o; + return Objects.equals(this.acceptedTOSVersion, registerUserAccountRequest.acceptedTOSVersion) && + Objects.equals(this.captchaCode, registerUserAccountRequest.captchaCode) && + Objects.equals(this.day, registerUserAccountRequest.day) && + Objects.equals(this.email, registerUserAccountRequest.email) && + Objects.equals(this.month, registerUserAccountRequest.month) && + Objects.equals(this.password, registerUserAccountRequest.password) && + Objects.equals(this.subscribe, registerUserAccountRequest.subscribe) && + Objects.equals(this.username, registerUserAccountRequest.username) && + Objects.equals(this.year, registerUserAccountRequest.year); + } + + @Override + public int hashCode() { + return Objects.hash(acceptedTOSVersion, captchaCode, day, email, month, password, subscribe, username, year); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RegisterUserAccountRequest {\n"); + sb.append(" acceptedTOSVersion: ").append(toIndentedString(acceptedTOSVersion)).append("\n"); + sb.append(" captchaCode: ").append(toIndentedString(captchaCode)).append("\n"); + sb.append(" day: ").append(toIndentedString(day)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" month: ").append(toIndentedString(month)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" subscribe: ").append(toIndentedString(subscribe)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" year: ").append(toIndentedString(year)).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("acceptedTOSVersion", "captchaCode", "day", "email", "month", "password", "subscribe", "username", "year")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RegisterUserAccountRequest.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 `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 (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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `year` to be a primitive type in the JSON string but got `%s`", jsonObj.get("year").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RegisterUserAccountRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RegisterUserAccountRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RegisterUserAccountRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RegisterUserAccountRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RegisterUserAccountRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 2fb0873e..7cf79173 100644 --- a/src/main/java/io/github/vrchatapi/model/ReleaseStatus.java +++ b/src/main/java/io/github/vrchatapi/model/ReleaseStatus.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,11 +28,13 @@ @JsonAdapter(ReleaseStatus.Adapter.class) public enum ReleaseStatus { - PUBLIC("public"), + ALL("all"), + + HIDDEN("hidden"), PRIVATE("private"), - HIDDEN("hidden"); + PUBLIC("public"); private String value; @@ -70,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 new file mode 100644 index 00000000..8a28432a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ReportCategory.java @@ -0,0 +1,295 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * A category used for reporting content + */ +@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(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * The description of the report category + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public ReportCategory text(@javax.annotation.Nonnull String text) { + this.text = text; + return this; + } + + /** + * The label of the report category + * @return text + */ + @javax.annotation.Nonnull + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nonnull String text) { + this.text = text; + } + + + public ReportCategory title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * The title of the report category + * @return title + */ + @javax.annotation.Nullable + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + + public ReportCategory tooltip(@javax.annotation.Nonnull String tooltip) { + this.tooltip = tooltip; + return this; + } + + /** + * The tooltip that describes the category + * @return tooltip + */ + @javax.annotation.Nonnull + public String getTooltip() { + return tooltip; + } + + public void setTooltip(@javax.annotation.Nonnull String tooltip) { + this.tooltip = tooltip; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportCategory reportCategory = (ReportCategory) o; + return Objects.equals(this.description, reportCategory.description) && + Objects.equals(this.text, reportCategory.text) && + Objects.equals(this.title, reportCategory.title) && + Objects.equals(this.tooltip, reportCategory.tooltip); + } + + @Override + public int hashCode() { + return Objects.hash(description, text, title, tooltip); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportCategory {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" tooltip: ").append(toIndentedString(tooltip)).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("description", "text", "title", "tooltip")); + + // a set of required properties/fields (JSON key names) + 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReportCategory.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 `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 (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(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(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(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(java.util.Locale.ROOT, "Expected the field `tooltip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tooltip").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReportCategory.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReportCategory' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReportCategory.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReportCategory value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReportCategory read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..98d6fabd --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ReportReason.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * A reason used for reporting users + */ +@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(@javax.annotation.Nonnull String text) { + this.text = text; + return this; + } + + /** + * The label or name of the report reason + * @return text + */ + @javax.annotation.Nonnull + public String getText() { + return text; + } + + public void setText(@javax.annotation.Nonnull String text) { + this.text = text; + } + + + 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 + public String getTooltip() { + return tooltip; + } + + public void setTooltip(@javax.annotation.Nonnull String tooltip) { + this.tooltip = tooltip; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportReason reportReason = (ReportReason) o; + return Objects.equals(this.text, reportReason.text) && + Objects.equals(this.tooltip, reportReason.tooltip); + } + + @Override + public int hashCode() { + return Objects.hash(text, tooltip); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportReason {\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" tooltip: ").append(toIndentedString(tooltip)).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("text", "tooltip")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReportReason.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `tooltip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tooltip").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReportReason.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReportReason' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReportReason.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReportReason value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReportReason read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..3b63005e --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RepresentedGroup.java @@ -0,0 +1,588 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPrivacy; +import io.github.vrchatapi.model.GroupUserVisibility; +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; + +/** + * RepresentedGroup + */ +@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(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + return this; + } + + /** + * Get bannerId + * @return bannerId + */ + @javax.annotation.Nullable + public String getBannerId() { + return bannerId; + } + + public void setBannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + } + + + public RepresentedGroup 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 RepresentedGroup description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public RepresentedGroup discriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + return this; + } + + /** + * Get discriminator + * @return discriminator + */ + @javax.annotation.Nullable + public String getDiscriminator() { + return discriminator; + } + + public void setDiscriminator(@javax.annotation.Nullable String discriminator) { + this.discriminator = discriminator; + } + + + public RepresentedGroup groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public RepresentedGroup iconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + return this; + } + + /** + * Get iconId + * @return iconId + */ + @javax.annotation.Nullable + public String getIconId() { + return iconId; + } + + public void setIconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + } + + + public RepresentedGroup 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 RepresentedGroup isRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + return this; + } + + /** + * Get isRepresenting + * @return isRepresenting + */ + @javax.annotation.Nullable + public Boolean getIsRepresenting() { + return isRepresenting; + } + + public void setIsRepresenting(@javax.annotation.Nullable Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + } + + + public RepresentedGroup memberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + return this; + } + + /** + * Get memberCount + * @return memberCount + */ + @javax.annotation.Nullable + public Integer getMemberCount() { + return memberCount; + } + + public void setMemberCount(@javax.annotation.Nullable Integer memberCount) { + this.memberCount = memberCount; + } + + + public RepresentedGroup memberVisibility(@javax.annotation.Nullable GroupUserVisibility memberVisibility) { + this.memberVisibility = memberVisibility; + return this; + } + + /** + * Get memberVisibility + * @return memberVisibility + */ + @javax.annotation.Nullable + public GroupUserVisibility getMemberVisibility() { + return memberVisibility; + } + + public void setMemberVisibility(@javax.annotation.Nullable GroupUserVisibility memberVisibility) { + this.memberVisibility = memberVisibility; + } + + + public RepresentedGroup name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public 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 + public String getOwnerId() { + return ownerId; + } + + public void setOwnerId(@javax.annotation.Nullable String ownerId) { + this.ownerId = ownerId; + } + + + public RepresentedGroup privacy(@javax.annotation.Nullable GroupPrivacy privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get privacy + * @return privacy + */ + @javax.annotation.Nullable + public GroupPrivacy getPrivacy() { + return privacy; + } + + public void setPrivacy(@javax.annotation.Nullable GroupPrivacy privacy) { + this.privacy = privacy; + } + + + public RepresentedGroup shortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + return this; + } + + /** + * Get shortCode + * @return shortCode + */ + @javax.annotation.Nullable + public String getShortCode() { + return shortCode; + } + + public void setShortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepresentedGroup representedGroup = (RepresentedGroup) o; + return Objects.equals(this.bannerId, representedGroup.bannerId) && + Objects.equals(this.bannerUrl, representedGroup.bannerUrl) && + Objects.equals(this.description, representedGroup.description) && + Objects.equals(this.discriminator, representedGroup.discriminator) && + Objects.equals(this.groupId, representedGroup.groupId) && + Objects.equals(this.iconId, representedGroup.iconId) && + Objects.equals(this.iconUrl, representedGroup.iconUrl) && + Objects.equals(this.isRepresenting, representedGroup.isRepresenting) && + Objects.equals(this.memberCount, representedGroup.memberCount) && + Objects.equals(this.memberVisibility, representedGroup.memberVisibility) && + Objects.equals(this.name, representedGroup.name) && + Objects.equals(this.ownerId, representedGroup.ownerId) && + Objects.equals(this.privacy, representedGroup.privacy) && + Objects.equals(this.shortCode, representedGroup.shortCode); + } + + 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(bannerId, bannerUrl, description, discriminator, groupId, iconId, iconUrl, isRepresenting, memberCount, memberVisibility, name, ownerId, privacy, shortCode); + } + + 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 RepresentedGroup {\n"); + sb.append(" bannerId: ").append(toIndentedString(bannerId)).append("\n"); + sb.append(" bannerUrl: ").append(toIndentedString(bannerUrl)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" discriminator: ").append(toIndentedString(discriminator)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" iconId: ").append(toIndentedString(iconId)).append("\n"); + sb.append(" iconUrl: ").append(toIndentedString(iconUrl)).append("\n"); + sb.append(" isRepresenting: ").append(toIndentedString(isRepresenting)).append("\n"); + sb.append(" memberCount: ").append(toIndentedString(memberCount)).append("\n"); + sb.append(" memberVisibility: ").append(toIndentedString(memberVisibility)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); + sb.append(" privacy: ").append(toIndentedString(privacy)).append("\n"); + sb.append(" shortCode: ").append(toIndentedString(shortCode)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RepresentedGroup.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 `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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `shortCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shortCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RepresentedGroup.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RepresentedGroup' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RepresentedGroup.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RepresentedGroup value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RepresentedGroup read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 c8ec24e7..74e1042b 100644 --- a/src/main/java/io/github/vrchatapi/model/RequestInviteRequest.java +++ b/src/main/java/io/github/vrchatapi/model/RequestInviteRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,51 +13,72 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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_MESSAGE_SLOT = "messageSlot"; - @SerializedName(SERIALIZED_NAME_MESSAGE_SLOT) - private Integer messageSlot; + public static final String SERIALIZED_NAME_REQUEST_SLOT = "requestSlot"; + @SerializedName(SERIALIZED_NAME_REQUEST_SLOT) + @javax.annotation.Nullable + private Integer requestSlot; + public RequestInviteRequest() { + } - public RequestInviteRequest messageSlot(Integer messageSlot) { - - this.messageSlot = messageSlot; + public RequestInviteRequest requestSlot(@javax.annotation.Nullable Integer requestSlot) { + this.requestSlot = requestSlot; return this; } - /** - * Get messageSlot + /** + * Get requestSlot * minimum: 0 * maximum: 11 - * @return messageSlot - **/ + * @return requestSlot + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getMessageSlot() { - return messageSlot; + public Integer getRequestSlot() { + return requestSlot; } - - public void setMessageSlot(Integer messageSlot) { - this.messageSlot = messageSlot; + public void setRequestSlot(@javax.annotation.Nullable Integer requestSlot) { + this.requestSlot = requestSlot; } + @Override public boolean equals(Object o) { if (this == o) { @@ -67,19 +88,19 @@ public boolean equals(Object o) { return false; } RequestInviteRequest requestInviteRequest = (RequestInviteRequest) o; - return Objects.equals(this.messageSlot, requestInviteRequest.messageSlot); + return Objects.equals(this.requestSlot, requestInviteRequest.requestSlot); } @Override public int hashCode() { - return Objects.hash(messageSlot); + return Objects.hash(requestSlot); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RequestInviteRequest {\n"); - sb.append(" messageSlot: ").append(toIndentedString(messageSlot)).append("\n"); + sb.append(" requestSlot: ").append(toIndentedString(requestSlot)).append("\n"); sb.append("}"); return sb.toString(); } @@ -89,11 +110,91 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("requestSlot")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RequestInviteRequest.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 `RequestInviteRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RequestInviteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RequestInviteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RequestInviteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RequestInviteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RequestInviteRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..e0913fbb --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RequestInviteWithPhotoRequest.java @@ -0,0 +1,235 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.RequestInviteRequest; +import java.io.File; +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; + +/** + * RequestInviteWithPhotoRequest + */ +@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(@javax.annotation.Nonnull RequestInviteRequest data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public RequestInviteRequest getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull RequestInviteRequest data) { + this.data = data; + } + + + 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 + public File getImage() { + return image; + } + + public void setImage(@javax.annotation.Nonnull File image) { + this.image = image; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestInviteWithPhotoRequest requestInviteWithPhotoRequest = (RequestInviteWithPhotoRequest) o; + return Objects.equals(this.data, requestInviteWithPhotoRequest.data) && + Objects.equals(this.image, requestInviteWithPhotoRequest.image); + } + + @Override + public int hashCode() { + return Objects.hash(data, image); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequestInviteWithPhotoRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" image: ").append(toIndentedString(image)).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("data", "image")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RequestInviteWithPhotoRequest.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 `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 (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.validateJsonElement(jsonObj.get("data")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RequestInviteWithPhotoRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RequestInviteWithPhotoRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RequestInviteWithPhotoRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RequestInviteWithPhotoRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RequestInviteWithPhotoRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..748b70be --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RespondGroupJoinRequest.java @@ -0,0 +1,234 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupJoinRequestAction; +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; + +/** + * RespondGroupJoinRequest + */ +@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(@javax.annotation.Nonnull GroupJoinRequestAction action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + */ + @javax.annotation.Nonnull + public GroupJoinRequestAction getAction() { + return action; + } + + public void setAction(@javax.annotation.Nonnull GroupJoinRequestAction action) { + this.action = action; + } + + + 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 + public Boolean getBlock() { + return block; + } + + public void setBlock(@javax.annotation.Nullable Boolean block) { + this.block = block; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RespondGroupJoinRequest respondGroupJoinRequest = (RespondGroupJoinRequest) o; + return Objects.equals(this.action, respondGroupJoinRequest.action) && + Objects.equals(this.block, respondGroupJoinRequest.block); + } + + @Override + public int hashCode() { + return Objects.hash(action, block); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RespondGroupJoinRequest {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" block: ").append(toIndentedString(block)).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("action", "block")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RespondGroupJoinRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RespondGroupJoinRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RespondGroupJoinRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RespondGroupJoinRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RespondGroupJoinRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RespondGroupJoinRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..cbfa3f5a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RespondInviteWithPhotoRequest.java @@ -0,0 +1,235 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InviteResponse; +import java.io.File; +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; + +/** + * RespondInviteWithPhotoRequest + */ +@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(@javax.annotation.Nonnull InviteResponse data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public InviteResponse getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull InviteResponse data) { + this.data = data; + } + + + 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 + public File getImage() { + return image; + } + + public void setImage(@javax.annotation.Nonnull File image) { + this.image = image; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RespondInviteWithPhotoRequest respondInviteWithPhotoRequest = (RespondInviteWithPhotoRequest) o; + return Objects.equals(this.data, respondInviteWithPhotoRequest.data) && + Objects.equals(this.image, respondInviteWithPhotoRequest.image); + } + + @Override + public int hashCode() { + return Objects.hash(data, image); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RespondInviteWithPhotoRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" image: ").append(toIndentedString(image)).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("data", "image")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RespondInviteWithPhotoRequest.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 `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 (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.validateJsonElement(jsonObj.get("data")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RespondInviteWithPhotoRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RespondInviteWithPhotoRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RespondInviteWithPhotoRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RespondInviteWithPhotoRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RespondInviteWithPhotoRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..4e48ce03 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RespondNotificationV2Request.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * RespondNotificationV2Request + */ +@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(@javax.annotation.Nullable String responseData) { + this.responseData = responseData; + return this; + } + + /** + * Get responseData + * @return responseData + */ + @javax.annotation.Nullable + public String getResponseData() { + return responseData; + } + + public void setResponseData(@javax.annotation.Nullable String responseData) { + this.responseData = responseData; + } + + + public RespondNotificationV2Request responseType(@javax.annotation.Nonnull String responseType) { + this.responseType = responseType; + return this; + } + + /** + * Get responseType + * @return responseType + */ + @javax.annotation.Nonnull + public String getResponseType() { + return responseType; + } + + public void setResponseType(@javax.annotation.Nonnull String responseType) { + this.responseType = responseType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RespondNotificationV2Request respondNotificationV2Request = (RespondNotificationV2Request) o; + return Objects.equals(this.responseData, respondNotificationV2Request.responseData) && + Objects.equals(this.responseType, respondNotificationV2Request.responseType); + } + + @Override + public int hashCode() { + return Objects.hash(responseData, responseType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RespondNotificationV2Request {\n"); + sb.append(" responseData: ").append(toIndentedString(responseData)).append("\n"); + sb.append(" responseType: ").append(toIndentedString(responseType)).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("responseData", "responseType")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RespondNotificationV2Request.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `responseType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RespondNotificationV2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RespondNotificationV2Request' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RespondNotificationV2Request.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RespondNotificationV2Request value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RespondNotificationV2Request read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 11d1f833..e008697f 100644 --- a/src/main/java/io/github/vrchatapi/model/Response.java +++ b/src/main/java/io/github/vrchatapi/model/Response.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,77 +13,95 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -117,11 +135,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("message", "status_code")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Response.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 `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 (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(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..1b267359 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RewardBadge.java @@ -0,0 +1,516 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * RewardBadge + */ +@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(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + 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 + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(@javax.annotation.Nonnull String createdBy) { + this.createdBy = createdBy; + } + + + public RewardBadge description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public RewardBadge fileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get fileName + * @return fileName + */ + @javax.annotation.Nonnull + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nonnull String fileName) { + this.fileName = fileName; + } + + + public RewardBadge hidden(@javax.annotation.Nonnull Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Get hidden + * @return hidden + */ + @javax.annotation.Nonnull + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nonnull Boolean hidden) { + this.hidden = hidden; + } + + + public RewardBadge id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public RewardBadge imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public RewardBadge isLocalizationEnabled(@javax.annotation.Nonnull Boolean isLocalizationEnabled) { + this.isLocalizationEnabled = isLocalizationEnabled; + return this; + } + + /** + * Get isLocalizationEnabled + * @return isLocalizationEnabled + */ + @javax.annotation.Nonnull + public Boolean getIsLocalizationEnabled() { + return isLocalizationEnabled; + } + + public void setIsLocalizationEnabled(@javax.annotation.Nonnull Boolean isLocalizationEnabled) { + this.isLocalizationEnabled = isLocalizationEnabled; + } + + + public RewardBadge machineName(@javax.annotation.Nullable String machineName) { + this.machineName = machineName; + return this; + } + + /** + * Get machineName + * @return machineName + */ + @javax.annotation.Nullable + public String getMachineName() { + return machineName; + } + + public void setMachineName(@javax.annotation.Nullable String machineName) { + this.machineName = machineName; + } + + + public RewardBadge name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + public RewardBadge type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public RewardBadge updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardBadge rewardBadge = (RewardBadge) o; + return Objects.equals(this.createdAt, rewardBadge.createdAt) && + Objects.equals(this.createdBy, rewardBadge.createdBy) && + Objects.equals(this.description, rewardBadge.description) && + Objects.equals(this.fileName, rewardBadge.fileName) && + Objects.equals(this.hidden, rewardBadge.hidden) && + Objects.equals(this.id, rewardBadge.id) && + Objects.equals(this.imageUrl, rewardBadge.imageUrl) && + Objects.equals(this.isLocalizationEnabled, rewardBadge.isLocalizationEnabled) && + Objects.equals(this.machineName, rewardBadge.machineName) && + Objects.equals(this.name, rewardBadge.name) && + Objects.equals(this.type, rewardBadge.type) && + Objects.equals(this.updatedAt, rewardBadge.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, createdBy, description, fileName, hidden, id, imageUrl, isLocalizationEnabled, machineName, name, type, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardBadge {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" isLocalizationEnabled: ").append(toIndentedString(isLocalizationEnabled)).append("\n"); + sb.append(" machineName: ").append(toIndentedString(machineName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("createdAt", "createdBy", "description", "fileName", "hidden", "id", "imageUrl", "isLocalizationEnabled", "machineName", "name", "type", "updatedAt")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RewardBadge.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 `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 (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(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(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(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(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(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(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(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(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 (!RewardBadge.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RewardBadge' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RewardBadge.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RewardBadge value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RewardBadge read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..23666fa6 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemption.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.RewardRedemptionData; +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; + +/** + * RewardRedemption + */ +@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(@javax.annotation.Nonnull RewardRedemptionData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nonnull + public RewardRedemptionData getData() { + return data; + } + + public void setData(@javax.annotation.Nonnull RewardRedemptionData data) { + this.data = data; + } + + + public RewardRedemption type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * One of `badge`, `item`, ... + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardRedemption rewardRedemption = (RewardRedemption) o; + return Objects.equals(this.data, rewardRedemption.data) && + Objects.equals(this.type, rewardRedemption.type); + } + + @Override + public int hashCode() { + return Objects.hash(data, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardRedemption {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\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("data", "type")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RewardRedemption.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 `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 (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.validateJsonElement(jsonObj.get("data")); + if (!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 (!RewardRedemption.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RewardRedemption' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RewardRedemption.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RewardRedemption value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RewardRedemption read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ec057903 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemptionData.java @@ -0,0 +1,234 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryTemplate; +import io.github.vrchatapi.model.RewardBadge; +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; + +/** + * RewardRedemptionData + */ +@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(@javax.annotation.Nullable RewardBadge badge) { + this.badge = badge; + return this; + } + + /** + * Get badge + * @return badge + */ + @javax.annotation.Nullable + public RewardBadge getBadge() { + return badge; + } + + public void setBadge(@javax.annotation.Nullable RewardBadge badge) { + this.badge = badge; + } + + + public RewardRedemptionData item(@javax.annotation.Nullable InventoryTemplate item) { + this.item = item; + return this; + } + + /** + * Get item + * @return item + */ + @javax.annotation.Nullable + public InventoryTemplate getItem() { + return item; + } + + public void setItem(@javax.annotation.Nullable InventoryTemplate item) { + this.item = item; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardRedemptionData rewardRedemptionData = (RewardRedemptionData) o; + return Objects.equals(this.badge, rewardRedemptionData.badge) && + Objects.equals(this.item, rewardRedemptionData.item); + } + + @Override + public int hashCode() { + return Objects.hash(badge, item); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardRedemptionData {\n"); + sb.append(" badge: ").append(toIndentedString(badge)).append("\n"); + sb.append(" item: ").append(toIndentedString(item)).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("badge", "item")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RewardRedemptionData.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 `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.validateJsonElement(jsonObj.get("badge")); + } + // validate the optional field `item` + if (jsonObj.get("item") != null && !jsonObj.get("item").isJsonNull()) { + InventoryTemplate.validateJsonElement(jsonObj.get("item")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RewardRedemptionData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RewardRedemptionData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RewardRedemptionData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RewardRedemptionData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RewardRedemptionData read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..b4a4abed --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemptionRequest.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * RewardRedemptionRequest + */ +@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(@javax.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nonnull String code) { + this.code = code; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardRedemptionRequest rewardRedemptionRequest = (RewardRedemptionRequest) o; + return Objects.equals(this.code, rewardRedemptionRequest.code); + } + + @Override + public int hashCode() { + return Objects.hash(code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardRedemptionRequest {\n"); + sb.append(" code: ").append(toIndentedString(code)).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("code")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RewardRedemptionRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RewardRedemptionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RewardRedemptionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RewardRedemptionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RewardRedemptionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RewardRedemptionRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..171a4da4 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/RewardRedemptionResult.java @@ -0,0 +1,255 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.RewardRedemption; +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; + +/** + * RewardRedemptionResult + */ +@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(@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 + public List getRedeemedRewards() { + return redeemedRewards; + } + + public void setRedeemedRewards(@javax.annotation.Nonnull List redeemedRewards) { + this.redeemedRewards = redeemedRewards; + } + + + public RewardRedemptionResult redemptionCode(@javax.annotation.Nonnull String redemptionCode) { + this.redemptionCode = redemptionCode; + return this; + } + + /** + * Get redemptionCode + * @return redemptionCode + */ + @javax.annotation.Nonnull + public String getRedemptionCode() { + return redemptionCode; + } + + public void setRedemptionCode(@javax.annotation.Nonnull String redemptionCode) { + this.redemptionCode = redemptionCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RewardRedemptionResult rewardRedemptionResult = (RewardRedemptionResult) o; + return Objects.equals(this.redeemedRewards, rewardRedemptionResult.redeemedRewards) && + Objects.equals(this.redemptionCode, rewardRedemptionResult.redemptionCode); + } + + @Override + public int hashCode() { + return Objects.hash(redeemedRewards, redemptionCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RewardRedemptionResult {\n"); + sb.append(" redeemedRewards: ").append(toIndentedString(redeemedRewards)).append("\n"); + sb.append(" redemptionCode: ").append(toIndentedString(redemptionCode)).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("redeemedRewards", "redemptionCode")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("redeemedRewards", "redemptionCode")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RewardRedemptionResult.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 `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 (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("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)); + } + } + if (!jsonObj.get("redemptionCode").isJsonPrimitive()) { + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RewardRedemptionResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RewardRedemptionResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RewardRedemptionResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RewardRedemptionResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RewardRedemptionResult read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..6d4341a2 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SearchGroupMembers200Response.java @@ -0,0 +1,249 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupMember; +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; + +/** + * SearchGroupMembers200Response + */ +@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) + @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(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public SearchGroupMembers200Response addResultsItem(GroupMember resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + + public SearchGroupMembers200Response total(@javax.annotation.Nullable Integer total) { + this.total = total; + return this; + } + + /** + * Number of members returned + * @return total + */ + @javax.annotation.Nullable + public Integer getTotal() { + return total; + } + + public void setTotal(@javax.annotation.Nullable Integer total) { + this.total = total; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchGroupMembers200Response searchGroupMembers200Response = (SearchGroupMembers200Response) o; + return Objects.equals(this.results, searchGroupMembers200Response.results) && + Objects.equals(this.total, searchGroupMembers200Response.total); + } + + @Override + public int hashCode() { + return Objects.hash(results, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchGroupMembers200Response {\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).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("results", "total")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchGroupMembers200Response.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 `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(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.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchGroupMembers200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchGroupMembers200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchGroupMembers200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchGroupMembers200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchGroupMembers200Response read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..bce8d070 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SellerEligibility.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * SellerEligibility + */ +@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(@javax.annotation.Nonnull Boolean eligible) { + this.eligible = eligible; + return this; + } + + /** + * Get eligible + * @return eligible + */ + @javax.annotation.Nonnull + public Boolean getEligible() { + return eligible; + } + + public void setEligible(@javax.annotation.Nonnull Boolean eligible) { + this.eligible = eligible; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SellerEligibility sellerEligibility = (SellerEligibility) o; + return Objects.equals(this.eligible, sellerEligibility.eligible); + } + + @Override + public int hashCode() { + return Objects.hash(eligible); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SellerEligibility {\n"); + sb.append(" eligible: ").append(toIndentedString(eligible)).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("eligible")); + + // a set of required properties/fields (JSON key names) + 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SellerEligibility.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SellerEligibility.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SellerEligibility' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SellerEligibility.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SellerEligibility value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SellerEligibility read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..4988429a --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SentNotification.java @@ -0,0 +1,421 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.NotificationType; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +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; + +/** + * + */ +@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) + @javax.annotation.Nonnull + private Map details = new HashMap<>(); + + 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) + @javax.annotation.Nonnull + private NotificationType type = NotificationType.FRIEND_REQUEST; + + public SentNotification() { + } + + public SentNotification createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public SentNotification details(@javax.annotation.Nonnull Map details) { + this.details = details; + return this; + } + + public SentNotification putDetailsItem(String key, String detailsItem) { + if (this.details == null) { + this.details = new HashMap<>(); + } + this.details.put(key, detailsItem); + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nonnull + public Map getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nonnull Map details) { + this.details = details; + } + + + public SentNotification id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public SentNotification message(@javax.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * + * @return message + */ + @javax.annotation.Nonnull + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nonnull String message) { + this.message = message; + } + + + 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 + public String getReceiverUserId() { + return receiverUserId; + } + + public void setReceiverUserId(@javax.annotation.Nonnull String receiverUserId) { + this.receiverUserId = receiverUserId; + } + + + 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 + public String getSenderUserId() { + return senderUserId; + } + + public void setSenderUserId(@javax.annotation.Nonnull String senderUserId) { + this.senderUserId = senderUserId; + } + + + @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 + public String getSenderUsername() { + return senderUsername; + } + + @Deprecated + public void setSenderUsername(@javax.annotation.Nullable String senderUsername) { + this.senderUsername = senderUsername; + } + + + public SentNotification type(@javax.annotation.Nonnull NotificationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nonnull + public NotificationType getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull NotificationType type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SentNotification sentNotification = (SentNotification) o; + return Objects.equals(this.createdAt, sentNotification.createdAt) && + Objects.equals(this.details, sentNotification.details) && + Objects.equals(this.id, sentNotification.id) && + Objects.equals(this.message, sentNotification.message) && + Objects.equals(this.receiverUserId, sentNotification.receiverUserId) && + Objects.equals(this.senderUserId, sentNotification.senderUserId) && + Objects.equals(this.senderUsername, sentNotification.senderUsername) && + Objects.equals(this.type, sentNotification.type); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, details, id, message, receiverUserId, senderUserId, senderUsername, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SentNotification {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" receiverUserId: ").append(toIndentedString(receiverUserId)).append("\n"); + sb.append(" senderUserId: ").append(toIndentedString(senderUserId)).append("\n"); + sb.append(" senderUsername: ").append(toIndentedString(senderUsername)).append("\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("created_at", "details", "id", "message", "receiverUserId", "senderUserId", "senderUsername", "type")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SentNotification.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 `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 (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(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(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(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(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(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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SentNotification.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SentNotification' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SentNotification.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SentNotification value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SentNotification read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..bc0ededb --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ServiceQueueStats.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Statistics about the user's currently queued service request + */ +@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(@javax.annotation.Nonnull Integer estimatedServiceDurationSeconds) { + this.estimatedServiceDurationSeconds = estimatedServiceDurationSeconds; + return this; + } + + /** + * Get estimatedServiceDurationSeconds + * @return estimatedServiceDurationSeconds + */ + @javax.annotation.Nonnull + public Integer getEstimatedServiceDurationSeconds() { + return estimatedServiceDurationSeconds; + } + + public void setEstimatedServiceDurationSeconds(@javax.annotation.Nonnull Integer estimatedServiceDurationSeconds) { + this.estimatedServiceDurationSeconds = estimatedServiceDurationSeconds; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceQueueStats serviceQueueStats = (ServiceQueueStats) o; + return Objects.equals(this.estimatedServiceDurationSeconds, serviceQueueStats.estimatedServiceDurationSeconds); + } + + @Override + public int hashCode() { + return Objects.hash(estimatedServiceDurationSeconds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceQueueStats {\n"); + sb.append(" estimatedServiceDurationSeconds: ").append(toIndentedString(estimatedServiceDurationSeconds)).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("estimatedServiceDurationSeconds")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("estimatedServiceDurationSeconds")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ServiceQueueStats.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ServiceQueueStats.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ServiceQueueStats' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ServiceQueueStats.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ServiceQueueStats value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ServiceQueueStats read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..33465394 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ServiceStatus.java @@ -0,0 +1,448 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * Status information for a service request + */ +@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(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + 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 + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + 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 + public List getProgress() { + return progress; + } + + public void setProgress(@javax.annotation.Nonnull List progress) { + this.progress = progress; + } + + + 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 + public String getRequesterUserId() { + return requesterUserId; + } + + public void setRequesterUserId(@javax.annotation.Nonnull String requesterUserId) { + this.requesterUserId = requesterUserId; + } + + + public ServiceStatus state(@javax.annotation.Nonnull String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nonnull + public String getState() { + return state; + } + + public void setState(@javax.annotation.Nonnull String state) { + this.state = state; + } + + + 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 + public String getSubjectId() { + return subjectId; + } + + public void setSubjectId(@javax.annotation.Nonnull String subjectId) { + this.subjectId = subjectId; + } + + + 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 + public String getSubjectType() { + return subjectType; + } + + public void setSubjectType(@javax.annotation.Nonnull String subjectType) { + this.subjectType = subjectType; + } + + + 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 + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + public ServiceStatus updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceStatus serviceStatus = (ServiceStatus) o; + return Objects.equals(this.createdAt, serviceStatus.createdAt) && + Objects.equals(this.id, serviceStatus.id) && + Objects.equals(this.progress, serviceStatus.progress) && + Objects.equals(this.requesterUserId, serviceStatus.requesterUserId) && + Objects.equals(this.state, serviceStatus.state) && + Objects.equals(this.subjectId, serviceStatus.subjectId) && + Objects.equals(this.subjectType, serviceStatus.subjectType) && + Objects.equals(this.type, serviceStatus.type) && + Objects.equals(this.updatedAt, serviceStatus.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, id, progress, requesterUserId, state, subjectId, subjectType, type, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceStatus {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" progress: ").append(toIndentedString(progress)).append("\n"); + sb.append(" requesterUserId: ").append(toIndentedString(requesterUserId)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" subjectId: ").append(toIndentedString(subjectId)).append("\n"); + sb.append(" subjectType: ").append(toIndentedString(subjectType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("created_at", "id", "progress", "requesterUserId", "state", "subjectId", "subjectType", "type", "updated_at")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ServiceStatus.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 `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 (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(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(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(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(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(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(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(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 (!ServiceStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ServiceStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ServiceStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ServiceStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ServiceStatus read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..09017d1b --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/ShareInventoryItemDirectRequest.java @@ -0,0 +1,250 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * ShareInventoryItemDirectRequest + */ +@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(@javax.annotation.Nonnull String itemId) { + this.itemId = itemId; + return this; + } + + /** + * Get itemId + * @return itemId + */ + @javax.annotation.Nonnull + public String getItemId() { + return itemId; + } + + public void setItemId(@javax.annotation.Nonnull String itemId) { + this.itemId = itemId; + } + + + 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 + public List getUsers() { + return users; + } + + public void setUsers(@javax.annotation.Nonnull List users) { + this.users = users; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShareInventoryItemDirectRequest shareInventoryItemDirectRequest = (ShareInventoryItemDirectRequest) o; + return Objects.equals(this.itemId, shareInventoryItemDirectRequest.itemId) && + Objects.equals(this.users, shareInventoryItemDirectRequest.users); + } + + @Override + public int hashCode() { + return Objects.hash(itemId, users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ShareInventoryItemDirectRequest {\n"); + sb.append(" itemId: ").append(toIndentedString(itemId)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).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("itemId", "users")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("itemId", "users")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ShareInventoryItemDirectRequest.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ShareInventoryItemDirectRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ShareInventoryItemDirectRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ShareInventoryItemDirectRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ShareInventoryItemDirectRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ShareInventoryItemDirectRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..41a4b4a8 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SortOption.java @@ -0,0 +1,109 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 SortOption + */ +@JsonAdapter(SortOption.Adapter.class) +public enum SortOption { + + _CREATED_AT("_created_at"), + + _UPDATED_AT("_updated_at"), + + CREATED("created"), + + FAVORITES("favorites"), + + HEAT("heat"), + + LABS_PUBLICATION_DATE("labsPublicationDate"), + + MAGIC("magic"), + + NAME("name"), + + ORDER("order"), + + POPULARITY("popularity"), + + PUBLICATION_DATE("publicationDate"), + + RANDOM("random"), + + RELEVANCE("relevance"), + + REPORT_COUNT("reportCount"), + + REPORT_SCORE("reportScore"), + + SHUFFLE("shuffle"), + + TRUST("trust"), + + UPDATED("updated"); + + private String value; + + SortOption(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SortOption fromValue(String value) { + for (SortOption b : SortOption.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 SortOption enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SortOption read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..08f15266 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SortOptionProductPurchase.java @@ -0,0 +1,75 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 SortOptionProductPurchase + */ +@JsonAdapter(SortOptionProductPurchase.Adapter.class) +public enum SortOptionProductPurchase { + + PURCHASE_DATE("purchaseDate"); + + private String value; + + SortOptionProductPurchase(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SortOptionProductPurchase fromValue(String value) { + for (SortOptionProductPurchase b : SortOptionProductPurchase.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 SortOptionProductPurchase enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SortOptionProductPurchase read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..8d2dd3bf --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Store.java @@ -0,0 +1,769 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductListing; +import io.github.vrchatapi.model.StoreContext; +import io.github.vrchatapi.model.StoreShelf; +import io.github.vrchatapi.model.StoreType; +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; +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; + +/** + * Store + */ +@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) + @javax.annotation.Nullable + private List listingIds = new ArrayList<>(); + + public static final String SERIALIZED_NAME_LISTINGS = "listings"; + @SerializedName(SERIALIZED_NAME_LISTINGS) + @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) + @javax.annotation.Nullable + private List shelfIds = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SHELVES = "shelves"; + @SerializedName(SERIALIZED_NAME_SHELVES) + @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(@javax.annotation.Nullable OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + */ + @javax.annotation.Nullable + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(@javax.annotation.Nullable OffsetDateTime created) { + this.created = created; + } + + + public Store description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public Store displayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * @return displayName + */ + @javax.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nonnull String displayName) { + this.displayName = displayName; + } + + + public Store groupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get groupId + * @return groupId + */ + @javax.annotation.Nullable + public String getGroupId() { + return groupId; + } + + public void setGroupId(@javax.annotation.Nullable String groupId) { + this.groupId = groupId; + } + + + public Store id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public Store listingIds(@javax.annotation.Nullable List listingIds) { + this.listingIds = listingIds; + return this; + } + + public Store addListingIdsItem(String listingIdsItem) { + if (this.listingIds == null) { + this.listingIds = new ArrayList<>(); + } + this.listingIds.add(listingIdsItem); + return this; + } + + /** + * Only for store type world and group + * @return listingIds + */ + @javax.annotation.Nullable + public List getListingIds() { + return listingIds; + } + + public void setListingIds(@javax.annotation.Nullable List listingIds) { + this.listingIds = listingIds; + } + + + public Store listings(@javax.annotation.Nullable List listings) { + this.listings = listings; + return this; + } + + public Store addListingsItem(ProductListing listingsItem) { + if (this.listings == null) { + this.listings = new ArrayList<>(); + } + this.listings.add(listingsItem); + return this; + } + + /** + * Only for store type world and group + * @return listings + */ + @javax.annotation.Nullable + public List getListings() { + return listings; + } + + public void setListings(@javax.annotation.Nullable List listings) { + this.listings = listings; + } + + + public Store sellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + return this; + } + + /** + * Get sellerDisplayName + * @return sellerDisplayName + */ + @javax.annotation.Nonnull + public String getSellerDisplayName() { + return sellerDisplayName; + } + + public void setSellerDisplayName(@javax.annotation.Nonnull String sellerDisplayName) { + this.sellerDisplayName = sellerDisplayName; + } + + + 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 + public String getSellerId() { + return sellerId; + } + + public void setSellerId(@javax.annotation.Nonnull String sellerId) { + this.sellerId = sellerId; + } + + + public Store shelfIds(@javax.annotation.Nullable List shelfIds) { + this.shelfIds = shelfIds; + return this; + } + + public Store addShelfIdsItem(String shelfIdsItem) { + if (this.shelfIds == null) { + this.shelfIds = new ArrayList<>(); + } + this.shelfIds.add(shelfIdsItem); + return this; + } + + /** + * Only for store type house + * @return shelfIds + */ + @javax.annotation.Nullable + public List getShelfIds() { + return shelfIds; + } + + public void setShelfIds(@javax.annotation.Nullable List shelfIds) { + this.shelfIds = shelfIds; + } + + + public Store shelves(@javax.annotation.Nullable List shelves) { + this.shelves = shelves; + return this; + } + + public Store addShelvesItem(StoreShelf shelvesItem) { + if (this.shelves == null) { + this.shelves = new ArrayList<>(); + } + this.shelves.add(shelvesItem); + return this; + } + + /** + * Only for store type house + * @return shelves + */ + @javax.annotation.Nullable + public List getShelves() { + return shelves; + } + + public void setShelves(@javax.annotation.Nullable List shelves) { + this.shelves = shelves; + } + + + public Store storeContext(@javax.annotation.Nullable StoreContext storeContext) { + this.storeContext = storeContext; + return this; + } + + /** + * Get storeContext + * @return storeContext + */ + @javax.annotation.Nullable + public StoreContext getStoreContext() { + return storeContext; + } + + public void setStoreContext(@javax.annotation.Nullable StoreContext storeContext) { + this.storeContext = storeContext; + } + + + public Store storeId(@javax.annotation.Nonnull String storeId) { + this.storeId = storeId; + return this; + } + + /** + * Get storeId + * @return storeId + */ + @javax.annotation.Nonnull + public String getStoreId() { + return storeId; + } + + public void setStoreId(@javax.annotation.Nonnull String storeId) { + this.storeId = storeId; + } + + + public Store storeStatus(@javax.annotation.Nullable String storeStatus) { + this.storeStatus = storeStatus; + return this; + } + + /** + * Get storeStatus + * @return storeStatus + */ + @javax.annotation.Nullable + public String getStoreStatus() { + return storeStatus; + } + + public void setStoreStatus(@javax.annotation.Nullable String storeStatus) { + this.storeStatus = storeStatus; + } + + + public Store storeType(@javax.annotation.Nonnull StoreType storeType) { + this.storeType = storeType; + return this; + } + + /** + * Get storeType + * @return storeType + */ + @javax.annotation.Nonnull + public StoreType getStoreType() { + return storeType; + } + + public void setStoreType(@javax.annotation.Nonnull StoreType storeType) { + this.storeType = storeType; + } + + + 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 + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public Store updated(@javax.annotation.Nullable OffsetDateTime updated) { + this.updated = updated; + return this; + } + + /** + * Get updated + * @return updated + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdated() { + return updated; + } + + public void setUpdated(@javax.annotation.Nullable OffsetDateTime updated) { + this.updated = updated; + } + + + 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 + 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; + } + Store store = (Store) o; + return Objects.equals(this.created, store.created) && + Objects.equals(this.description, store.description) && + Objects.equals(this.displayName, store.displayName) && + Objects.equals(this.groupId, store.groupId) && + Objects.equals(this.id, store.id) && + Objects.equals(this.listingIds, store.listingIds) && + Objects.equals(this.listings, store.listings) && + Objects.equals(this.sellerDisplayName, store.sellerDisplayName) && + Objects.equals(this.sellerId, store.sellerId) && + Objects.equals(this.shelfIds, store.shelfIds) && + Objects.equals(this.shelves, store.shelves) && + Objects.equals(this.storeContext, store.storeContext) && + Objects.equals(this.storeId, store.storeId) && + Objects.equals(this.storeStatus, store.storeStatus) && + Objects.equals(this.storeType, store.storeType) && + Objects.equals(this.tags, store.tags) && + Objects.equals(this.updated, store.updated) && + Objects.equals(this.worldId, store.worldId); + } + + @Override + public int hashCode() { + return Objects.hash(created, description, displayName, groupId, id, listingIds, listings, sellerDisplayName, sellerId, shelfIds, shelves, storeContext, storeId, storeStatus, storeType, tags, updated, worldId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Store {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" listingIds: ").append(toIndentedString(listingIds)).append("\n"); + sb.append(" listings: ").append(toIndentedString(listings)).append("\n"); + sb.append(" sellerDisplayName: ").append(toIndentedString(sellerDisplayName)).append("\n"); + sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n"); + sb.append(" shelfIds: ").append(toIndentedString(shelfIds)).append("\n"); + sb.append(" shelves: ").append(toIndentedString(shelves)).append("\n"); + sb.append(" storeContext: ").append(toIndentedString(storeContext)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append(" storeStatus: ").append(toIndentedString(storeStatus)).append("\n"); + sb.append(" storeType: ").append(toIndentedString(storeType)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Store.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 `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 (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(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(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(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(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").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(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.validateJsonElement(jsonArraylistings.get(i)); + }; + } + } + if (!jsonObj.get("sellerDisplayName").isJsonPrimitive()) { + 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(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").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(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.validateJsonElement(jsonArrayshelves.get(i)); + }; + } + } + // validate the optional field `storeContext` + if (jsonObj.get("storeContext") != null && !jsonObj.get("storeContext").isJsonNull()) { + StoreContext.validateJsonElement(jsonObj.get("storeContext")); + } + if (!jsonObj.get("storeId").isJsonPrimitive()) { + 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(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(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(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 (!Store.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Store' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Store.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Store value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Store read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..49cb3992 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/StoreContext.java @@ -0,0 +1,266 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * StoreContext + */ +@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(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public StoreContext imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public StoreContext name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StoreContext storeContext = (StoreContext) o; + return Objects.equals(this.id, storeContext.id) && + Objects.equals(this.imageUrl, storeContext.imageUrl) && + Objects.equals(this.name, storeContext.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, imageUrl, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StoreContext {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).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("id", "imageUrl", "name")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("id", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!StoreContext.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 `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 (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(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(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(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 (!StoreContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StoreContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StoreContext.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StoreContext value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public StoreContext read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..aebcd606 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/StoreShelf.java @@ -0,0 +1,472 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ProductListing; +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; +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; + +/** + * StoreShelf + */ +@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) + @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(@javax.annotation.Nullable ProductListing highlightListing) { + this.highlightListing = highlightListing; + return this; + } + + /** + * Get highlightListing + * @return highlightListing + */ + @javax.annotation.Nullable + public ProductListing getHighlightListing() { + return highlightListing; + } + + public void setHighlightListing(@javax.annotation.Nullable ProductListing highlightListing) { + this.highlightListing = highlightListing; + } + + + public StoreShelf highlightListingId(@javax.annotation.Nullable String highlightListingId) { + this.highlightListingId = highlightListingId; + return this; + } + + /** + * Get highlightListingId + * @return highlightListingId + */ + @javax.annotation.Nullable + public String getHighlightListingId() { + return highlightListingId; + } + + public void setHighlightListingId(@javax.annotation.Nullable String highlightListingId) { + this.highlightListingId = highlightListingId; + } + + + public StoreShelf id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + 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 + public List getListingIds() { + return listingIds; + } + + public void setListingIds(@javax.annotation.Nonnull List listingIds) { + this.listingIds = listingIds; + } + + + public StoreShelf listings(@javax.annotation.Nullable List listings) { + this.listings = listings; + return this; + } + + public StoreShelf addListingsItem(ProductListing listingsItem) { + if (this.listings == null) { + this.listings = new ArrayList<>(); + } + this.listings.add(listingsItem); + return this; + } + + /** + * Get listings + * @return listings + */ + @javax.annotation.Nullable + public List getListings() { + return listings; + } + + public void setListings(@javax.annotation.Nullable List listings) { + this.listings = listings; + } + + + public StoreShelf shelfDescription(@javax.annotation.Nonnull String shelfDescription) { + this.shelfDescription = shelfDescription; + return this; + } + + /** + * Get shelfDescription + * @return shelfDescription + */ + @javax.annotation.Nonnull + public String getShelfDescription() { + return shelfDescription; + } + + public void setShelfDescription(@javax.annotation.Nonnull String shelfDescription) { + this.shelfDescription = shelfDescription; + } + + + public StoreShelf shelfLayout(@javax.annotation.Nonnull String shelfLayout) { + this.shelfLayout = shelfLayout; + return this; + } + + /** + * Get shelfLayout + * @return shelfLayout + */ + @javax.annotation.Nonnull + public String getShelfLayout() { + return shelfLayout; + } + + public void setShelfLayout(@javax.annotation.Nonnull String shelfLayout) { + this.shelfLayout = shelfLayout; + } + + + public StoreShelf shelfTitle(@javax.annotation.Nonnull String shelfTitle) { + this.shelfTitle = shelfTitle; + return this; + } + + /** + * Get shelfTitle + * @return shelfTitle + */ + @javax.annotation.Nonnull + public String getShelfTitle() { + return shelfTitle; + } + + public void setShelfTitle(@javax.annotation.Nonnull String shelfTitle) { + this.shelfTitle = shelfTitle; + } + + + public StoreShelf updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StoreShelf storeShelf = (StoreShelf) o; + return Objects.equals(this.highlightListing, storeShelf.highlightListing) && + Objects.equals(this.highlightListingId, storeShelf.highlightListingId) && + Objects.equals(this.id, storeShelf.id) && + Objects.equals(this.listingIds, storeShelf.listingIds) && + Objects.equals(this.listings, storeShelf.listings) && + Objects.equals(this.shelfDescription, storeShelf.shelfDescription) && + Objects.equals(this.shelfLayout, storeShelf.shelfLayout) && + Objects.equals(this.shelfTitle, storeShelf.shelfTitle) && + Objects.equals(this.updatedAt, storeShelf.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(highlightListing, highlightListingId, id, listingIds, listings, shelfDescription, shelfLayout, shelfTitle, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StoreShelf {\n"); + sb.append(" highlightListing: ").append(toIndentedString(highlightListing)).append("\n"); + sb.append(" highlightListingId: ").append(toIndentedString(highlightListingId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" listingIds: ").append(toIndentedString(listingIds)).append("\n"); + sb.append(" listings: ").append(toIndentedString(listings)).append("\n"); + sb.append(" shelfDescription: ").append(toIndentedString(shelfDescription)).append("\n"); + sb.append(" shelfLayout: ").append(toIndentedString(shelfLayout)).append("\n"); + sb.append(" shelfTitle: ").append(toIndentedString(shelfTitle)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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("highlightListing", "highlightListingId", "id", "listingIds", "listings", "shelfDescription", "shelfLayout", "shelfTitle", "updatedAt")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!StoreShelf.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 `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 (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.validateJsonElement(jsonObj.get("highlightListing")); + } + if ((jsonObj.get("highlightListingId") != null && !jsonObj.get("highlightListingId").isJsonNull()) && !jsonObj.get("highlightListingId").isJsonPrimitive()) { + 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(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(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(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.validateJsonElement(jsonArraylistings.get(i)); + }; + } + } + if (!jsonObj.get("shelfDescription").isJsonPrimitive()) { + 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(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(java.util.Locale.ROOT, "Expected the field `shelfTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shelfTitle").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StoreShelf.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StoreShelf' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StoreShelf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StoreShelf value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public StoreShelf read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..1253e9d9 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/StoreType.java @@ -0,0 +1,79 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 StoreType + */ +@JsonAdapter(StoreType.Adapter.class) +public enum StoreType { + + GROUP("group"), + + HOUSE("house"), + + WORLD("world"); + + private String value; + + StoreType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StoreType fromValue(String value) { + for (StoreType b : StoreType.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 StoreType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StoreType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..204cac2d --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/StoreView.java @@ -0,0 +1,83 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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 StoreView + */ +@JsonAdapter(StoreView.Adapter.class) +public enum StoreView { + + ALL("all"), + + DRAFT("draft"), + + PREVIEW("preview"), + + PUBLIC("public"), + + PUBLIC_PREVIEW("publicPreview"); + + private String value; + + StoreView(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StoreView fromValue(String value) { + for (StoreView b : StoreView.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 StoreView enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StoreView read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + 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 new file mode 100644 index 00000000..96087426 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequest.java @@ -0,0 +1,355 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.SubmitModerationReportRequestDetails; +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; + +/** + * 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", 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(@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 + public String getCategory() { + return category; + } + + public void setCategory(@javax.annotation.Nonnull String category) { + this.category = category; + } + + + 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 + public String getContentId() { + return contentId; + } + + public void setContentId(@javax.annotation.Nonnull String contentId) { + this.contentId = contentId; + } + + + public SubmitModerationReportRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * The subjective reason for the report + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public SubmitModerationReportRequest details(@javax.annotation.Nullable SubmitModerationReportRequestDetails details) { + this.details = details; + return this; + } + + /** + * Get details + * @return details + */ + @javax.annotation.Nullable + public SubmitModerationReportRequestDetails getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable SubmitModerationReportRequestDetails details) { + this.details = details; + } + + + 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 + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nonnull String reason) { + this.reason = reason; + } + + + 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 + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubmitModerationReportRequest submitModerationReportRequest = (SubmitModerationReportRequest) o; + return Objects.equals(this.category, submitModerationReportRequest.category) && + Objects.equals(this.contentId, submitModerationReportRequest.contentId) && + Objects.equals(this.description, submitModerationReportRequest.description) && + Objects.equals(this.details, submitModerationReportRequest.details) && + Objects.equals(this.reason, submitModerationReportRequest.reason) && + Objects.equals(this.type, submitModerationReportRequest.type); + } + + @Override + public int hashCode() { + return Objects.hash(category, contentId, description, details, reason, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubmitModerationReportRequest {\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\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("category", "contentId", "description", "details", "reason", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("category", "contentId", "reason", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubmitModerationReportRequest.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 `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 (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(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(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(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.validateJsonElement(jsonObj.get("details")); + } + if (!jsonObj.get("reason").isJsonPrimitive()) { + 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(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 (!SubmitModerationReportRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SubmitModerationReportRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SubmitModerationReportRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SubmitModerationReportRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SubmitModerationReportRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..f7d07dbf --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SubmitModerationReportRequestDetails.java @@ -0,0 +1,381 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ContentFilter; +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; + +/** + * 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", 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) + @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(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + */ + @javax.annotation.Nullable + public String getFileId() { + return fileId; + } + + public void setFileId(@javax.annotation.Nullable String fileId) { + this.fileId = fileId; + } + + + 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 + public String getHolderId() { + return holderId; + } + + public void setHolderId(@javax.annotation.Nullable String holderId) { + this.holderId = holderId; + } + + + 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 + public String getImageType() { + return imageType; + } + + public void setImageType(@javax.annotation.Nullable String imageType) { + this.imageType = imageType; + } + + + 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 + public Boolean getInstanceAgeGated() { + return instanceAgeGated; + } + + public void setInstanceAgeGated(@javax.annotation.Nullable Boolean instanceAgeGated) { + this.instanceAgeGated = instanceAgeGated; + } + + + 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 + public String getInstanceType() { + return instanceType; + } + + public void setInstanceType(@javax.annotation.Nullable String instanceType) { + this.instanceType = instanceType; + } + + + public SubmitModerationReportRequestDetails suggestedWarnings(@javax.annotation.Nullable List suggestedWarnings) { + this.suggestedWarnings = suggestedWarnings; + return this; + } + + public SubmitModerationReportRequestDetails addSuggestedWarningsItem(ContentFilter suggestedWarningsItem) { + if (this.suggestedWarnings == null) { + this.suggestedWarnings = new ArrayList<>(); + } + this.suggestedWarnings.add(suggestedWarningsItem); + return this; + } + + /** + * Relevant detail for reports about content that might not be tagged properly. + * @return suggestedWarnings + */ + @javax.annotation.Nullable + public List getSuggestedWarnings() { + return suggestedWarnings; + } + + public void setSuggestedWarnings(@javax.annotation.Nullable List suggestedWarnings) { + this.suggestedWarnings = suggestedWarnings; + } + + + 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 + public Boolean getUserInSameInstance() { + return userInSameInstance; + } + + public void setUserInSameInstance(@javax.annotation.Nullable Boolean userInSameInstance) { + this.userInSameInstance = userInSameInstance; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubmitModerationReportRequestDetails submitModerationReportRequestDetails = (SubmitModerationReportRequestDetails) o; + return Objects.equals(this.fileId, submitModerationReportRequestDetails.fileId) && + Objects.equals(this.holderId, submitModerationReportRequestDetails.holderId) && + Objects.equals(this.imageType, submitModerationReportRequestDetails.imageType) && + Objects.equals(this.instanceAgeGated, submitModerationReportRequestDetails.instanceAgeGated) && + Objects.equals(this.instanceType, submitModerationReportRequestDetails.instanceType) && + Objects.equals(this.suggestedWarnings, submitModerationReportRequestDetails.suggestedWarnings) && + Objects.equals(this.userInSameInstance, submitModerationReportRequestDetails.userInSameInstance); + } + + @Override + public int hashCode() { + return Objects.hash(fileId, holderId, imageType, instanceAgeGated, instanceType, suggestedWarnings, userInSameInstance); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubmitModerationReportRequestDetails {\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).append("\n"); + sb.append(" holderId: ").append(toIndentedString(holderId)).append("\n"); + sb.append(" imageType: ").append(toIndentedString(imageType)).append("\n"); + sb.append(" instanceAgeGated: ").append(toIndentedString(instanceAgeGated)).append("\n"); + sb.append(" instanceType: ").append(toIndentedString(instanceType)).append("\n"); + sb.append(" suggestedWarnings: ").append(toIndentedString(suggestedWarnings)).append("\n"); + sb.append(" userInSameInstance: ").append(toIndentedString(userInSameInstance)).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("fileId", "holderId", "imageType", "instanceAgeGated", "instanceType", "suggestedWarnings", "userInSameInstance")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubmitModerationReportRequestDetails.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 `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(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(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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SubmitModerationReportRequestDetails.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SubmitModerationReportRequestDetails' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SubmitModerationReportRequestDetails.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SubmitModerationReportRequestDetails value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SubmitModerationReportRequestDetails read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 3d014818..7a598d7b 100644 --- a/src/main/java/io/github/vrchatapi/model/Subscription.java +++ b/src/main/java/io/github/vrchatapi/model/Subscription.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,186 +13,312 @@ package io.github.vrchatapi.model; import 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; +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; /** - * Subscription + * */ -@javax.annotation.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_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_STEAM_ITEM_ID = "steamItemId"; - @SerializedName(SERIALIZED_NAME_STEAM_ITEM_ID) - private String steamItemId; - 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) - private BigDecimal tier; + @javax.annotation.Nonnull + private Integer tier; + public Subscription() { + } - public Subscription id(String id) { - - this.id = id; + public Subscription amount(@javax.annotation.Nonnull BigDecimal amount) { + this.amount = amount; return this; } - /** - * Get id - * @return id - **/ + /** + * Get amount + * @return amount + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public BigDecimal getAmount() { + return amount; + } - public String getId() { - return id; + public void setAmount(@javax.annotation.Nonnull BigDecimal amount) { + this.amount = amount; } - public void setId(String id) { - this.id = id; + public Subscription appleProductId(@javax.annotation.Nullable String appleProductId) { + this.appleProductId = appleProductId; + return this; + } + + /** + * Get appleProductId + * @return appleProductId + */ + @javax.annotation.Nullable + public String getAppleProductId() { + return appleProductId; } + public void setAppleProductId(@javax.annotation.Nullable String appleProductId) { + this.appleProductId = appleProductId; + } - public Subscription steamItemId(String steamItemId) { - - this.steamItemId = steamItemId; + + public Subscription description(@javax.annotation.Nonnull String description) { + this.description = description; return this; } - /** - * Get steamItemId - * @return steamItemId - **/ + /** + * Get description + * @return description + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public String getDescription() { + return description; + } - public String getSteamItemId() { - return steamItemId; + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; } - public void setSteamItemId(String steamItemId) { - this.steamItemId = steamItemId; + public Subscription googlePlanId(@javax.annotation.Nullable String googlePlanId) { + this.googlePlanId = googlePlanId; + return this; } + /** + * Get googlePlanId + * @return googlePlanId + */ + @javax.annotation.Nullable + public String getGooglePlanId() { + return googlePlanId; + } - public Subscription amount(BigDecimal amount) { - - this.amount = amount; - return this; + public void setGooglePlanId(@javax.annotation.Nullable String googlePlanId) { + this.googlePlanId = googlePlanId; } - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public BigDecimal getAmount() { - return amount; + public Subscription googleProductId(@javax.annotation.Nullable String googleProductId) { + this.googleProductId = googleProductId; + return this; } + /** + * Get googleProductId + * @return googleProductId + */ + @javax.annotation.Nullable + public String getGoogleProductId() { + return googleProductId; + } - public void setAmount(BigDecimal amount) { - this.amount = amount; + public void setGoogleProductId(@javax.annotation.Nullable String googleProductId) { + this.googleProductId = googleProductId; } - public Subscription description(String description) { - - this.description = description; + public Subscription id(@javax.annotation.Nonnull String id) { + this.id = id; return this; } - /** - * Get description - * @return description - **/ + /** + * Get id + * @return id + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public String getId() { + return id; + } - public String getDescription() { - return description; + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; } - public void setDescription(String description) { - this.description = description; + public Subscription oculusSku(@javax.annotation.Nullable String oculusSku) { + this.oculusSku = oculusSku; + return this; } + /** + * Get oculusSku + * @return oculusSku + */ + @javax.annotation.Nullable + public String getOculusSku() { + return 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 tier(BigDecimal tier) { - + public Subscription picoSku(@javax.annotation.Nullable String picoSku) { + this.picoSku = picoSku; + return this; + } + + /** + * Get picoSku + * @return picoSku + */ + @javax.annotation.Nullable + public String getPicoSku() { + return picoSku; + } + + public void setPicoSku(@javax.annotation.Nullable String picoSku) { + this.picoSku = picoSku; + } + + + public Subscription steamItemId(@javax.annotation.Nonnull String steamItemId) { + this.steamItemId = steamItemId; + return this; + } + + /** + * Get steamItemId + * @return steamItemId + */ + @javax.annotation.Nonnull + public String getSteamItemId() { + return steamItemId; + } + + public void setSteamItemId(@javax.annotation.Nonnull String steamItemId) { + this.steamItemId = steamItemId; + } + + + 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 BigDecimal getTier() { + public Integer getTier() { return tier; } - - public void setTier(BigDecimal tier) { + public void setTier(@javax.annotation.Nonnull Integer tier) { this.tier = tier; } + @Override public boolean equals(Object o) { if (this == o) { @@ -202,28 +328,38 @@ public boolean equals(Object o) { return false; } Subscription subscription = (Subscription) o; - return Objects.equals(this.id, subscription.id) && - Objects.equals(this.steamItemId, subscription.steamItemId) && - Objects.equals(this.amount, subscription.amount) && + return Objects.equals(this.amount, subscription.amount) && + Objects.equals(this.appleProductId, subscription.appleProductId) && Objects.equals(this.description, subscription.description) && + Objects.equals(this.googlePlanId, subscription.googlePlanId) && + Objects.equals(this.googleProductId, subscription.googleProductId) && + Objects.equals(this.id, subscription.id) && + Objects.equals(this.oculusSku, subscription.oculusSku) && Objects.equals(this.period, subscription.period) && + Objects.equals(this.picoSku, subscription.picoSku) && + Objects.equals(this.steamItemId, subscription.steamItemId) && Objects.equals(this.tier, subscription.tier); } @Override public int hashCode() { - return Objects.hash(id, steamItemId, amount, description, period, tier); + return Objects.hash(amount, appleProductId, description, googlePlanId, googleProductId, id, oculusSku, period, picoSku, steamItemId, tier); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Subscription {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" steamItemId: ").append(toIndentedString(steamItemId)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" appleProductId: ").append(toIndentedString(appleProductId)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" googlePlanId: ").append(toIndentedString(googlePlanId)).append("\n"); + sb.append(" googleProductId: ").append(toIndentedString(googleProductId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" oculusSku: ").append(toIndentedString(oculusSku)).append("\n"); sb.append(" period: ").append(toIndentedString(period)).append("\n"); + sb.append(" picoSku: ").append(toIndentedString(picoSku)).append("\n"); + sb.append(" steamItemId: ").append(toIndentedString(steamItemId)).append("\n"); sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); sb.append("}"); return sb.toString(); @@ -234,11 +370,124 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("amount", "appleProductId", "description", "googlePlanId", "googleProductId", "id", "oculusSku", "period", "picoSku", "steamItemId", "tier")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Subscription.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format(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 (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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Subscription.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Subscription' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Subscription.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Subscription value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Subscription read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 a6bae6d8..81b47007 100644 --- a/src/main/java/io/github/vrchatapi/model/SubscriptionPeriod.java +++ b/src/main/java/io/github/vrchatapi/model/SubscriptionPeriod.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,14 +28,14 @@ @JsonAdapter(SubscriptionPeriod.Adapter.class) public enum SubscriptionPeriod { - HOUR("hour"), - DAY("day"), - WEEK("week"), + HOUR("hour"), MONTH("month"), + WEEK("week"), + YEAR("year"); private String value; @@ -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 c7d9365b..8fbbc8a3 100644 --- a/src/main/java/io/github/vrchatapi/model/Success.java +++ b/src/main/java/io/github/vrchatapi/model/Success.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,50 +13,71 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -88,11 +109,95 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("success")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Success.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 `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.validateJsonElement(jsonObj.get("success")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Success.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Success' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Success.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Success value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Success read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..7083efc3 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/SuccessFlag.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * SuccessFlag + */ +@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(@javax.annotation.Nonnull Boolean success) { + this.success = success; + return this; + } + + /** + * Get success + * @return success + */ + @javax.annotation.Nonnull + public Boolean getSuccess() { + return success; + } + + public void setSuccess(@javax.annotation.Nonnull Boolean success) { + this.success = success; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuccessFlag successFlag = (SuccessFlag) o; + return Objects.equals(this.success, successFlag.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SuccessFlag {\n"); + sb.append(" success: ").append(toIndentedString(success)).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("success")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("success")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SuccessFlag.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SuccessFlag.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SuccessFlag' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SuccessFlag.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SuccessFlag value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SuccessFlag read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..ca214097 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TiliaKyc.java @@ -0,0 +1,435 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * TiliaKyc + */ +@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(@javax.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Tilia account identifier. + * @return accountId + */ + @javax.annotation.Nonnull + public String getAccountId() { + return accountId; + } + + public void setAccountId(@javax.annotation.Nonnull String accountId) { + this.accountId = accountId; + } + + + public TiliaKyc kycId(@javax.annotation.Nonnull String kycId) { + this.kycId = kycId; + return this; + } + + /** + * KYC verification identifier. + * @return kycId + */ + @javax.annotation.Nonnull + public String getKycId() { + return kycId; + } + + public void setKycId(@javax.annotation.Nonnull String kycId) { + this.kycId = kycId; + } + + + public TiliaKyc kycRequirements(@javax.annotation.Nonnull String kycRequirements) { + this.kycRequirements = kycRequirements; + return this; + } + + /** + * Requirement state reported by Tilia. + * @return kycRequirements + */ + @javax.annotation.Nonnull + public String getKycRequirements() { + return kycRequirements; + } + + public void setKycRequirements(@javax.annotation.Nonnull String kycRequirements) { + this.kycRequirements = kycRequirements; + } + + + 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 + public List getMatchChecks() { + return matchChecks; + } + + public void setMatchChecks(@javax.annotation.Nonnull List matchChecks) { + this.matchChecks = matchChecks; + } + + + public TiliaKyc piiLevel(@javax.annotation.Nonnull String piiLevel) { + this.piiLevel = piiLevel; + return this; + } + + /** + * PII verification level. + * @return piiLevel + */ + @javax.annotation.Nonnull + public String getPiiLevel() { + return piiLevel; + } + + public void setPiiLevel(@javax.annotation.Nonnull String piiLevel) { + this.piiLevel = piiLevel; + } + + + 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 + public List getRules() { + return rules; + } + + public void setRules(@javax.annotation.Nonnull List rules) { + this.rules = rules; + } + + + public TiliaKyc state(@javax.annotation.Nonnull String state) { + this.state = state; + return this; + } + + /** + * Overall KYC state. + * @return state + */ + @javax.annotation.Nonnull + public String getState() { + return state; + } + + public void setState(@javax.annotation.Nonnull String state) { + this.state = state; + } + + + 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 + public String getTiliaRetryRuleCode() { + return tiliaRetryRuleCode; + } + + public void setTiliaRetryRuleCode(@javax.annotation.Nonnull String tiliaRetryRuleCode) { + this.tiliaRetryRuleCode = tiliaRetryRuleCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TiliaKyc tiliaKyc = (TiliaKyc) o; + return Objects.equals(this.accountId, tiliaKyc.accountId) && + Objects.equals(this.kycId, tiliaKyc.kycId) && + Objects.equals(this.kycRequirements, tiliaKyc.kycRequirements) && + Objects.equals(this.matchChecks, tiliaKyc.matchChecks) && + Objects.equals(this.piiLevel, tiliaKyc.piiLevel) && + Objects.equals(this.rules, tiliaKyc.rules) && + Objects.equals(this.state, tiliaKyc.state) && + Objects.equals(this.tiliaRetryRuleCode, tiliaKyc.tiliaRetryRuleCode); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, kycId, kycRequirements, matchChecks, piiLevel, rules, state, tiliaRetryRuleCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TiliaKyc {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" kycId: ").append(toIndentedString(kycId)).append("\n"); + sb.append(" kycRequirements: ").append(toIndentedString(kycRequirements)).append("\n"); + sb.append(" matchChecks: ").append(toIndentedString(matchChecks)).append("\n"); + sb.append(" piiLevel: ").append(toIndentedString(piiLevel)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" tiliaRetryRuleCode: ").append(toIndentedString(tiliaRetryRuleCode)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TiliaKyc.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 `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 (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(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(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(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(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(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(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(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(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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TiliaKyc.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TiliaKyc' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TiliaKyc.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TiliaKyc value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TiliaKyc read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..b1bef1f2 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TiliaStatus.java @@ -0,0 +1,284 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.time.OffsetDateTime; +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; + +/** + * + */ +@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(@javax.annotation.Nonnull Boolean economyOnline) { + this.economyOnline = economyOnline; + return this; + } + + /** + * Get economyOnline + * @return economyOnline + */ + @javax.annotation.Nonnull + public Boolean getEconomyOnline() { + return economyOnline; + } + + public void setEconomyOnline(@javax.annotation.Nonnull Boolean economyOnline) { + this.economyOnline = economyOnline; + } + + + public TiliaStatus economyState(@javax.annotation.Nullable Integer economyState) { + this.economyState = economyState; + return this; + } + + /** + * Get economyState + * @return economyState + */ + @javax.annotation.Nullable + public Integer getEconomyState() { + return economyState; + } + + public void setEconomyState(@javax.annotation.Nullable Integer economyState) { + this.economyState = economyState; + } + + + public TiliaStatus plannedOfflineWindowEnd(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowEnd) { + this.plannedOfflineWindowEnd = plannedOfflineWindowEnd; + return this; + } + + /** + * Get plannedOfflineWindowEnd + * @return plannedOfflineWindowEnd + */ + @javax.annotation.Nullable + public OffsetDateTime getPlannedOfflineWindowEnd() { + return plannedOfflineWindowEnd; + } + + public void setPlannedOfflineWindowEnd(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowEnd) { + this.plannedOfflineWindowEnd = plannedOfflineWindowEnd; + } + + + public TiliaStatus plannedOfflineWindowStart(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowStart) { + this.plannedOfflineWindowStart = plannedOfflineWindowStart; + return this; + } + + /** + * Get plannedOfflineWindowStart + * @return plannedOfflineWindowStart + */ + @javax.annotation.Nullable + public OffsetDateTime getPlannedOfflineWindowStart() { + return plannedOfflineWindowStart; + } + + public void setPlannedOfflineWindowStart(@javax.annotation.Nullable OffsetDateTime plannedOfflineWindowStart) { + this.plannedOfflineWindowStart = plannedOfflineWindowStart; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TiliaStatus tiliaStatus = (TiliaStatus) o; + return Objects.equals(this.economyOnline, tiliaStatus.economyOnline) && + Objects.equals(this.economyState, tiliaStatus.economyState) && + Objects.equals(this.plannedOfflineWindowEnd, tiliaStatus.plannedOfflineWindowEnd) && + Objects.equals(this.plannedOfflineWindowStart, tiliaStatus.plannedOfflineWindowStart); + } + + @Override + public int hashCode() { + return Objects.hash(economyOnline, economyState, plannedOfflineWindowEnd, plannedOfflineWindowStart); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TiliaStatus {\n"); + sb.append(" economyOnline: ").append(toIndentedString(economyOnline)).append("\n"); + sb.append(" economyState: ").append(toIndentedString(economyState)).append("\n"); + sb.append(" plannedOfflineWindowEnd: ").append(toIndentedString(plannedOfflineWindowEnd)).append("\n"); + sb.append(" plannedOfflineWindowStart: ").append(toIndentedString(plannedOfflineWindowStart)).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("economyOnline", "economyState", "plannedOfflineWindowEnd", "plannedOfflineWindowStart")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("economyOnline")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TiliaStatus.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TiliaStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TiliaStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TiliaStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TiliaStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TiliaStatus read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..04f2b5ba --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TiliaTOS.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * + */ +@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(@javax.annotation.Nonnull Boolean signedTos) { + this.signedTos = signedTos; + return this; + } + + /** + * Get signedTos + * @return signedTos + */ + @javax.annotation.Nonnull + public Boolean getSignedTos() { + return signedTos; + } + + public void setSignedTos(@javax.annotation.Nonnull Boolean signedTos) { + this.signedTos = signedTos; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TiliaTOS tiliaTOS = (TiliaTOS) o; + return Objects.equals(this.signedTos, tiliaTOS.signedTos); + } + + @Override + public int hashCode() { + return Objects.hash(signedTos); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TiliaTOS {\n"); + sb.append(" signedTos: ").append(toIndentedString(signedTos)).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("signed_tos")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("signed_tos")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TiliaTOS.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TiliaTOS.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TiliaTOS' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TiliaTOS.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TiliaTOS value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TiliaTOS read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..003d3d81 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TokenBundle.java @@ -0,0 +1,434 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * TokenBundle + */ +@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(@javax.annotation.Nonnull Integer amount) { + this.amount = amount; + return this; + } + + /** + * price of the bundle + * @return amount + */ + @javax.annotation.Nonnull + public Integer getAmount() { + return amount; + } + + public void setAmount(@javax.annotation.Nonnull Integer amount) { + this.amount = amount; + } + + + public TokenBundle appleProductId(@javax.annotation.Nonnull String appleProductId) { + this.appleProductId = appleProductId; + return this; + } + + /** + * Get appleProductId + * @return appleProductId + */ + @javax.annotation.Nonnull + public String getAppleProductId() { + return appleProductId; + } + + public void setAppleProductId(@javax.annotation.Nonnull String appleProductId) { + this.appleProductId = appleProductId; + } + + + public TokenBundle description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + + public TokenBundle googleProductId(@javax.annotation.Nullable String googleProductId) { + this.googleProductId = googleProductId; + return this; + } + + /** + * Get googleProductId + * @return googleProductId + */ + @javax.annotation.Nullable + public String getGoogleProductId() { + return googleProductId; + } + + public void setGoogleProductId(@javax.annotation.Nullable String googleProductId) { + this.googleProductId = googleProductId; + } + + + public TokenBundle id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public TokenBundle imageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * direct url to image + * @return imageUrl + */ + @javax.annotation.Nonnull + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nonnull String imageUrl) { + this.imageUrl = imageUrl; + } + + + public TokenBundle oculusSku(@javax.annotation.Nonnull String oculusSku) { + this.oculusSku = oculusSku; + return this; + } + + /** + * Get oculusSku + * @return oculusSku + */ + @javax.annotation.Nonnull + public String getOculusSku() { + return oculusSku; + } + + public void setOculusSku(@javax.annotation.Nonnull String oculusSku) { + this.oculusSku = oculusSku; + } + + + public TokenBundle steamItemId(@javax.annotation.Nonnull String steamItemId) { + this.steamItemId = steamItemId; + return this; + } + + /** + * Get steamItemId + * @return steamItemId + */ + @javax.annotation.Nonnull + public String getSteamItemId() { + return steamItemId; + } + + public void setSteamItemId(@javax.annotation.Nonnull String steamItemId) { + this.steamItemId = steamItemId; + } + + + public TokenBundle tokens(@javax.annotation.Nonnull Integer tokens) { + this.tokens = tokens; + return this; + } + + /** + * number of tokens received + * @return tokens + */ + @javax.annotation.Nonnull + public Integer getTokens() { + return tokens; + } + + public void setTokens(@javax.annotation.Nonnull Integer tokens) { + this.tokens = tokens; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenBundle tokenBundle = (TokenBundle) o; + return Objects.equals(this.amount, tokenBundle.amount) && + Objects.equals(this.appleProductId, tokenBundle.appleProductId) && + Objects.equals(this.description, tokenBundle.description) && + Objects.equals(this.googleProductId, tokenBundle.googleProductId) && + Objects.equals(this.id, tokenBundle.id) && + Objects.equals(this.imageUrl, tokenBundle.imageUrl) && + Objects.equals(this.oculusSku, tokenBundle.oculusSku) && + Objects.equals(this.steamItemId, tokenBundle.steamItemId) && + Objects.equals(this.tokens, tokenBundle.tokens); + } + + @Override + public int hashCode() { + return Objects.hash(amount, appleProductId, description, googleProductId, id, imageUrl, oculusSku, steamItemId, tokens); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenBundle {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" appleProductId: ").append(toIndentedString(appleProductId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" googleProductId: ").append(toIndentedString(googleProductId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" oculusSku: ").append(toIndentedString(oculusSku)).append("\n"); + sb.append(" steamItemId: ").append(toIndentedString(steamItemId)).append("\n"); + sb.append(" tokens: ").append(toIndentedString(tokens)).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("amount", "appleProductId", "description", "googleProductId", "id", "imageUrl", "oculusSku", "steamItemId", "tokens")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TokenBundle.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 `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 (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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `steamItemId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("steamItemId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenBundle.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenBundle' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TokenBundle.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenBundle value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TokenBundle read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 6a9fce25..7b77f402 100644 --- a/src/main/java/io/github/vrchatapi/model/Transaction.java +++ b/src/main/java/io/github/vrchatapi/model/Transaction.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,260 +22,354 @@ 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 org.threeten.bp.OffsetDateTime; +import java.time.OffsetDateTime; +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; /** - * Transaction + * */ -@javax.annotation.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_SANDBOX = "sandbox"; - @SerializedName(SERIALIZED_NAME_SANDBOX) - private Boolean sandbox = false; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - 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_STEAM = "steam"; - @SerializedName(SERIALIZED_NAME_STEAM) - private TransactionSteamInfo steam; - - public static final String SERIALIZED_NAME_AGREEMENT = "agreement"; - @SerializedName(SERIALIZED_NAME_AGREEMENT) - private TransactionAgreement agreement; + 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_ERROR = "error"; - @SerializedName(SERIALIZED_NAME_ERROR) - private String error; + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + @javax.annotation.Nullable + private String userId; + public Transaction() { + } - public Transaction id(String id) { - - this.id = id; + public Transaction agreement(@javax.annotation.Nullable TransactionAgreement agreement) { + this.agreement = agreement; 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; + /** + * Get agreement + * @return agreement + */ + @javax.annotation.Nullable + public TransactionAgreement getAgreement() { + return agreement; } - - public void setId(String id) { - this.id = id; + public void setAgreement(@javax.annotation.Nullable TransactionAgreement agreement) { + this.agreement = agreement; } - public Transaction status(TransactionStatus status) { - - this.status = status; + public Transaction createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; return this; } - /** - * Get status - * @return status - **/ + /** + * Get createdAt + * @return createdAt + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public OffsetDateTime getCreatedAt() { + return createdAt; + } - public TransactionStatus getStatus() { - return status; + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; } - public void setStatus(TransactionStatus status) { - this.status = status; + public Transaction error(@javax.annotation.Nullable String error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + public String getError() { + return error; } + public void setError(@javax.annotation.Nullable String error) { + this.error = error; + } - public Transaction subscription(Subscription subscription) { - - this.subscription = subscription; + + public Transaction id(@javax.annotation.Nonnull String id) { + this.id = id; return this; } - /** - * Get subscription - * @return subscription - **/ + /** + * Get id + * @return id + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public String getId() { + return id; + } - public Subscription getSubscription() { - return subscription; + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; } - public void setSubscription(Subscription subscription) { - this.subscription = subscription; + public Transaction isGift(@javax.annotation.Nullable Boolean isGift) { + this.isGift = isGift; + return this; } + /** + * Get isGift + * @return isGift + */ + @javax.annotation.Nullable + public Boolean getIsGift() { + return isGift; + } - public Transaction sandbox(Boolean sandbox) { - - this.sandbox = sandbox; - return this; + public void setIsGift(@javax.annotation.Nullable Boolean isGift) { + this.isGift = isGift; } - /** - * Get sandbox - * @return sandbox - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - public Boolean getSandbox() { - return sandbox; + public Transaction isTokens(@javax.annotation.Nullable Boolean isTokens) { + this.isTokens = isTokens; + return this; } + /** + * Get isTokens + * @return isTokens + */ + @javax.annotation.Nullable + public Boolean getIsTokens() { + return isTokens; + } - public void setSandbox(Boolean sandbox) { - this.sandbox = sandbox; + public void setIsTokens(@javax.annotation.Nullable Boolean isTokens) { + this.isTokens = isTokens; } - public Transaction createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; + public Transaction sandbox(@javax.annotation.Nonnull Boolean sandbox) { + this.sandbox = sandbox; return this; } - /** - * Get createdAt - * @return createdAt - **/ + /** + * Get sandbox + * @return sandbox + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public OffsetDateTime getCreatedAt() { - return createdAt; + public Boolean getSandbox() { + return sandbox; } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public void setSandbox(@javax.annotation.Nonnull Boolean sandbox) { + this.sandbox = sandbox; } - public Transaction updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; + public Transaction status(@javax.annotation.Nonnull TransactionStatus status) { + this.status = status; return this; } - /** - * Get updatedAt - * @return updatedAt - **/ + /** + * Get status + * @return status + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public OffsetDateTime getUpdatedAt() { - return updatedAt; + public TransactionStatus getStatus() { + return status; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + 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 agreement(TransactionAgreement agreement) { - - this.agreement = agreement; + public Transaction subscription(@javax.annotation.Nonnull Subscription subscription) { + this.subscription = subscription; return this; } - /** - * Get agreement - * @return agreement - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") + /** + * Get subscription + * @return subscription + */ + @javax.annotation.Nonnull + public Subscription getSubscription() { + return subscription; + } - public TransactionAgreement getAgreement() { - return agreement; + public void setSubscription(@javax.annotation.Nonnull Subscription subscription) { + this.subscription = subscription; } - public void setAgreement(TransactionAgreement agreement) { - this.agreement = agreement; + public Transaction updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; } + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } - public Transaction error(String error) { - - this.error = error; + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public Transaction userDisplayName(@javax.annotation.Nullable String userDisplayName) { + this.userDisplayName = userDisplayName; return this; } - /** - * Get error - * @return error - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + /** + * Get userDisplayName + * @return userDisplayName + */ + @javax.annotation.Nullable + public String getUserDisplayName() { + return userDisplayName; + } - public String getError() { - return error; + public void setUserDisplayName(@javax.annotation.Nullable String userDisplayName) { + this.userDisplayName = userDisplayName; } - public void setError(String error) { - this.error = error; + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nullable String userId) { + this.userId = userId; } + @Override public boolean equals(Object o) { if (this == o) { @@ -286,35 +379,43 @@ public boolean equals(Object o) { return false; } Transaction transaction = (Transaction) o; - return Objects.equals(this.id, transaction.id) && + return Objects.equals(this.agreement, transaction.agreement) && + Objects.equals(this.createdAt, transaction.createdAt) && + Objects.equals(this.error, transaction.error) && + Objects.equals(this.id, transaction.id) && + Objects.equals(this.isGift, transaction.isGift) && + Objects.equals(this.isTokens, transaction.isTokens) && + Objects.equals(this.sandbox, transaction.sandbox) && Objects.equals(this.status, transaction.status) && + Objects.equals(this.steam, transaction.steam) && Objects.equals(this.subscription, transaction.subscription) && - Objects.equals(this.sandbox, transaction.sandbox) && - Objects.equals(this.createdAt, transaction.createdAt) && Objects.equals(this.updatedAt, transaction.updatedAt) && - Objects.equals(this.steam, transaction.steam) && - Objects.equals(this.agreement, transaction.agreement) && - Objects.equals(this.error, transaction.error); + Objects.equals(this.userDisplayName, transaction.userDisplayName) && + Objects.equals(this.userId, transaction.userId); } @Override public int hashCode() { - return Objects.hash(id, status, subscription, sandbox, createdAt, updatedAt, steam, agreement, error); + return Objects.hash(agreement, createdAt, error, id, isGift, isTokens, sandbox, status, steam, subscription, updatedAt, userDisplayName, userId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Transaction {\n"); + sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isGift: ").append(toIndentedString(isGift)).append("\n"); + sb.append(" isTokens: ").append(toIndentedString(isTokens)).append("\n"); + sb.append(" sandbox: ").append(toIndentedString(sandbox)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" steam: ").append(toIndentedString(steam)).append("\n"); sb.append(" subscription: ").append(toIndentedString(subscription)).append("\n"); - sb.append(" sandbox: ").append(toIndentedString(sandbox)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" steam: ").append(toIndentedString(steam)).append("\n"); - sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" userDisplayName: ").append(toIndentedString(userDisplayName)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -324,11 +425,122 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Transaction.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 `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 (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.validateJsonElement(jsonObj.get("agreement")); + } + 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(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.validateJsonElement(jsonObj.get("steam")); + } + // validate the required field `subscription` + Subscription.validateJsonElement(jsonObj.get("subscription")); + if ((jsonObj.get("userDisplayName") != null && !jsonObj.get("userDisplayName").isJsonNull()) && !jsonObj.get("userDisplayName").isJsonPrimitive()) { + 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(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Transaction.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Transaction' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Transaction.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Transaction value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Transaction read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 e9161c62..07cf0dd9 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionAgreement.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionAgreement.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,481 +13,478 @@ package io.github.vrchatapi.model; import 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; +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; /** - * TransactionAgreement + * 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_ITEM_ID = "itemId"; - @SerializedName(SERIALIZED_NAME_ITEM_ID) - private BigDecimal itemId; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_PERIOD = "period"; - @SerializedName(SERIALIZED_NAME_PERIOD) - private String period; - - public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; - @SerializedName(SERIALIZED_NAME_FREQUENCY) - private BigDecimal frequency; - 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_START_DATE = "startDate"; - @SerializedName(SERIALIZED_NAME_START_DATE) - private String startDate; + 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_RECURRING_AMT = "recurringAmt"; - @SerializedName(SERIALIZED_NAME_RECURRING_AMT) - private BigDecimal recurringAmt; - - public static final String SERIALIZED_NAME_CURRENCY = "currency"; - @SerializedName(SERIALIZED_NAME_CURRENCY) - private String currency; - - public static final String SERIALIZED_NAME_TIME_CREATED = "timeCreated"; - @SerializedName(SERIALIZED_NAME_TIME_CREATED) - private String timeCreated; + 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_NEXT_PAYMENT = "nextPayment"; - @SerializedName(SERIALIZED_NAME_NEXT_PAYMENT) - private String nextPayment; + public static final String SERIALIZED_NAME_FREQUENCY = "frequency"; + @SerializedName(SERIALIZED_NAME_FREQUENCY) + @javax.annotation.Nonnull + private Integer frequency; - public static final String SERIALIZED_NAME_LAST_PAYMENT = "lastPayment"; - @SerializedName(SERIALIZED_NAME_LAST_PAYMENT) - private String lastPayment; + 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) - private BigDecimal outstanding; + @javax.annotation.Nonnull + private Integer outstanding; - public static final String SERIALIZED_NAME_FAILED_ATTEMPTS = "failedAttempts"; - @SerializedName(SERIALIZED_NAME_FAILED_ATTEMPTS) - private BigDecimal failedAttempts; + 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 TransactionAgreement agreementId(String agreementId) { - - this.agreementId = agreementId; - return this; - } + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + @javax.annotation.Nonnull + private String startDate; - /** - * Get agreementId - * @return agreementId - **/ + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + private String status; - public String getAgreementId() { - return agreementId; + 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(@javax.annotation.Nonnull String agreement) { + this.agreement = agreement; + return this; + } - public void setAgreementId(String agreementId) { - this.agreementId = agreementId; + /** + * Get agreement + * @return agreement + */ + @javax.annotation.Nonnull + public String getAgreement() { + return agreement; } + public void setAgreement(@javax.annotation.Nonnull String agreement) { + this.agreement = agreement; + } - public TransactionAgreement itemId(BigDecimal itemId) { - - this.itemId = itemId; + + public TransactionAgreement agreementId(@javax.annotation.Nonnull String agreementId) { + this.agreementId = agreementId; return this; } - /** - * Get itemId - * @return itemId - **/ + /** + * Get agreementId + * @return agreementId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getItemId() { - return itemId; + public String getAgreementId() { + return agreementId; } - - public void setItemId(BigDecimal itemId) { - this.itemId = itemId; + public void setAgreementId(@javax.annotation.Nonnull String agreementId) { + this.agreementId = agreementId; } - public TransactionAgreement status(String status) { - - this.status = status; + public TransactionAgreement billingType(@javax.annotation.Nonnull String billingType) { + this.billingType = billingType; return this; } - /** - * This is NOT TransactionStatus, but whatever Steam return. - * @return status - **/ + /** + * Get billingType + * @return billingType + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "This is NOT TransactionStatus, but whatever Steam return.") - - public String getStatus() { - return status; + public String getBillingType() { + return billingType; } - - public void setStatus(String status) { - this.status = status; + public void setBillingType(@javax.annotation.Nonnull String billingType) { + this.billingType = billingType; } - public TransactionAgreement period(String period) { - - this.period = period; + public TransactionAgreement currency(@javax.annotation.Nonnull String currency) { + this.currency = currency; return this; } - /** - * Get period - * @return period - **/ + /** + * Get currency + * @return currency + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getPeriod() { - return period; + public String getCurrency() { + return currency; } - - public void setPeriod(String period) { - this.period = period; + public void setCurrency(@javax.annotation.Nonnull String currency) { + this.currency = currency; } - public TransactionAgreement frequency(BigDecimal frequency) { - - this.frequency = frequency; + public TransactionAgreement endDate(@javax.annotation.Nonnull String endDate) { + this.endDate = endDate; return this; } - /** - * Get frequency - * @return frequency - **/ + /** + * Get endDate + * @return endDate + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getFrequency() { - return frequency; + public String getEndDate() { + return endDate; } - - public void setFrequency(BigDecimal frequency) { - this.frequency = frequency; + public void setEndDate(@javax.annotation.Nonnull String endDate) { + this.endDate = endDate; } - public TransactionAgreement billingType(String billingType) { - - this.billingType = billingType; + public TransactionAgreement failedAttempts(@javax.annotation.Nonnull Integer failedAttempts) { + this.failedAttempts = failedAttempts; return this; } - /** - * Get billingType - * @return billingType - **/ + /** + * Get failedAttempts + * @return failedAttempts + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getBillingType() { - return billingType; + public Integer getFailedAttempts() { + return failedAttempts; } - - public void setBillingType(String billingType) { - this.billingType = billingType; + public void setFailedAttempts(@javax.annotation.Nonnull Integer failedAttempts) { + this.failedAttempts = failedAttempts; } - public TransactionAgreement startDate(String startDate) { - - this.startDate = startDate; + public TransactionAgreement frequency(@javax.annotation.Nonnull Integer frequency) { + this.frequency = frequency; return this; } - /** - * Get startDate - * @return startDate - **/ + /** + * Get frequency + * @return frequency + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getStartDate() { - return startDate; + public Integer getFrequency() { + return frequency; } - - public void setStartDate(String startDate) { - this.startDate = startDate; + public void setFrequency(@javax.annotation.Nonnull Integer frequency) { + this.frequency = frequency; } - public TransactionAgreement endDate(String endDate) { - - this.endDate = endDate; + public TransactionAgreement itemId(@javax.annotation.Nonnull Integer itemId) { + this.itemId = itemId; return this; } - /** - * Get endDate - * @return endDate - **/ + /** + * Get itemId + * @return itemId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getEndDate() { - return endDate; + public Integer getItemId() { + return itemId; } - - public void setEndDate(String endDate) { - this.endDate = endDate; + public void setItemId(@javax.annotation.Nonnull Integer itemId) { + this.itemId = itemId; } - public TransactionAgreement recurringAmt(BigDecimal recurringAmt) { - - this.recurringAmt = recurringAmt; + public TransactionAgreement lastAmount(@javax.annotation.Nonnull BigDecimal lastAmount) { + this.lastAmount = lastAmount; return this; } - /** - * Get recurringAmt - * @return recurringAmt - **/ + /** + * Get lastAmount + * @return lastAmount + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getRecurringAmt() { - return recurringAmt; + public BigDecimal getLastAmount() { + return lastAmount; } - - public void setRecurringAmt(BigDecimal recurringAmt) { - this.recurringAmt = recurringAmt; + public void setLastAmount(@javax.annotation.Nonnull BigDecimal lastAmount) { + this.lastAmount = lastAmount; } - public TransactionAgreement currency(String currency) { - - this.currency = currency; + public TransactionAgreement lastAmountVat(@javax.annotation.Nonnull BigDecimal lastAmountVat) { + this.lastAmountVat = lastAmountVat; return this; } - /** - * Get currency - * @return currency - **/ + /** + * Get lastAmountVat + * @return lastAmountVat + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getCurrency() { - return currency; + public BigDecimal getLastAmountVat() { + return lastAmountVat; } - - public void setCurrency(String currency) { - this.currency = currency; + public void setLastAmountVat(@javax.annotation.Nonnull BigDecimal lastAmountVat) { + this.lastAmountVat = lastAmountVat; } - public TransactionAgreement timeCreated(String timeCreated) { - - this.timeCreated = timeCreated; + public TransactionAgreement lastPayment(@javax.annotation.Nonnull String lastPayment) { + this.lastPayment = lastPayment; return this; } - /** - * Get timeCreated - * @return timeCreated - **/ + /** + * Get lastPayment + * @return lastPayment + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getTimeCreated() { - return timeCreated; + public String getLastPayment() { + return lastPayment; } - - public void setTimeCreated(String timeCreated) { - this.timeCreated = timeCreated; + 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 lastPayment(String lastPayment) { - - this.lastPayment = lastPayment; + public TransactionAgreement outstanding(@javax.annotation.Nonnull Integer outstanding) { + this.outstanding = outstanding; return this; } - /** - * Get lastPayment - * @return lastPayment - **/ + /** + * Get outstanding + * @return outstanding + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getLastPayment() { - return lastPayment; + public Integer getOutstanding() { + return outstanding; } - - public void setLastPayment(String lastPayment) { - this.lastPayment = lastPayment; + public void setOutstanding(@javax.annotation.Nonnull Integer outstanding) { + this.outstanding = outstanding; } - public TransactionAgreement lastAmount(BigDecimal lastAmount) { - - this.lastAmount = lastAmount; + public TransactionAgreement period(@javax.annotation.Nonnull String period) { + this.period = period; return this; } - /** - * Get lastAmount - * @return lastAmount - **/ + /** + * Get period + * @return period + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getLastAmount() { - return lastAmount; + public String getPeriod() { + return period; } - - public void setLastAmount(BigDecimal lastAmount) { - this.lastAmount = lastAmount; + public void setPeriod(@javax.annotation.Nonnull String period) { + this.period = period; } - public TransactionAgreement lastAmountVat(BigDecimal lastAmountVat) { - - this.lastAmountVat = lastAmountVat; + public TransactionAgreement recurringAmt(@javax.annotation.Nonnull BigDecimal recurringAmt) { + this.recurringAmt = recurringAmt; return this; } - /** - * Get lastAmountVat - * @return lastAmountVat - **/ + /** + * Get recurringAmt + * @return recurringAmt + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getLastAmountVat() { - return lastAmountVat; + public BigDecimal getRecurringAmt() { + return recurringAmt; } - - public void setLastAmountVat(BigDecimal lastAmountVat) { - this.lastAmountVat = lastAmountVat; + public void setRecurringAmt(@javax.annotation.Nonnull BigDecimal recurringAmt) { + this.recurringAmt = recurringAmt; } - public TransactionAgreement outstanding(BigDecimal outstanding) { - - this.outstanding = outstanding; + public TransactionAgreement startDate(@javax.annotation.Nonnull String startDate) { + this.startDate = startDate; return this; } - /** - * Get outstanding - * @return outstanding - **/ + /** + * Get startDate + * @return startDate + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getOutstanding() { - return outstanding; + public String getStartDate() { + return startDate; } - - public void setOutstanding(BigDecimal outstanding) { - this.outstanding = outstanding; + public void setStartDate(@javax.annotation.Nonnull String startDate) { + this.startDate = startDate; } - public TransactionAgreement failedAttempts(BigDecimal failedAttempts) { - - this.failedAttempts = failedAttempts; + public TransactionAgreement status(@javax.annotation.Nonnull String status) { + this.status = status; return this; } - /** - * Get failedAttempts - * @return failedAttempts - **/ + /** + * This is NOT TransactionStatus, but whatever Steam return. + * @return status + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public String getStatus() { + return status; + } - public BigDecimal getFailedAttempts() { - return failedAttempts; + public void setStatus(@javax.annotation.Nonnull String status) { + this.status = status; } - public void setFailedAttempts(BigDecimal failedAttempts) { - this.failedAttempts = failedAttempts; + public TransactionAgreement timeCreated(@javax.annotation.Nonnull String timeCreated) { + this.timeCreated = timeCreated; + return this; + } + + /** + * Get timeCreated + * @return timeCreated + */ + @javax.annotation.Nonnull + public String getTimeCreated() { + return timeCreated; } + public void setTimeCreated(@javax.annotation.Nonnull String timeCreated) { + this.timeCreated = timeCreated; + } + + @Override public boolean equals(Object o) { @@ -498,51 +495,53 @@ public boolean equals(Object o) { return false; } TransactionAgreement transactionAgreement = (TransactionAgreement) o; - return Objects.equals(this.agreementId, transactionAgreement.agreementId) && - Objects.equals(this.itemId, transactionAgreement.itemId) && - Objects.equals(this.status, transactionAgreement.status) && - Objects.equals(this.period, transactionAgreement.period) && - Objects.equals(this.frequency, transactionAgreement.frequency) && + return Objects.equals(this.agreement, transactionAgreement.agreement) && + Objects.equals(this.agreementId, transactionAgreement.agreementId) && Objects.equals(this.billingType, transactionAgreement.billingType) && - Objects.equals(this.startDate, transactionAgreement.startDate) && - Objects.equals(this.endDate, transactionAgreement.endDate) && - Objects.equals(this.recurringAmt, transactionAgreement.recurringAmt) && Objects.equals(this.currency, transactionAgreement.currency) && - Objects.equals(this.timeCreated, transactionAgreement.timeCreated) && - Objects.equals(this.nextPayment, transactionAgreement.nextPayment) && - Objects.equals(this.lastPayment, transactionAgreement.lastPayment) && + Objects.equals(this.endDate, transactionAgreement.endDate) && + Objects.equals(this.failedAttempts, transactionAgreement.failedAttempts) && + Objects.equals(this.frequency, transactionAgreement.frequency) && + Objects.equals(this.itemId, transactionAgreement.itemId) && Objects.equals(this.lastAmount, transactionAgreement.lastAmount) && Objects.equals(this.lastAmountVat, transactionAgreement.lastAmountVat) && + Objects.equals(this.lastPayment, transactionAgreement.lastPayment) && + Objects.equals(this.nextPayment, transactionAgreement.nextPayment) && Objects.equals(this.outstanding, transactionAgreement.outstanding) && - Objects.equals(this.failedAttempts, transactionAgreement.failedAttempts); + Objects.equals(this.period, transactionAgreement.period) && + Objects.equals(this.recurringAmt, transactionAgreement.recurringAmt) && + Objects.equals(this.startDate, transactionAgreement.startDate) && + Objects.equals(this.status, transactionAgreement.status) && + Objects.equals(this.timeCreated, transactionAgreement.timeCreated); } @Override public int hashCode() { - return Objects.hash(agreementId, itemId, status, period, frequency, billingType, startDate, endDate, recurringAmt, currency, timeCreated, nextPayment, lastPayment, lastAmount, lastAmountVat, outstanding, failedAttempts); + return Objects.hash(agreement, agreementId, billingType, currency, endDate, failedAttempts, frequency, itemId, lastAmount, lastAmountVat, lastPayment, nextPayment, outstanding, period, recurringAmt, startDate, status, timeCreated); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TransactionAgreement {\n"); + sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); sb.append(" agreementId: ").append(toIndentedString(agreementId)).append("\n"); - sb.append(" itemId: ").append(toIndentedString(itemId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" period: ").append(toIndentedString(period)).append("\n"); - sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); sb.append(" billingType: ").append(toIndentedString(billingType)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" recurringAmt: ").append(toIndentedString(recurringAmt)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); - sb.append(" nextPayment: ").append(toIndentedString(nextPayment)).append("\n"); - sb.append(" lastPayment: ").append(toIndentedString(lastPayment)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" failedAttempts: ").append(toIndentedString(failedAttempts)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" itemId: ").append(toIndentedString(itemId)).append("\n"); sb.append(" lastAmount: ").append(toIndentedString(lastAmount)).append("\n"); sb.append(" lastAmountVat: ").append(toIndentedString(lastAmountVat)).append("\n"); + sb.append(" lastPayment: ").append(toIndentedString(lastPayment)).append("\n"); + sb.append(" nextPayment: ").append(toIndentedString(nextPayment)).append("\n"); sb.append(" outstanding: ").append(toIndentedString(outstanding)).append("\n"); - sb.append(" failedAttempts: ").append(toIndentedString(failedAttempts)).append("\n"); + sb.append(" period: ").append(toIndentedString(period)).append("\n"); + sb.append(" recurringAmt: ").append(toIndentedString(recurringAmt)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" timeCreated: ").append(toIndentedString(timeCreated)).append("\n"); sb.append("}"); return sb.toString(); } @@ -552,11 +551,131 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TransactionAgreement.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 `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 (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(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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `timeCreated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timeCreated").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TransactionAgreement.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TransactionAgreement' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TransactionAgreement.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TransactionAgreement value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TransactionAgreement read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 924d5691..01760728 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionStatus.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionStatus.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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 TransactionStatus { ACTIVE("active"), - FAILED("failed"), + CHARGEBACK("chargeback"), EXPIRED("expired"), - CHARGEBACK("chargeback"); + FAILED("failed"); private String value; @@ -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 114e1ad2..79e8ff0b 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionSteamInfo.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionSteamInfo.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,158 +13,167 @@ package io.github.vrchatapi.model; import 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; +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; /** - * TransactionSteamInfo + * */ -@javax.annotation.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_WALLET_INFO = "walletInfo"; - @SerializedName(SERIALIZED_NAME_WALLET_INFO) - private TransactionSteamWalletInfo walletInfo; + 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_ORDER_ID = "orderId"; - @SerializedName(SERIALIZED_NAME_ORDER_ID) - private String orderId; - 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 walletInfo(TransactionSteamWalletInfo walletInfo) { - - this.walletInfo = walletInfo; + public TransactionSteamInfo() { + } + + public TransactionSteamInfo orderId(@javax.annotation.Nonnull String orderId) { + this.orderId = orderId; return this; } - /** - * Get walletInfo - * @return walletInfo - **/ + /** + * Steam Order ID + * @return orderId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public TransactionSteamWalletInfo getWalletInfo() { - return walletInfo; + public String getOrderId() { + return orderId; } - - public void setWalletInfo(TransactionSteamWalletInfo walletInfo) { - this.walletInfo = walletInfo; + 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 orderId(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) { - this.orderId = orderId; - } - - - 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(@javax.annotation.Nonnull TransactionSteamWalletInfo walletInfo) { + this.walletInfo = walletInfo; + return this; + } + + /** + * Get walletInfo + * @return walletInfo + */ + @javax.annotation.Nonnull + public TransactionSteamWalletInfo getWalletInfo() { + return walletInfo; + } + + public void setWalletInfo(@javax.annotation.Nonnull TransactionSteamWalletInfo walletInfo) { + this.walletInfo = walletInfo; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -174,27 +183,27 @@ public boolean equals(Object o) { return false; } TransactionSteamInfo transactionSteamInfo = (TransactionSteamInfo) o; - return Objects.equals(this.walletInfo, transactionSteamInfo.walletInfo) && + return Objects.equals(this.orderId, transactionSteamInfo.orderId) && Objects.equals(this.steamId, transactionSteamInfo.steamId) && - Objects.equals(this.orderId, transactionSteamInfo.orderId) && Objects.equals(this.steamUrl, transactionSteamInfo.steamUrl) && - Objects.equals(this.transId, transactionSteamInfo.transId); + Objects.equals(this.transId, transactionSteamInfo.transId) && + Objects.equals(this.walletInfo, transactionSteamInfo.walletInfo); } @Override public int hashCode() { - return Objects.hash(walletInfo, steamId, orderId, steamUrl, transId); + return Objects.hash(orderId, steamId, steamUrl, transId, walletInfo); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TransactionSteamInfo {\n"); - sb.append(" walletInfo: ").append(toIndentedString(walletInfo)).append("\n"); - sb.append(" steamId: ").append(toIndentedString(steamId)).append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" steamId: ").append(toIndentedString(steamId)).append("\n"); sb.append(" steamUrl: ").append(toIndentedString(steamUrl)).append("\n"); sb.append(" transId: ").append(toIndentedString(transId)).append("\n"); + sb.append(" walletInfo: ").append(toIndentedString(walletInfo)).append("\n"); sb.append("}"); return sb.toString(); } @@ -204,11 +213,112 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("orderId", "steamId", "steamUrl", "transId", "walletInfo")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("orderId", "steamId", "steamUrl", "transId", "walletInfo")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TransactionSteamInfo.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 `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 (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(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(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(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(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.validateJsonElement(jsonObj.get("walletInfo")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TransactionSteamInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TransactionSteamInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TransactionSteamInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TransactionSteamInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TransactionSteamInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 39c8e357..98587dc6 100644 --- a/src/main/java/io/github/vrchatapi/model/TransactionSteamWalletInfo.java +++ b/src/main/java/io/github/vrchatapi/model/TransactionSteamWalletInfo.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,130 +13,142 @@ package io.github.vrchatapi.model; import 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; +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; /** - * TransactionSteamWalletInfo + * */ -@javax.annotation.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_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - 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) - private String status; - - - public TransactionSteamWalletInfo state(String state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getState() { - return state; - } - + private String status; - public void setState(String state) { - this.state = state; + 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 status(String status) { - + public TransactionSteamWalletInfo state(@javax.annotation.Nonnull String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nonnull + public String getState() { + return state; + } + + public void setState(@javax.annotation.Nonnull String state) { + this.state = state; + } + + + 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -146,24 +158,24 @@ public boolean equals(Object o) { return false; } TransactionSteamWalletInfo transactionSteamWalletInfo = (TransactionSteamWalletInfo) o; - return Objects.equals(this.state, transactionSteamWalletInfo.state) && - Objects.equals(this.country, transactionSteamWalletInfo.country) && + return Objects.equals(this.country, transactionSteamWalletInfo.country) && Objects.equals(this.currency, transactionSteamWalletInfo.currency) && + Objects.equals(this.state, transactionSteamWalletInfo.state) && Objects.equals(this.status, transactionSteamWalletInfo.status); } @Override public int hashCode() { - return Objects.hash(state, country, currency, status); + return Objects.hash(country, currency, state, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TransactionSteamWalletInfo {\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); @@ -174,11 +186,110 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("country", "currency", "state", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("country", "currency", "state", "status")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TransactionSteamWalletInfo.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 `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 (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(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(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(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(java.util.Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TransactionSteamWalletInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TransactionSteamWalletInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TransactionSteamWalletInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TransactionSteamWalletInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TransactionSteamWalletInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..c467de6f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TransferGroupRequest.java @@ -0,0 +1,201 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * TransferGroupRequest + */ +@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(@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 + public String getTransferTargetId() { + return transferTargetId; + } + + public void setTransferTargetId(@javax.annotation.Nullable String transferTargetId) { + this.transferTargetId = transferTargetId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransferGroupRequest transferGroupRequest = (TransferGroupRequest) o; + return Objects.equals(this.transferTargetId, transferGroupRequest.transferTargetId); + } + + @Override + public int hashCode() { + return Objects.hash(transferTargetId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransferGroupRequest {\n"); + sb.append(" transferTargetId: ").append(toIndentedString(transferTargetId)).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("transferTargetId")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TransferGroupRequest.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 `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(java.util.Locale.ROOT, "Expected the field `transferTargetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTargetId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TransferGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TransferGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TransferGroupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TransferGroupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TransferGroupRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..685f95d0 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TutorialStatus.java @@ -0,0 +1,302 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * TutorialStatus + */ +@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(@javax.annotation.Nonnull Boolean completed) { + this.completed = completed; + return this; + } + + /** + * Get completed + * @return completed + */ + @javax.annotation.Nonnull + public Boolean getCompleted() { + return completed; + } + + public void setCompleted(@javax.annotation.Nonnull Boolean completed) { + this.completed = completed; + } + + + public TutorialStatus completedAnyTutorial(@javax.annotation.Nonnull Boolean completedAnyTutorial) { + this.completedAnyTutorial = completedAnyTutorial; + return this; + } + + /** + * Get completedAnyTutorial + * @return completedAnyTutorial + */ + @javax.annotation.Nonnull + public Boolean getCompletedAnyTutorial() { + return completedAnyTutorial; + } + + public void setCompletedAnyTutorial(@javax.annotation.Nonnull Boolean completedAnyTutorial) { + this.completedAnyTutorial = completedAnyTutorial; + } + + + 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 + public List getCompletedTutorials() { + return completedTutorials; + } + + public void setCompletedTutorials(@javax.annotation.Nonnull List completedTutorials) { + this.completedTutorials = completedTutorials; + } + + + 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 + public String getTutorialKey() { + return tutorialKey; + } + + public void setTutorialKey(@javax.annotation.Nonnull String tutorialKey) { + this.tutorialKey = tutorialKey; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TutorialStatus tutorialStatus = (TutorialStatus) o; + return Objects.equals(this.completed, tutorialStatus.completed) && + Objects.equals(this.completedAnyTutorial, tutorialStatus.completedAnyTutorial) && + Objects.equals(this.completedTutorials, tutorialStatus.completedTutorials) && + Objects.equals(this.tutorialKey, tutorialStatus.tutorialKey); + } + + @Override + public int hashCode() { + return Objects.hash(completed, completedAnyTutorial, completedTutorials, tutorialKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TutorialStatus {\n"); + sb.append(" completed: ").append(toIndentedString(completed)).append("\n"); + sb.append(" completedAnyTutorial: ").append(toIndentedString(completedAnyTutorial)).append("\n"); + sb.append(" completedTutorials: ").append(toIndentedString(completedTutorials)).append("\n"); + sb.append(" tutorialKey: ").append(toIndentedString(tutorialKey)).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("completed", "completedAnyTutorial", "completedTutorials", "tutorialKey")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("completed", "completedAnyTutorial", "completedTutorials", "tutorialKey")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TutorialStatus.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `tutorialKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tutorialKey").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TutorialStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TutorialStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TutorialStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TutorialStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TutorialStatus read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 96541afe..171612ff 100644 --- a/src/main/java/io/github/vrchatapi/model/TwoFactorAuthCode.java +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorAuthCode.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,49 +13,70 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -87,11 +108,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("code")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TwoFactorAuthCode.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 `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 (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(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TwoFactorAuthCode.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TwoFactorAuthCode' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TwoFactorAuthCode.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TwoFactorAuthCode value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TwoFactorAuthCode read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } diff --git a/src/main/java/io/github/vrchatapi/model/DeploymentGroup.java b/src/main/java/io/github/vrchatapi/model/TwoFactorAuthType.java similarity index 51% rename from src/main/java/io/github/vrchatapi/model/DeploymentGroup.java rename to src/main/java/io/github/vrchatapi/model/TwoFactorAuthType.java index 97735aba..8c06bed7 100644 --- a/src/main/java/io/github/vrchatapi/model/DeploymentGroup.java +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorAuthType.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8-nightly.20 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,33 +13,30 @@ 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; /** - * Used to identify which API deployment cluster is currently responding. `blue` and `green` are used by Production. `grape`and `cherry` are used during Development. [Blue Green Deployment by Martin Fowler](https://martinfowler.com/bliki/BlueGreenDeployment.html) + * Gets or Sets TwoFactorAuthType */ -@JsonAdapter(DeploymentGroup.Adapter.class) -public enum DeploymentGroup { +@JsonAdapter(TwoFactorAuthType.Adapter.class) +public enum TwoFactorAuthType { - BLUE("blue"), + EMAIL_OTP("emailOtp"), - GREEN("green"), + OTP("otp"), - GRAPE("grape"), - - CHERRY("cherry"); + TOTP("totp"); private String value; - DeploymentGroup(String value) { + TwoFactorAuthType(String value) { this.value = value; } @@ -52,8 +49,8 @@ public String toString() { return String.valueOf(value); } - public static DeploymentGroup fromValue(String value) { - for (DeploymentGroup b : DeploymentGroup.values()) { + public static TwoFactorAuthType fromValue(String value) { + for (TwoFactorAuthType b : TwoFactorAuthType.values()) { if (b.value.equals(value)) { return b; } @@ -61,17 +58,22 @@ public static DeploymentGroup fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter { @Override - public void write(final JsonWriter jsonWriter, final DeploymentGroup enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final TwoFactorAuthType enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public DeploymentGroup read(final JsonReader jsonReader) throws IOException { + public TwoFactorAuthType read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); - return DeploymentGroup.fromValue(value); + 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 new file mode 100644 index 00000000..9bfa0c4c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorEmailCode.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * TwoFactorEmailCode + */ +@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(@javax.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nonnull String code) { + this.code = code; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwoFactorEmailCode twoFactorEmailCode = (TwoFactorEmailCode) o; + return Objects.equals(this.code, twoFactorEmailCode.code); + } + + @Override + public int hashCode() { + return Objects.hash(code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwoFactorEmailCode {\n"); + sb.append(" code: ").append(toIndentedString(code)).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("code")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TwoFactorEmailCode.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 `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 (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(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TwoFactorEmailCode.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TwoFactorEmailCode' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TwoFactorEmailCode.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TwoFactorEmailCode value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TwoFactorEmailCode read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..f0ff4558 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodes.java @@ -0,0 +1,261 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.TwoFactorRecoveryCodesOtpInner; +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; + +/** + * TwoFactorRecoveryCodes + */ +@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) + @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) + @javax.annotation.Nullable + private List requiresTwoFactorAuth = new ArrayList<>(); + + public TwoFactorRecoveryCodes() { + } + + public TwoFactorRecoveryCodes otp(@javax.annotation.Nullable List otp) { + this.otp = otp; + return this; + } + + public TwoFactorRecoveryCodes addOtpItem(TwoFactorRecoveryCodesOtpInner otpItem) { + if (this.otp == null) { + this.otp = new ArrayList<>(); + } + this.otp.add(otpItem); + return this; + } + + /** + * Get otp + * @return otp + */ + @javax.annotation.Nullable + public List getOtp() { + return otp; + } + + public void setOtp(@javax.annotation.Nullable List otp) { + this.otp = otp; + } + + + public TwoFactorRecoveryCodes requiresTwoFactorAuth(@javax.annotation.Nullable List requiresTwoFactorAuth) { + this.requiresTwoFactorAuth = requiresTwoFactorAuth; + return this; + } + + public TwoFactorRecoveryCodes addRequiresTwoFactorAuthItem(String requiresTwoFactorAuthItem) { + if (this.requiresTwoFactorAuth == null) { + this.requiresTwoFactorAuth = new ArrayList<>(); + } + this.requiresTwoFactorAuth.add(requiresTwoFactorAuthItem); + return this; + } + + /** + * Get requiresTwoFactorAuth + * @return requiresTwoFactorAuth + */ + @javax.annotation.Nullable + public List getRequiresTwoFactorAuth() { + return requiresTwoFactorAuth; + } + + public void setRequiresTwoFactorAuth(@javax.annotation.Nullable List requiresTwoFactorAuth) { + this.requiresTwoFactorAuth = requiresTwoFactorAuth; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwoFactorRecoveryCodes twoFactorRecoveryCodes = (TwoFactorRecoveryCodes) o; + return Objects.equals(this.otp, twoFactorRecoveryCodes.otp) && + Objects.equals(this.requiresTwoFactorAuth, twoFactorRecoveryCodes.requiresTwoFactorAuth); + } + + @Override + public int hashCode() { + return Objects.hash(otp, requiresTwoFactorAuth); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwoFactorRecoveryCodes {\n"); + sb.append(" otp: ").append(toIndentedString(otp)).append("\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("otp", "requiresTwoFactorAuth")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TwoFactorRecoveryCodes.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 `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(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.validateJsonElement(jsonArrayotp.get(i)); + }; + } + } + // ensure the optional json data is an array if present + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TwoFactorRecoveryCodes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TwoFactorRecoveryCodes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TwoFactorRecoveryCodes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TwoFactorRecoveryCodes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TwoFactorRecoveryCodes read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..8eb46d0c --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/TwoFactorRecoveryCodesOtpInner.java @@ -0,0 +1,234 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * TwoFactorRecoveryCodesOtpInner + */ +@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(@javax.annotation.Nonnull String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nonnull + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nonnull String code) { + this.code = code; + } + + + public TwoFactorRecoveryCodesOtpInner used(@javax.annotation.Nonnull Boolean used) { + this.used = used; + return this; + } + + /** + * Get used + * @return used + */ + @javax.annotation.Nonnull + public Boolean getUsed() { + return used; + } + + public void setUsed(@javax.annotation.Nonnull Boolean used) { + this.used = used; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwoFactorRecoveryCodesOtpInner twoFactorRecoveryCodesOtpInner = (TwoFactorRecoveryCodesOtpInner) o; + return Objects.equals(this.code, twoFactorRecoveryCodesOtpInner.code) && + Objects.equals(this.used, twoFactorRecoveryCodesOtpInner.used); + } + + @Override + public int hashCode() { + return Objects.hash(code, used); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwoFactorRecoveryCodesOtpInner {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" used: ").append(toIndentedString(used)).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("code", "used")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TwoFactorRecoveryCodesOtpInner.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 `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 (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(java.util.Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TwoFactorRecoveryCodesOtpInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TwoFactorRecoveryCodesOtpInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TwoFactorRecoveryCodesOtpInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TwoFactorRecoveryCodesOtpInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TwoFactorRecoveryCodesOtpInner read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 85901af0..66f9a846 100644 --- a/src/main/java/io/github/vrchatapi/model/UnityPackage.java +++ b/src/main/java/io/github/vrchatapi/model/UnityPackage.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,295 +13,435 @@ package io.github.vrchatapi.model; import 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 io.github.vrchatapi.model.PerformanceRatings; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; import java.io.IOException; -import org.threeten.bp.OffsetDateTime; + +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; /** - * UnityPackage + * */ -@javax.annotation.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) - private Integer unitySortNumber; + @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(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(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(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(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 platform(String platform) { - + public UnityPackage impostorUrl(@javax.annotation.Nullable String impostorUrl) { + this.impostorUrl = impostorUrl; + return this; + } + + /** + * Get impostorUrl + * @return impostorUrl + */ + @javax.annotation.Nullable + public String getImpostorUrl() { + return impostorUrl; + } + + public void setImpostorUrl(@javax.annotation.Nullable String impostorUrl) { + this.impostorUrl = impostorUrl; + } + + + public UnityPackage impostorizerVersion(@javax.annotation.Nullable String impostorizerVersion) { + this.impostorizerVersion = impostorizerVersion; + return this; + } + + /** + * Get impostorizerVersion + * @return impostorizerVersion + */ + @javax.annotation.Nullable + public String getImpostorizerVersion() { + return impostorizerVersion; + } + + public void setImpostorizerVersion(@javax.annotation.Nullable String impostorizerVersion) { + this.impostorizerVersion = impostorizerVersion; + } + + + public UnityPackage performanceRating(@javax.annotation.Nullable PerformanceRatings performanceRating) { + this.performanceRating = performanceRating; + return this; + } + + /** + * Get performanceRating + * @return performanceRating + */ + @javax.annotation.Nullable + public PerformanceRatings getPerformanceRating() { + return performanceRating; + } + + public void setPerformanceRating(@javax.annotation.Nullable PerformanceRatings performanceRating) { + this.performanceRating = performanceRating; + } + + + public UnityPackage platform(@javax.annotation.Nonnull String platform) { this.platform = platform; return this; } - /** - * This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. + /** + * 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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(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(value = "") - public Object getPluginUrlObject() { return pluginUrlObject; } - - public void setPluginUrlObject(Object pluginUrlObject) { + public void setPluginUrlObject(@javax.annotation.Nullable Object pluginUrlObject) { this.pluginUrlObject = pluginUrlObject; } - public UnityPackage unitySortNumber(Integer unitySortNumber) { - + public UnityPackage scanStatus(@javax.annotation.Nullable String scanStatus) { + this.scanStatus = scanStatus; + return this; + } + + /** + * Get scanStatus + * @return scanStatus + */ + @javax.annotation.Nullable + public String getScanStatus() { + return scanStatus; + } + + public void setScanStatus(@javax.annotation.Nullable String scanStatus) { + this.scanStatus = scanStatus; + } + + + public UnityPackage unitySortNumber(@javax.annotation.Nullable Long unitySortNumber) { this.unitySortNumber = unitySortNumber; return this; } - /** + /** * Get unitySortNumber * minimum: 0 * @return unitySortNumber - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getUnitySortNumber() { + public Long getUnitySortNumber() { return unitySortNumber; } - - public void setUnitySortNumber(Integer 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 = "2018.4.12f1", 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(@javax.annotation.Nullable String variant) { + this.variant = variant; + return this; + } + + /** + * Get variant + * @return variant + */ + @javax.annotation.Nullable + public String getVariant() { + return variant; + } + + public void setVariant(@javax.annotation.Nullable String variant) { + this.variant = variant; + } + + + public UnityPackage worldSignature(@javax.annotation.Nullable String worldSignature) { + this.worldSignature = worldSignature; + return this; + } + + /** + * Get worldSignature + * @return worldSignature + */ + @javax.annotation.Nullable + public String getWorldSignature() { + return worldSignature; + } + + public void setWorldSignature(@javax.annotation.Nullable String worldSignature) { + this.worldSignature = worldSignature; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -316,16 +456,33 @@ public boolean equals(Object o) { Objects.equals(this.assetVersion, unityPackage.assetVersion) && Objects.equals(this.createdAt, unityPackage.createdAt) && Objects.equals(this.id, unityPackage.id) && + Objects.equals(this.impostorUrl, unityPackage.impostorUrl) && + Objects.equals(this.impostorizerVersion, unityPackage.impostorizerVersion) && + Objects.equals(this.performanceRating, unityPackage.performanceRating) && Objects.equals(this.platform, unityPackage.platform) && Objects.equals(this.pluginUrl, unityPackage.pluginUrl) && Objects.equals(this.pluginUrlObject, unityPackage.pluginUrlObject) && + Objects.equals(this.scanStatus, unityPackage.scanStatus) && Objects.equals(this.unitySortNumber, unityPackage.unitySortNumber) && - Objects.equals(this.unityVersion, unityPackage.unityVersion); + Objects.equals(this.unityVersion, unityPackage.unityVersion) && + Objects.equals(this.variant, unityPackage.variant) && + Objects.equals(this.worldSignature, unityPackage.worldSignature); + } + + 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(assetUrl, assetUrlObject, assetVersion, createdAt, id, platform, pluginUrl, pluginUrlObject, unitySortNumber, unityVersion); + return Objects.hash(assetUrl, assetUrlObject, assetVersion, createdAt, id, impostorUrl, impostorizerVersion, performanceRating, platform, pluginUrl, pluginUrlObject, scanStatus, unitySortNumber, unityVersion, variant, worldSignature); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -337,11 +494,17 @@ public String toString() { sb.append(" assetVersion: ").append(toIndentedString(assetVersion)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" impostorUrl: ").append(toIndentedString(impostorUrl)).append("\n"); + sb.append(" impostorizerVersion: ").append(toIndentedString(impostorizerVersion)).append("\n"); + sb.append(" performanceRating: ").append(toIndentedString(performanceRating)).append("\n"); sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" pluginUrl: ").append(toIndentedString(pluginUrl)).append("\n"); sb.append(" pluginUrlObject: ").append(toIndentedString(pluginUrlObject)).append("\n"); + sb.append(" scanStatus: ").append(toIndentedString(scanStatus)).append("\n"); sb.append(" unitySortNumber: ").append(toIndentedString(unitySortNumber)).append("\n"); sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); + sb.append(" variant: ").append(toIndentedString(variant)).append("\n"); + sb.append(" worldSignature: ").append(toIndentedString(worldSignature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -351,11 +514,132 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UnityPackage.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 `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 (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(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(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(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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `worldSignature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldSignature").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UnityPackage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UnityPackage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UnityPackage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UnityPackage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UnityPackage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..274f3f00 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateAssetReviewNotesRequest.java @@ -0,0 +1,208 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UpdateAssetReviewNotesRequest + */ +@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(@javax.annotation.Nonnull String reviewNotes) { + this.reviewNotes = reviewNotes; + return this; + } + + /** + * Get reviewNotes + * @return reviewNotes + */ + @javax.annotation.Nonnull + public String getReviewNotes() { + return reviewNotes; + } + + public void setReviewNotes(@javax.annotation.Nonnull String reviewNotes) { + this.reviewNotes = reviewNotes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAssetReviewNotesRequest updateAssetReviewNotesRequest = (UpdateAssetReviewNotesRequest) o; + return Objects.equals(this.reviewNotes, updateAssetReviewNotesRequest.reviewNotes); + } + + @Override + public int hashCode() { + return Objects.hash(reviewNotes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAssetReviewNotesRequest {\n"); + sb.append(" reviewNotes: ").append(toIndentedString(reviewNotes)).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("reviewNotes")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("reviewNotes")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateAssetReviewNotesRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `reviewNotes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reviewNotes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateAssetReviewNotesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateAssetReviewNotesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateAssetReviewNotesRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateAssetReviewNotesRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateAssetReviewNotesRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 c7605a70..34a1de88 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateAvatarRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateAvatarRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,277 +13,297 @@ package io.github.vrchatapi.model; import 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.math.BigDecimal; 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; /** * 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_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - 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_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + 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_VERSION = "version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private BigDecimal version = new BigDecimal("1"); + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @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 UpdateAvatarRequest assetUrl(String assetUrl) { - + public static final String SERIALIZED_NAME_VERSION = "version"; + @SerializedName(SERIALIZED_NAME_VERSION) + @javax.annotation.Nullable + private Integer version = 1; + + public UpdateAvatarRequest() { + } + + 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 id(String id) { - + public UpdateAvatarRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + 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 name(String name) { - + public UpdateAvatarRequest imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public 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 description(String description) { - - this.description = description; + public UpdateAvatarRequest releaseStatus(@javax.annotation.Nullable ReleaseStatus releaseStatus) { + this.releaseStatus = releaseStatus; return this; } - /** - * Get description - * @return description - **/ + /** + * Get releaseStatus + * @return releaseStatus + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getDescription() { - return description; + public ReleaseStatus getReleaseStatus() { + return releaseStatus; } - - public void setDescription(String description) { - this.description = description; + 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; } public UpdateAvatarRequest addTagsItem(String tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(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 UpdateAvatarRequest imageUrl(String imageUrl) { - - this.imageUrl = imageUrl; + public UpdateAvatarRequest unityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; return this; } - /** - * Get imageUrl - * @return imageUrl - **/ + /** + * Get unityPackageUrl + * @return unityPackageUrl + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getImageUrl() { - return imageUrl; + public String getUnityPackageUrl() { + return unityPackageUrl; } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; + public void setUnityPackageUrl(@javax.annotation.Nullable String unityPackageUrl) { + this.unityPackageUrl = unityPackageUrl; } - public UpdateAvatarRequest releaseStatus(ReleaseStatus releaseStatus) { - - this.releaseStatus = releaseStatus; + public UpdateAvatarRequest unityVersion(@javax.annotation.Nullable String unityVersion) { + this.unityVersion = unityVersion; return this; } - /** - * Get releaseStatus - * @return releaseStatus - **/ + /** + * Get unityVersion + * @return unityVersion + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public ReleaseStatus getReleaseStatus() { - return releaseStatus; + public String getUnityVersion() { + return unityVersion; } - - public void setReleaseStatus(ReleaseStatus releaseStatus) { - this.releaseStatus = releaseStatus; + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { + this.unityVersion = unityVersion; } - public UpdateAvatarRequest version(BigDecimal 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 BigDecimal getVersion() { + public Integer getVersion() { return version; } - - public void setVersion(BigDecimal version) { + public void setVersion(@javax.annotation.Nullable Integer version) { this.version = version; } - public UpdateAvatarRequest unityPackageUrl(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) { - this.unityPackageUrl = unityPackageUrl; - } - @Override public boolean equals(Object o) { @@ -295,19 +315,20 @@ public boolean equals(Object o) { } UpdateAvatarRequest updateAvatarRequest = (UpdateAvatarRequest) o; return Objects.equals(this.assetUrl, updateAvatarRequest.assetUrl) && - Objects.equals(this.id, updateAvatarRequest.id) && - Objects.equals(this.name, updateAvatarRequest.name) && Objects.equals(this.description, updateAvatarRequest.description) && - Objects.equals(this.tags, updateAvatarRequest.tags) && + Objects.equals(this.id, updateAvatarRequest.id) && Objects.equals(this.imageUrl, updateAvatarRequest.imageUrl) && + Objects.equals(this.name, updateAvatarRequest.name) && Objects.equals(this.releaseStatus, updateAvatarRequest.releaseStatus) && - Objects.equals(this.version, updateAvatarRequest.version) && - Objects.equals(this.unityPackageUrl, updateAvatarRequest.unityPackageUrl); + Objects.equals(this.tags, updateAvatarRequest.tags) && + Objects.equals(this.unityPackageUrl, updateAvatarRequest.unityPackageUrl) && + Objects.equals(this.unityVersion, updateAvatarRequest.unityVersion) && + Objects.equals(this.version, updateAvatarRequest.version); } @Override public int hashCode() { - return Objects.hash(assetUrl, id, name, description, tags, imageUrl, releaseStatus, version, unityPackageUrl); + return Objects.hash(assetUrl, description, id, imageUrl, name, releaseStatus, tags, unityPackageUrl, unityVersion, version); } @Override @@ -315,14 +336,15 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateAvatarRequest {\n"); sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" unityPackageUrl: ").append(toIndentedString(unityPackageUrl)).append("\n"); + sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); } @@ -332,11 +354,120 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("assetUrl", "description", "id", "imageUrl", "name", "releaseStatus", "tags", "unityPackageUrl", "unityVersion", "version")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateAvatarRequest.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 `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(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(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(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(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(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").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(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(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateAvatarRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateAvatarRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateAvatarRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateAvatarRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateAvatarRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..7b9289f0 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateCalendarEventRequest.java @@ -0,0 +1,749 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.CalendarEventRecurrence; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; + +/** + * UpdateCalendarEventRequest + */ +@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) + @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) + @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) + @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) + @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(@javax.annotation.Nullable String category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @javax.annotation.Nullable + public String getCategory() { + return category; + } + + public void setCategory(@javax.annotation.Nullable String category) { + this.category = category; + } + + + public UpdateCalendarEventRequest closeInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { + this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; + return this; + } + + /** + * Get closeInstanceAfterEndMinutes + * @return closeInstanceAfterEndMinutes + */ + @javax.annotation.Nullable + public Integer getCloseInstanceAfterEndMinutes() { + return closeInstanceAfterEndMinutes; + } + + public void setCloseInstanceAfterEndMinutes(@javax.annotation.Nullable Integer closeInstanceAfterEndMinutes) { + this.closeInstanceAfterEndMinutes = closeInstanceAfterEndMinutes; + } + + + public UpdateCalendarEventRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateCalendarEventRequest endsAt(@javax.annotation.Nullable OffsetDateTime endsAt) { + this.endsAt = endsAt; + return this; + } + + /** + * Time the vent starts at + * @return endsAt + */ + @javax.annotation.Nullable + public OffsetDateTime getEndsAt() { + return endsAt; + } + + public void setEndsAt(@javax.annotation.Nullable OffsetDateTime endsAt) { + this.endsAt = endsAt; + } + + + public UpdateCalendarEventRequest featured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + return this; + } + + /** + * Get featured + * @return featured + */ + @javax.annotation.Nullable + public Boolean getFeatured() { + return featured; + } + + public void setFeatured(@javax.annotation.Nullable Boolean featured) { + this.featured = featured; + } + + + public UpdateCalendarEventRequest guestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { + this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; + return this; + } + + /** + * Get guestEarlyJoinMinutes + * @return guestEarlyJoinMinutes + */ + @javax.annotation.Nullable + public Integer getGuestEarlyJoinMinutes() { + return guestEarlyJoinMinutes; + } + + public void setGuestEarlyJoinMinutes(@javax.annotation.Nullable Integer guestEarlyJoinMinutes) { + this.guestEarlyJoinMinutes = guestEarlyJoinMinutes; + } + + + public UpdateCalendarEventRequest hostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { + this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; + return this; + } + + /** + * Get hostEarlyJoinMinutes + * @return hostEarlyJoinMinutes + */ + @javax.annotation.Nullable + public Integer getHostEarlyJoinMinutes() { + return hostEarlyJoinMinutes; + } + + public void setHostEarlyJoinMinutes(@javax.annotation.Nullable Integer hostEarlyJoinMinutes) { + this.hostEarlyJoinMinutes = hostEarlyJoinMinutes; + } + + + public UpdateCalendarEventRequest imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public UpdateCalendarEventRequest isDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + return this; + } + + /** + * Get isDraft + * @return isDraft + */ + @javax.annotation.Nullable + public Boolean getIsDraft() { + return isDraft; + } + + public void setIsDraft(@javax.annotation.Nullable Boolean isDraft) { + this.isDraft = isDraft; + } + + + public UpdateCalendarEventRequest languages(@javax.annotation.Nullable List languages) { + this.languages = languages; + return this; + } + + public UpdateCalendarEventRequest 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 UpdateCalendarEventRequest parentId(@javax.annotation.Nullable String parentId) { + this.parentId = parentId; + return this; + } + + /** + * Get parentId + * @return parentId + */ + @javax.annotation.Nullable + public String getParentId() { + return parentId; + } + + public void setParentId(@javax.annotation.Nullable String parentId) { + this.parentId = parentId; + } + + + public UpdateCalendarEventRequest platforms(@javax.annotation.Nullable List platforms) { + this.platforms = platforms; + return this; + } + + public UpdateCalendarEventRequest addPlatformsItem(String platformsItem) { + if (this.platforms == null) { + this.platforms = new ArrayList<>(); + } + this.platforms.add(platformsItem); + return this; + } + + /** + * Get platforms + * @return platforms + */ + @javax.annotation.Nullable + public List getPlatforms() { + return platforms; + } + + public void setPlatforms(@javax.annotation.Nullable List platforms) { + this.platforms = platforms; + } + + + public UpdateCalendarEventRequest recurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { + this.recurrence = recurrence; + return this; + } + + /** + * Get recurrence + * @return recurrence + */ + @javax.annotation.Nullable + public CalendarEventRecurrence getRecurrence() { + return recurrence; + } + + public void setRecurrence(@javax.annotation.Nullable CalendarEventRecurrence recurrence) { + this.recurrence = recurrence; + } + + + public UpdateCalendarEventRequest roleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + return this; + } + + public UpdateCalendarEventRequest addRoleIdsItem(String roleIdsItem) { + if (this.roleIds == null) { + this.roleIds = new ArrayList<>(); + } + this.roleIds.add(roleIdsItem); + return this; + } + + /** + * Get roleIds + * @return roleIds + */ + @javax.annotation.Nullable + public List getRoleIds() { + return roleIds; + } + + public void setRoleIds(@javax.annotation.Nullable List roleIds) { + this.roleIds = roleIds; + } + + + public UpdateCalendarEventRequest sendCreationNotification(@javax.annotation.Nullable Boolean sendCreationNotification) { + this.sendCreationNotification = sendCreationNotification; + return this; + } + + /** + * Send notification to group members. + * @return sendCreationNotification + */ + @javax.annotation.Nullable + public Boolean getSendCreationNotification() { + return sendCreationNotification; + } + + public void setSendCreationNotification(@javax.annotation.Nullable Boolean sendCreationNotification) { + this.sendCreationNotification = sendCreationNotification; + } + + + public UpdateCalendarEventRequest startsAt(@javax.annotation.Nullable OffsetDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + * Time the vent starts at + * @return startsAt + */ + @javax.annotation.Nullable + public OffsetDateTime getStartsAt() { + return startsAt; + } + + public void setStartsAt(@javax.annotation.Nullable OffsetDateTime startsAt) { + this.startsAt = startsAt; + } + + + public UpdateCalendarEventRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public UpdateCalendarEventRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public UpdateCalendarEventRequest title(@javax.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Event title + * @return title + */ + @javax.annotation.Nullable + public String getTitle() { + return title; + } + + public void setTitle(@javax.annotation.Nullable String title) { + this.title = title; + } + + + public UpdateCalendarEventRequest usesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { + this.usesInstanceOverflow = usesInstanceOverflow; + return this; + } + + /** + * Get usesInstanceOverflow + * @return usesInstanceOverflow + */ + @javax.annotation.Nullable + public Boolean getUsesInstanceOverflow() { + return usesInstanceOverflow; + } + + public void setUsesInstanceOverflow(@javax.annotation.Nullable Boolean usesInstanceOverflow) { + this.usesInstanceOverflow = usesInstanceOverflow; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCalendarEventRequest updateCalendarEventRequest = (UpdateCalendarEventRequest) o; + return Objects.equals(this.category, updateCalendarEventRequest.category) && + Objects.equals(this.closeInstanceAfterEndMinutes, updateCalendarEventRequest.closeInstanceAfterEndMinutes) && + Objects.equals(this.description, updateCalendarEventRequest.description) && + Objects.equals(this.endsAt, updateCalendarEventRequest.endsAt) && + Objects.equals(this.featured, updateCalendarEventRequest.featured) && + Objects.equals(this.guestEarlyJoinMinutes, updateCalendarEventRequest.guestEarlyJoinMinutes) && + Objects.equals(this.hostEarlyJoinMinutes, updateCalendarEventRequest.hostEarlyJoinMinutes) && + Objects.equals(this.imageId, updateCalendarEventRequest.imageId) && + Objects.equals(this.isDraft, updateCalendarEventRequest.isDraft) && + Objects.equals(this.languages, updateCalendarEventRequest.languages) && + Objects.equals(this.parentId, updateCalendarEventRequest.parentId) && + Objects.equals(this.platforms, updateCalendarEventRequest.platforms) && + Objects.equals(this.recurrence, updateCalendarEventRequest.recurrence) && + Objects.equals(this.roleIds, updateCalendarEventRequest.roleIds) && + Objects.equals(this.sendCreationNotification, updateCalendarEventRequest.sendCreationNotification) && + Objects.equals(this.startsAt, updateCalendarEventRequest.startsAt) && + Objects.equals(this.tags, updateCalendarEventRequest.tags) && + Objects.equals(this.title, updateCalendarEventRequest.title) && + Objects.equals(this.usesInstanceOverflow, updateCalendarEventRequest.usesInstanceOverflow); + } + + 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(category, closeInstanceAfterEndMinutes, description, endsAt, featured, guestEarlyJoinMinutes, hostEarlyJoinMinutes, imageId, isDraft, languages, parentId, platforms, recurrence, roleIds, sendCreationNotification, startsAt, tags, title, usesInstanceOverflow); + } + + 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 UpdateCalendarEventRequest {\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" closeInstanceAfterEndMinutes: ").append(toIndentedString(closeInstanceAfterEndMinutes)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" endsAt: ").append(toIndentedString(endsAt)).append("\n"); + sb.append(" featured: ").append(toIndentedString(featured)).append("\n"); + sb.append(" guestEarlyJoinMinutes: ").append(toIndentedString(guestEarlyJoinMinutes)).append("\n"); + sb.append(" hostEarlyJoinMinutes: ").append(toIndentedString(hostEarlyJoinMinutes)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" isDraft: ").append(toIndentedString(isDraft)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" platforms: ").append(toIndentedString(platforms)).append("\n"); + sb.append(" recurrence: ").append(toIndentedString(recurrence)).append("\n"); + sb.append(" roleIds: ").append(toIndentedString(roleIds)).append("\n"); + sb.append(" sendCreationNotification: ").append(toIndentedString(sendCreationNotification)).append("\n"); + sb.append(" startsAt: ").append(toIndentedString(startsAt)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" usesInstanceOverflow: ").append(toIndentedString(usesInstanceOverflow)).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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateCalendarEventRequest.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 `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(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(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(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").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(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").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.validateJsonElement(jsonObj.get("recurrence")); + } + // ensure the optional json data is an array if present + 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").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(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 (!UpdateCalendarEventRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCalendarEventRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateCalendarEventRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCalendarEventRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateCalendarEventRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 8ed59d93..726df2e5 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateFavoriteGroupRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateFavoriteGroupRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,114 +13,129 @@ package io.github.vrchatapi.model; import 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; +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; + /** * 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) + @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 static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - + 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 visibility(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) { - this.visibility = visibility; - } - - - public UpdateFavoriteGroupRequest tags(List tags) { - + public UpdateFavoriteGroupRequest tags(@javax.annotation.Nullable List tags) { this.tags = tags; return this; } public UpdateFavoriteGroupRequest addTagsItem(String tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(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(@javax.annotation.Nullable FavoriteGroupVisibility visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get visibility + * @return visibility + */ + @javax.annotation.Nullable + public FavoriteGroupVisibility getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable FavoriteGroupVisibility visibility) { + this.visibility = visibility; + } + + + @Override public boolean equals(Object o) { if (this == o) { @@ -131,13 +146,13 @@ public boolean equals(Object o) { } UpdateFavoriteGroupRequest updateFavoriteGroupRequest = (UpdateFavoriteGroupRequest) o; return Objects.equals(this.displayName, updateFavoriteGroupRequest.displayName) && - Objects.equals(this.visibility, updateFavoriteGroupRequest.visibility) && - Objects.equals(this.tags, updateFavoriteGroupRequest.tags); + Objects.equals(this.tags, updateFavoriteGroupRequest.tags) && + Objects.equals(this.visibility, updateFavoriteGroupRequest.visibility); } @Override public int hashCode() { - return Objects.hash(displayName, visibility, tags); + return Objects.hash(displayName, tags, visibility); } @Override @@ -145,8 +160,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateFavoriteGroupRequest {\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); sb.append("}"); return sb.toString(); } @@ -156,11 +171,102 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("displayName", "tags", "visibility")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateFavoriteGroupRequest.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 `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(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").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")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateFavoriteGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateFavoriteGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateFavoriteGroupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateFavoriteGroupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateFavoriteGroupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..e1b460fa --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupGalleryRequest.java @@ -0,0 +1,422 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * UpdateGroupGalleryRequest + */ +@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) + @javax.annotation.Nullable + private List roleIdsToAutoApprove; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_MANAGE = "roleIdsToManage"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_MANAGE) + @javax.annotation.Nullable + private List roleIdsToManage; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT = "roleIdsToSubmit"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_SUBMIT) + @javax.annotation.Nullable + private List roleIdsToSubmit; + + public static final String SERIALIZED_NAME_ROLE_IDS_TO_VIEW = "roleIdsToView"; + @SerializedName(SERIALIZED_NAME_ROLE_IDS_TO_VIEW) + @javax.annotation.Nullable + private List roleIdsToView; + + public UpdateGroupGalleryRequest() { + } + + public UpdateGroupGalleryRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the gallery. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateGroupGalleryRequest membersOnly(@javax.annotation.Nullable Boolean membersOnly) { + this.membersOnly = membersOnly; + return this; + } + + /** + * Whether the gallery is members only. + * @return membersOnly + */ + @javax.annotation.Nullable + public Boolean getMembersOnly() { + return membersOnly; + } + + public void setMembersOnly(@javax.annotation.Nullable Boolean membersOnly) { + this.membersOnly = membersOnly; + } + + + public UpdateGroupGalleryRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the gallery. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateGroupGalleryRequest roleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { + this.roleIdsToAutoApprove = roleIdsToAutoApprove; + return this; + } + + public UpdateGroupGalleryRequest addRoleIdsToAutoApproveItem(String roleIdsToAutoApproveItem) { + if (this.roleIdsToAutoApprove == null) { + this.roleIdsToAutoApprove = new ArrayList<>(); + } + this.roleIdsToAutoApprove.add(roleIdsToAutoApproveItem); + return this; + } + + /** + * + * @return roleIdsToAutoApprove + */ + @javax.annotation.Nullable + public List getRoleIdsToAutoApprove() { + return roleIdsToAutoApprove; + } + + public void setRoleIdsToAutoApprove(@javax.annotation.Nullable List roleIdsToAutoApprove) { + this.roleIdsToAutoApprove = roleIdsToAutoApprove; + } + + + public UpdateGroupGalleryRequest roleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { + this.roleIdsToManage = roleIdsToManage; + return this; + } + + public UpdateGroupGalleryRequest addRoleIdsToManageItem(String roleIdsToManageItem) { + if (this.roleIdsToManage == null) { + this.roleIdsToManage = new ArrayList<>(); + } + this.roleIdsToManage.add(roleIdsToManageItem); + return this; + } + + /** + * + * @return roleIdsToManage + */ + @javax.annotation.Nullable + public List getRoleIdsToManage() { + return roleIdsToManage; + } + + public void setRoleIdsToManage(@javax.annotation.Nullable List roleIdsToManage) { + this.roleIdsToManage = roleIdsToManage; + } + + + public UpdateGroupGalleryRequest roleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { + this.roleIdsToSubmit = roleIdsToSubmit; + return this; + } + + public UpdateGroupGalleryRequest addRoleIdsToSubmitItem(String roleIdsToSubmitItem) { + if (this.roleIdsToSubmit == null) { + this.roleIdsToSubmit = new ArrayList<>(); + } + this.roleIdsToSubmit.add(roleIdsToSubmitItem); + return this; + } + + /** + * + * @return roleIdsToSubmit + */ + @javax.annotation.Nullable + public List getRoleIdsToSubmit() { + return roleIdsToSubmit; + } + + public void setRoleIdsToSubmit(@javax.annotation.Nullable List roleIdsToSubmit) { + this.roleIdsToSubmit = roleIdsToSubmit; + } + + + public UpdateGroupGalleryRequest roleIdsToView(@javax.annotation.Nullable List roleIdsToView) { + this.roleIdsToView = roleIdsToView; + return this; + } + + public UpdateGroupGalleryRequest addRoleIdsToViewItem(String roleIdsToViewItem) { + if (this.roleIdsToView == null) { + this.roleIdsToView = new ArrayList<>(); + } + this.roleIdsToView.add(roleIdsToViewItem); + return this; + } + + /** + * + * @return roleIdsToView + */ + @javax.annotation.Nullable + public List getRoleIdsToView() { + return roleIdsToView; + } + + public void setRoleIdsToView(@javax.annotation.Nullable List roleIdsToView) { + this.roleIdsToView = roleIdsToView; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateGroupGalleryRequest updateGroupGalleryRequest = (UpdateGroupGalleryRequest) o; + return Objects.equals(this.description, updateGroupGalleryRequest.description) && + Objects.equals(this.membersOnly, updateGroupGalleryRequest.membersOnly) && + Objects.equals(this.name, updateGroupGalleryRequest.name) && + Objects.equals(this.roleIdsToAutoApprove, updateGroupGalleryRequest.roleIdsToAutoApprove) && + Objects.equals(this.roleIdsToManage, updateGroupGalleryRequest.roleIdsToManage) && + Objects.equals(this.roleIdsToSubmit, updateGroupGalleryRequest.roleIdsToSubmit) && + Objects.equals(this.roleIdsToView, updateGroupGalleryRequest.roleIdsToView); + } + + 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(description, membersOnly, name, roleIdsToAutoApprove, roleIdsToManage, roleIdsToSubmit, roleIdsToView); + } + + 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 UpdateGroupGalleryRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" membersOnly: ").append(toIndentedString(membersOnly)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" roleIdsToAutoApprove: ").append(toIndentedString(roleIdsToAutoApprove)).append("\n"); + sb.append(" roleIdsToManage: ").append(toIndentedString(roleIdsToManage)).append("\n"); + sb.append(" roleIdsToSubmit: ").append(toIndentedString(roleIdsToSubmit)).append("\n"); + sb.append(" roleIdsToView: ").append(toIndentedString(roleIdsToView)).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("description", "membersOnly", "name", "roleIdsToAutoApprove", "roleIdsToManage", "roleIdsToSubmit", "roleIdsToView")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateGroupGalleryRequest.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 `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(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(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").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").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").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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateGroupGalleryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateGroupGalleryRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateGroupGalleryRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateGroupGalleryRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateGroupGalleryRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..9626a956 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupMemberRequest.java @@ -0,0 +1,284 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupUserVisibility; +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; + +/** + * UpdateGroupMemberRequest + */ +@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(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { + this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; + return this; + } + + /** + * Get isSubscribedToAnnouncements + * @return isSubscribedToAnnouncements + */ + @javax.annotation.Nullable + public Boolean getIsSubscribedToAnnouncements() { + return isSubscribedToAnnouncements; + } + + public void setIsSubscribedToAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToAnnouncements) { + this.isSubscribedToAnnouncements = isSubscribedToAnnouncements; + } + + + public UpdateGroupMemberRequest isSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { + this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; + return this; + } + + /** + * Get isSubscribedToEventAnnouncements + * @return isSubscribedToEventAnnouncements + */ + @javax.annotation.Nullable + public Boolean getIsSubscribedToEventAnnouncements() { + return isSubscribedToEventAnnouncements; + } + + public void setIsSubscribedToEventAnnouncements(@javax.annotation.Nullable Boolean isSubscribedToEventAnnouncements) { + this.isSubscribedToEventAnnouncements = isSubscribedToEventAnnouncements; + } + + + public UpdateGroupMemberRequest managerNotes(@javax.annotation.Nullable String managerNotes) { + this.managerNotes = managerNotes; + return this; + } + + /** + * Get managerNotes + * @return managerNotes + */ + @javax.annotation.Nullable + public String getManagerNotes() { + return managerNotes; + } + + public void setManagerNotes(@javax.annotation.Nullable String managerNotes) { + this.managerNotes = managerNotes; + } + + + public UpdateGroupMemberRequest visibility(@javax.annotation.Nullable GroupUserVisibility visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get visibility + * @return visibility + */ + @javax.annotation.Nullable + public GroupUserVisibility getVisibility() { + return visibility; + } + + public void setVisibility(@javax.annotation.Nullable GroupUserVisibility visibility) { + this.visibility = visibility; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateGroupMemberRequest updateGroupMemberRequest = (UpdateGroupMemberRequest) o; + return Objects.equals(this.isSubscribedToAnnouncements, updateGroupMemberRequest.isSubscribedToAnnouncements) && + Objects.equals(this.isSubscribedToEventAnnouncements, updateGroupMemberRequest.isSubscribedToEventAnnouncements) && + Objects.equals(this.managerNotes, updateGroupMemberRequest.managerNotes) && + Objects.equals(this.visibility, updateGroupMemberRequest.visibility); + } + + @Override + public int hashCode() { + return Objects.hash(isSubscribedToAnnouncements, isSubscribedToEventAnnouncements, managerNotes, visibility); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateGroupMemberRequest {\n"); + sb.append(" isSubscribedToAnnouncements: ").append(toIndentedString(isSubscribedToAnnouncements)).append("\n"); + sb.append(" isSubscribedToEventAnnouncements: ").append(toIndentedString(isSubscribedToEventAnnouncements)).append("\n"); + sb.append(" managerNotes: ").append(toIndentedString(managerNotes)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).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("isSubscribedToAnnouncements", "isSubscribedToEventAnnouncements", "managerNotes", "visibility")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateGroupMemberRequest.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 `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(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")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateGroupMemberRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateGroupMemberRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateGroupMemberRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateGroupMemberRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateGroupMemberRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..a8930cb5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupRepresentationRequest.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UpdateGroupRepresentationRequest + */ +@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(@javax.annotation.Nonnull Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + return this; + } + + /** + * Whether the user is representing the group. + * @return isRepresenting + */ + @javax.annotation.Nonnull + public Boolean getIsRepresenting() { + return isRepresenting; + } + + public void setIsRepresenting(@javax.annotation.Nonnull Boolean isRepresenting) { + this.isRepresenting = isRepresenting; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateGroupRepresentationRequest updateGroupRepresentationRequest = (UpdateGroupRepresentationRequest) o; + return Objects.equals(this.isRepresenting, updateGroupRepresentationRequest.isRepresenting); + } + + @Override + public int hashCode() { + return Objects.hash(isRepresenting); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateGroupRepresentationRequest {\n"); + sb.append(" isRepresenting: ").append(toIndentedString(isRepresenting)).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("isRepresenting")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("isRepresenting")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateGroupRepresentationRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateGroupRepresentationRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateGroupRepresentationRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateGroupRepresentationRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateGroupRepresentationRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateGroupRepresentationRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..59acd786 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupRequest.java @@ -0,0 +1,505 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupJoinState; +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; + +/** + * UpdateGroupRequest + */ +@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) + @javax.annotation.Nullable + private List languages = new ArrayList<>(); + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + @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) + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + + public UpdateGroupRequest() { + } + + public UpdateGroupRequest bannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + return this; + } + + /** + * Get bannerId + * @return bannerId + */ + @javax.annotation.Nullable + public String getBannerId() { + return bannerId; + } + + public void setBannerId(@javax.annotation.Nullable String bannerId) { + this.bannerId = bannerId; + } + + + public UpdateGroupRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateGroupRequest iconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + return this; + } + + /** + * Get iconId + * @return iconId + */ + @javax.annotation.Nullable + public String getIconId() { + return iconId; + } + + public void setIconId(@javax.annotation.Nullable String iconId) { + this.iconId = iconId; + } + + + public UpdateGroupRequest joinState(@javax.annotation.Nullable GroupJoinState joinState) { + this.joinState = joinState; + return this; + } + + /** + * Get joinState + * @return joinState + */ + @javax.annotation.Nullable + public GroupJoinState getJoinState() { + return joinState; + } + + public void setJoinState(@javax.annotation.Nullable GroupJoinState joinState) { + this.joinState = joinState; + } + + + public UpdateGroupRequest languages(@javax.annotation.Nullable List languages) { + this.languages = languages; + return this; + } + + public UpdateGroupRequest addLanguagesItem(String languagesItem) { + if (this.languages == null) { + this.languages = new ArrayList<>(); + } + this.languages.add(languagesItem); + return this; + } + + /** + * 3 letter language code + * @return languages + */ + @javax.annotation.Nullable + public List getLanguages() { + return languages; + } + + public void setLanguages(@javax.annotation.Nullable List languages) { + this.languages = languages; + } + + + public UpdateGroupRequest links(@javax.annotation.Nullable List links) { + this.links = links; + return this; + } + + public UpdateGroupRequest addLinksItem(String linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + */ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(@javax.annotation.Nullable List links) { + this.links = links; + } + + + public UpdateGroupRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateGroupRequest rules(@javax.annotation.Nullable String rules) { + this.rules = rules; + return this; + } + + /** + * Get rules + * @return rules + */ + @javax.annotation.Nullable + public String getRules() { + return rules; + } + + public void setRules(@javax.annotation.Nullable String rules) { + this.rules = rules; + } + + + public UpdateGroupRequest shortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + return this; + } + + /** + * Get shortCode + * @return shortCode + */ + @javax.annotation.Nullable + public String getShortCode() { + return shortCode; + } + + public void setShortCode(@javax.annotation.Nullable String shortCode) { + this.shortCode = shortCode; + } + + + public UpdateGroupRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public UpdateGroupRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateGroupRequest updateGroupRequest = (UpdateGroupRequest) o; + return Objects.equals(this.bannerId, updateGroupRequest.bannerId) && + Objects.equals(this.description, updateGroupRequest.description) && + Objects.equals(this.iconId, updateGroupRequest.iconId) && + Objects.equals(this.joinState, updateGroupRequest.joinState) && + Objects.equals(this.languages, updateGroupRequest.languages) && + Objects.equals(this.links, updateGroupRequest.links) && + Objects.equals(this.name, updateGroupRequest.name) && + Objects.equals(this.rules, updateGroupRequest.rules) && + Objects.equals(this.shortCode, updateGroupRequest.shortCode) && + Objects.equals(this.tags, updateGroupRequest.tags); + } + + 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(bannerId, description, iconId, joinState, languages, links, name, rules, shortCode, tags); + } + + 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 UpdateGroupRequest {\n"); + sb.append(" bannerId: ").append(toIndentedString(bannerId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" iconId: ").append(toIndentedString(iconId)).append("\n"); + sb.append(" joinState: ").append(toIndentedString(joinState)).append("\n"); + sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" shortCode: ").append(toIndentedString(shortCode)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).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("bannerId", "description", "iconId", "joinState", "languages", "links", "name", "rules", "shortCode", "tags")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateGroupRequest.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 `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(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(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(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").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").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(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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateGroupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateGroupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateGroupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateGroupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateGroupRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..c9234f15 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateGroupRoleRequest.java @@ -0,0 +1,323 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.GroupPermissions; +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; + +/** + * UpdateGroupRoleRequest + */ +@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) + @javax.annotation.Nullable + private List permissions = new ArrayList<>(); + + public UpdateGroupRoleRequest() { + } + + public UpdateGroupRoleRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateGroupRoleRequest isSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { + this.isSelfAssignable = isSelfAssignable; + return this; + } + + /** + * Get isSelfAssignable + * @return isSelfAssignable + */ + @javax.annotation.Nullable + public Boolean getIsSelfAssignable() { + return isSelfAssignable; + } + + public void setIsSelfAssignable(@javax.annotation.Nullable Boolean isSelfAssignable) { + this.isSelfAssignable = isSelfAssignable; + } + + + public UpdateGroupRoleRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public UpdateGroupRoleRequest order(@javax.annotation.Nullable Integer order) { + this.order = order; + return this; + } + + /** + * Get order + * @return order + */ + @javax.annotation.Nullable + public Integer getOrder() { + return order; + } + + public void setOrder(@javax.annotation.Nullable Integer order) { + this.order = order; + } + + + public UpdateGroupRoleRequest permissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + return this; + } + + public UpdateGroupRoleRequest addPermissionsItem(GroupPermissions permissionsItem) { + if (this.permissions == null) { + this.permissions = new ArrayList<>(); + } + this.permissions.add(permissionsItem); + return this; + } + + /** + * Get permissions + * @return permissions + */ + @javax.annotation.Nullable + public List getPermissions() { + return permissions; + } + + public void setPermissions(@javax.annotation.Nullable List permissions) { + this.permissions = permissions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateGroupRoleRequest updateGroupRoleRequest = (UpdateGroupRoleRequest) o; + return Objects.equals(this.description, updateGroupRoleRequest.description) && + Objects.equals(this.isSelfAssignable, updateGroupRoleRequest.isSelfAssignable) && + Objects.equals(this.name, updateGroupRoleRequest.name) && + Objects.equals(this.order, updateGroupRoleRequest.order) && + Objects.equals(this.permissions, updateGroupRoleRequest.permissions); + } + + @Override + public int hashCode() { + return Objects.hash(description, isSelfAssignable, name, order, permissions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateGroupRoleRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" isSelfAssignable: ").append(toIndentedString(isSelfAssignable)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).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("description", "isSelfAssignable", "name", "order", "permissions")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateGroupRoleRequest.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 `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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateGroupRoleRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateGroupRoleRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateGroupRoleRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateGroupRoleRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateGroupRoleRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..95c54561 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateInventoryItemRequest.java @@ -0,0 +1,255 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.InventoryUserAttributes; +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; + +/** + * UpdateInventoryItemRequest + */ +@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(@javax.annotation.Nullable Boolean isArchived) { + this.isArchived = isArchived; + return this; + } + + /** + * Get isArchived + * @return isArchived + */ + @javax.annotation.Nullable + public Boolean getIsArchived() { + return isArchived; + } + + public void setIsArchived(@javax.annotation.Nullable Boolean isArchived) { + this.isArchived = isArchived; + } + + + public UpdateInventoryItemRequest isSeen(@javax.annotation.Nullable Boolean isSeen) { + this.isSeen = isSeen; + return this; + } + + /** + * Get isSeen + * @return isSeen + */ + @javax.annotation.Nullable + public Boolean getIsSeen() { + return isSeen; + } + + public void setIsSeen(@javax.annotation.Nullable Boolean isSeen) { + this.isSeen = isSeen; + } + + + public UpdateInventoryItemRequest userAttributes(@javax.annotation.Nullable InventoryUserAttributes userAttributes) { + this.userAttributes = userAttributes; + return this; + } + + /** + * Get userAttributes + * @return userAttributes + */ + @javax.annotation.Nullable + public InventoryUserAttributes getUserAttributes() { + return userAttributes; + } + + public void setUserAttributes(@javax.annotation.Nullable InventoryUserAttributes userAttributes) { + this.userAttributes = userAttributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateInventoryItemRequest updateInventoryItemRequest = (UpdateInventoryItemRequest) o; + return Objects.equals(this.isArchived, updateInventoryItemRequest.isArchived) && + Objects.equals(this.isSeen, updateInventoryItemRequest.isSeen) && + Objects.equals(this.userAttributes, updateInventoryItemRequest.userAttributes); + } + + @Override + public int hashCode() { + return Objects.hash(isArchived, isSeen, userAttributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateInventoryItemRequest {\n"); + sb.append(" isArchived: ").append(toIndentedString(isArchived)).append("\n"); + sb.append(" isSeen: ").append(toIndentedString(isSeen)).append("\n"); + sb.append(" userAttributes: ").append(toIndentedString(userAttributes)).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("isArchived", "isSeen", "userAttributes")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateInventoryItemRequest.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 `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.validateJsonElement(jsonObj.get("userAttributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateInventoryItemRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateInventoryItemRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateInventoryItemRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateInventoryItemRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateInventoryItemRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 f522c844..5e9fd3dd 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateInviteMessageRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateInviteMessageRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,49 +13,70 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -87,11 +108,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("message")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("message")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateInviteMessageRequest.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 `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 (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(java.util.Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateInviteMessageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateInviteMessageRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateInviteMessageRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateInviteMessageRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateInviteMessageRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..de3d1d07 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateListingRequest.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UpdateListingRequest + */ +@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(@javax.annotation.Nonnull Boolean active) { + this.active = active; + return this; + } + + /** + * Get active + * @return active + */ + @javax.annotation.Nonnull + public Boolean getActive() { + return active; + } + + public void setActive(@javax.annotation.Nonnull Boolean active) { + this.active = active; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateListingRequest updateListingRequest = (UpdateListingRequest) o; + return Objects.equals(this.active, updateListingRequest.active); + } + + @Override + public int hashCode() { + return Objects.hash(active); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateListingRequest {\n"); + sb.append(" active: ").append(toIndentedString(active)).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("active")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("active")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateListingRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateListingRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateListingRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateListingRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateListingRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateListingRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..74990d68 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateProductRequest.java @@ -0,0 +1,325 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * UpdateProductRequest + */ +@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) + @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(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdateProductRequest 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 UpdateProductRequest imageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + return this; + } + + /** + * Get imageId + * @return imageId + */ + @javax.annotation.Nullable + public String getImageId() { + return imageId; + } + + public void setImageId(@javax.annotation.Nullable String imageId) { + this.imageId = imageId; + } + + + public UpdateProductRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public UpdateProductRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public UpdateProductRequest useForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { + this.useForSubscriberList = useForSubscriberList; + return this; + } + + /** + * Get useForSubscriberList + * @return useForSubscriberList + */ + @javax.annotation.Nullable + public Boolean getUseForSubscriberList() { + return useForSubscriberList; + } + + public void setUseForSubscriberList(@javax.annotation.Nullable Boolean useForSubscriberList) { + this.useForSubscriberList = useForSubscriberList; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateProductRequest updateProductRequest = (UpdateProductRequest) o; + return Objects.equals(this.description, updateProductRequest.description) && + Objects.equals(this.displayName, updateProductRequest.displayName) && + Objects.equals(this.imageId, updateProductRequest.imageId) && + Objects.equals(this.tags, updateProductRequest.tags) && + Objects.equals(this.useForSubscriberList, updateProductRequest.useForSubscriberList); + } + + @Override + public int hashCode() { + return Objects.hash(description, displayName, imageId, tags, useForSubscriberList); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateProductRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" imageId: ").append(toIndentedString(imageId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" useForSubscriberList: ").append(toIndentedString(useForSubscriberList)).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("description", "displayName", "imageId", "tags", "useForSubscriberList")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateProductRequest.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 `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(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(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(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").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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateProductRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateProductRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateProductRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateProductRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateProductRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..44e2bd4d --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdatePropRequest.java @@ -0,0 +1,495 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * UpdatePropRequest + */ +@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) + @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(@javax.annotation.Nullable String assetUrl) { + this.assetUrl = assetUrl; + return this; + } + + /** + * Get assetUrl + * @return assetUrl + */ + @javax.annotation.Nullable + public String getAssetUrl() { + return assetUrl; + } + + public void setAssetUrl(@javax.annotation.Nullable String assetUrl) { + this.assetUrl = assetUrl; + } + + + public UpdatePropRequest assetVersion(@javax.annotation.Nullable Integer assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get assetVersion + * @return assetVersion + */ + @javax.annotation.Nullable + public Integer getAssetVersion() { + return assetVersion; + } + + public void setAssetVersion(@javax.annotation.Nullable Integer assetVersion) { + this.assetVersion = assetVersion; + } + + + public UpdatePropRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public UpdatePropRequest imageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** + * Get imageUrl + * @return imageUrl + */ + @javax.annotation.Nullable + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(@javax.annotation.Nullable String imageUrl) { + this.imageUrl = imageUrl; + } + + + public UpdatePropRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + + public 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 + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nullable String platform) { + this.platform = platform; + } + + + public UpdatePropRequest propSignature(@javax.annotation.Nullable String propSignature) { + this.propSignature = propSignature; + return this; + } + + /** + * Get propSignature + * @return propSignature + */ + @javax.annotation.Nullable + public String getPropSignature() { + return propSignature; + } + + public void setPropSignature(@javax.annotation.Nullable String propSignature) { + this.propSignature = propSignature; + } + + + 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 + public Integer getSpawnType() { + return spawnType; + } + + public void setSpawnType(@javax.annotation.Nullable Integer spawnType) { + this.spawnType = spawnType; + } + + + public UpdatePropRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public UpdatePropRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + + + public UpdatePropRequest unityVersion(@javax.annotation.Nullable String unityVersion) { + this.unityVersion = unityVersion; + return this; + } + + /** + * Get unityVersion + * @return unityVersion + */ + @javax.annotation.Nullable + public String getUnityVersion() { + return unityVersion; + } + + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { + this.unityVersion = unityVersion; + } + + + 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 + public Integer getWorldPlacementMask() { + return worldPlacementMask; + } + + public void setWorldPlacementMask(@javax.annotation.Nullable Integer worldPlacementMask) { + this.worldPlacementMask = worldPlacementMask; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePropRequest updatePropRequest = (UpdatePropRequest) o; + return Objects.equals(this.assetUrl, updatePropRequest.assetUrl) && + Objects.equals(this.assetVersion, updatePropRequest.assetVersion) && + Objects.equals(this.description, updatePropRequest.description) && + Objects.equals(this.imageUrl, updatePropRequest.imageUrl) && + Objects.equals(this.name, updatePropRequest.name) && + Objects.equals(this.platform, updatePropRequest.platform) && + Objects.equals(this.propSignature, updatePropRequest.propSignature) && + Objects.equals(this.spawnType, updatePropRequest.spawnType) && + Objects.equals(this.tags, updatePropRequest.tags) && + Objects.equals(this.unityVersion, updatePropRequest.unityVersion) && + Objects.equals(this.worldPlacementMask, updatePropRequest.worldPlacementMask); + } + + @Override + public int hashCode() { + return Objects.hash(assetUrl, assetVersion, description, imageUrl, name, platform, propSignature, spawnType, tags, unityVersion, worldPlacementMask); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdatePropRequest {\n"); + sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); + sb.append(" assetVersion: ").append(toIndentedString(assetVersion)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" propSignature: ").append(toIndentedString(propSignature)).append("\n"); + sb.append(" spawnType: ").append(toIndentedString(spawnType)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" unityVersion: ").append(toIndentedString(unityVersion)).append("\n"); + sb.append(" worldPlacementMask: ").append(toIndentedString(worldPlacementMask)).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("assetUrl", "assetVersion", "description", "imageUrl", "name", "platform", "propSignature", "spawnType", "tags", "unityVersion", "worldPlacementMask")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdatePropRequest.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 `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(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(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(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(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(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(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").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(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdatePropRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdatePropRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdatePropRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdatePropRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdatePropRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..b61a8458 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateTiliaTOSRequest.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UpdateTiliaTOSRequest + */ +@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(@javax.annotation.Nonnull Boolean accepted) { + this.accepted = accepted; + return this; + } + + /** + * Get accepted + * @return accepted + */ + @javax.annotation.Nonnull + public Boolean getAccepted() { + return accepted; + } + + public void setAccepted(@javax.annotation.Nonnull Boolean accepted) { + this.accepted = accepted; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTiliaTOSRequest updateTiliaTOSRequest = (UpdateTiliaTOSRequest) o; + return Objects.equals(this.accepted, updateTiliaTOSRequest.accepted); + } + + @Override + public int hashCode() { + return Objects.hash(accepted); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTiliaTOSRequest {\n"); + sb.append(" accepted: ").append(toIndentedString(accepted)).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("accepted")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("accepted")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateTiliaTOSRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateTiliaTOSRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateTiliaTOSRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateTiliaTOSRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateTiliaTOSRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateTiliaTOSRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..70d3e1b7 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateUserBadgeRequest.java @@ -0,0 +1,224 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UpdateUserBadgeRequest + */ +@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(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + return this; + } + + /** + * Get hidden + * @return hidden + */ + @javax.annotation.Nullable + public Boolean getHidden() { + return hidden; + } + + public void setHidden(@javax.annotation.Nullable Boolean hidden) { + this.hidden = hidden; + } + + + public UpdateUserBadgeRequest showcased(@javax.annotation.Nullable Boolean showcased) { + this.showcased = showcased; + return this; + } + + /** + * Get showcased + * @return showcased + */ + @javax.annotation.Nullable + public Boolean getShowcased() { + return showcased; + } + + public void setShowcased(@javax.annotation.Nullable Boolean showcased) { + this.showcased = showcased; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUserBadgeRequest updateUserBadgeRequest = (UpdateUserBadgeRequest) o; + return Objects.equals(this.hidden, updateUserBadgeRequest.hidden) && + Objects.equals(this.showcased, updateUserBadgeRequest.showcased); + } + + @Override + public int hashCode() { + return Objects.hash(hidden, showcased); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUserBadgeRequest {\n"); + sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); + sb.append(" showcased: ").append(toIndentedString(showcased)).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("hidden", "showcased")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateUserBadgeRequest.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 `UpdateUserBadgeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateUserBadgeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateUserBadgeRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateUserBadgeRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateUserBadgeRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateUserBadgeRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..07472aa5 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UpdateUserNoteRequest.java @@ -0,0 +1,237 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UpdateUserNoteRequest + */ +@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(@javax.annotation.Nonnull String note) { + this.note = note; + return this; + } + + /** + * Get note + * @return note + */ + @javax.annotation.Nonnull + public String getNote() { + return note; + } + + public void setNote(@javax.annotation.Nonnull String note) { + this.note = note; + } + + + 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 + public String getTargetUserId() { + return targetUserId; + } + + public void setTargetUserId(@javax.annotation.Nonnull String targetUserId) { + this.targetUserId = targetUserId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUserNoteRequest updateUserNoteRequest = (UpdateUserNoteRequest) o; + return Objects.equals(this.note, updateUserNoteRequest.note) && + Objects.equals(this.targetUserId, updateUserNoteRequest.targetUserId); + } + + @Override + public int hashCode() { + return Objects.hash(note, targetUserId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUserNoteRequest {\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" targetUserId: ").append(toIndentedString(targetUserId)).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("note", "targetUserId")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateUserNoteRequest.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 `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 (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(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(java.util.Locale.ROOT, "Expected the field `targetUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("targetUserId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateUserNoteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateUserNoteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateUserNoteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateUserNoteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateUserNoteRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 d13558fe..71fcfb7b 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateUserRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateUserRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,286 +13,531 @@ package io.github.vrchatapi.model; import 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.github.vrchatapi.model.UserStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.math.BigDecimal; +import java.time.LocalDate; 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 org.threeten.bp.LocalDate; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; /** * 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_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + 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) + @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_ACCEPTED_T_O_S_VERSION = "acceptedTOSVersion"; - @SerializedName(SERIALIZED_NAME_ACCEPTED_T_O_S_VERSION) - private BigDecimal acceptedTOSVersion; + public static final String SERIALIZED_NAME_CONTENT_FILTERS = "contentFilters"; + @SerializedName(SERIALIZED_NAME_CONTENT_FILTERS) + @javax.annotation.Nullable + private List contentFilters = new ArrayList<>(); - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; + 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_BIO = "bio"; - @SerializedName(SERIALIZED_NAME_BIO) - private String bio; + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags = new ArrayList<>(); - public static final String SERIALIZED_NAME_BIO_LINKS = "bioLinks"; - @SerializedName(SERIALIZED_NAME_BIO_LINKS) - private List bioLinks = null; + 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 email(String email) { - - this.email = email; + public UpdateUserRequest acceptedTOSVersion(@javax.annotation.Nullable Integer acceptedTOSVersion) { + this.acceptedTOSVersion = acceptedTOSVersion; return this; } - /** - * Get email - * @return email - **/ + /** + * Get acceptedTOSVersion + * @return acceptedTOSVersion + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + public Integer getAcceptedTOSVersion() { + return acceptedTOSVersion; + } - public String getEmail() { - return email; + public void setAcceptedTOSVersion(@javax.annotation.Nullable Integer acceptedTOSVersion) { + this.acceptedTOSVersion = acceptedTOSVersion; } - public void setEmail(String email) { - this.email = email; + public UpdateUserRequest 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 UpdateUserRequest bioLinks(@javax.annotation.Nullable List bioLinks) { + this.bioLinks = bioLinks; + return this; + } - public UpdateUserRequest birthday(LocalDate birthday) { - + public UpdateUserRequest 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 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 acceptedTOSVersion(BigDecimal acceptedTOSVersion) { - - this.acceptedTOSVersion = acceptedTOSVersion; + public UpdateUserRequest contentFilters(@javax.annotation.Nullable List contentFilters) { + this.contentFilters = contentFilters; return this; } - /** - * Get acceptedTOSVersion - * @return acceptedTOSVersion - **/ + public UpdateUserRequest addContentFiltersItem(ContentFilter contentFiltersItem) { + if (this.contentFilters == null) { + this.contentFilters = new ArrayList<>(); + } + this.contentFilters.add(contentFiltersItem); + return this; + } + + /** + * These tags begin with `content_` and control content gating + * @return contentFilters + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + public List getContentFilters() { + return contentFilters; + } - public BigDecimal getAcceptedTOSVersion() { - return acceptedTOSVersion; + public void setContentFilters(@javax.annotation.Nullable List contentFilters) { + this.contentFilters = contentFilters; } - public void setAcceptedTOSVersion(BigDecimal acceptedTOSVersion) { - this.acceptedTOSVersion = acceptedTOSVersion; + public UpdateUserRequest currentPassword(@javax.annotation.Nullable String currentPassword) { + this.currentPassword = currentPassword; + return this; } + /** + * Get currentPassword + * @return currentPassword + */ + @javax.annotation.Nullable + public String getCurrentPassword() { + return currentPassword; + } - public UpdateUserRequest tags(List tags) { - - this.tags = tags; + public void setCurrentPassword(@javax.annotation.Nullable String currentPassword) { + this.currentPassword = currentPassword; + } + + + public UpdateUserRequest displayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; return this; } - public UpdateUserRequest addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList(); - } - this.tags.add(tagsItem); + /** + * MUST specify currentPassword as well to change display name + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(@javax.annotation.Nullable String displayName) { + this.displayName = displayName; + } + + + public UpdateUserRequest email(@javax.annotation.Nullable String email) { + this.email = email; return this; } - /** - * Get tags - * @return tags - **/ + /** + * Get email + * @return email + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + public String getEmail() { + return email; + } - public List getTags() { - return tags; + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; } - public void setTags(List tags) { - this.tags = tags; + 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 UpdateUserRequest status(UserStatus status) { - - this.status = status; + public void setHasDiscordFriendsOptOut(@javax.annotation.Nullable Boolean hasDiscordFriendsOptOut) { + this.hasDiscordFriendsOptOut = hasDiscordFriendsOptOut; + } + + + public UpdateUserRequest hasSharedConnectionsOptOut(@javax.annotation.Nullable Boolean hasSharedConnectionsOptOut) { + this.hasSharedConnectionsOptOut = hasSharedConnectionsOptOut; return this; } - /** - * Get status - * @return status - **/ + /** + * Opt out of the Mutuals feature + * @return hasSharedConnectionsOptOut + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + public Boolean getHasSharedConnectionsOptOut() { + return hasSharedConnectionsOptOut; + } - public UserStatus getStatus() { - return status; + public void setHasSharedConnectionsOptOut(@javax.annotation.Nullable Boolean hasSharedConnectionsOptOut) { + this.hasSharedConnectionsOptOut = hasSharedConnectionsOptOut; } - public void setStatus(UserStatus status) { - this.status = status; + public UpdateUserRequest isBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { + this.isBoopingEnabled = isBoopingEnabled; + return this; } + /** + * Get isBoopingEnabled + * @return isBoopingEnabled + */ + @javax.annotation.Nullable + public Boolean getIsBoopingEnabled() { + return isBoopingEnabled; + } - public UpdateUserRequest statusDescription(String statusDescription) { - - this.statusDescription = statusDescription; + public void setIsBoopingEnabled(@javax.annotation.Nullable Boolean isBoopingEnabled) { + this.isBoopingEnabled = isBoopingEnabled; + } + + + public UpdateUserRequest password(@javax.annotation.Nullable String password) { + this.password = password; return this; } - /** - * Get statusDescription - * @return statusDescription - **/ + /** + * MUST specify currentPassword as well to change password + * @return password + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + public String getPassword() { + return password; + } - public String getStatusDescription() { - return statusDescription; + public void setPassword(@javax.annotation.Nullable String password) { + this.password = password; } - public void setStatusDescription(String statusDescription) { - this.statusDescription = statusDescription; + public UpdateUserRequest pronouns(@javax.annotation.Nullable String pronouns) { + this.pronouns = pronouns; + return this; } + /** + * Get pronouns + * @return pronouns + */ + @javax.annotation.Nullable + public String getPronouns() { + return pronouns; + } - public UpdateUserRequest bio(String bio) { - - this.bio = bio; + public void setPronouns(@javax.annotation.Nullable String pronouns) { + this.pronouns = pronouns; + } + + + public UpdateUserRequest revertDisplayName(@javax.annotation.Nullable Boolean revertDisplayName) { + this.revertDisplayName = revertDisplayName; return this; } - /** - * Get bio - * @return bio - **/ + /** + * MUST specify currentPassword as well to revert display name + * @return revertDisplayName + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + public Boolean getRevertDisplayName() { + return revertDisplayName; + } - public String getBio() { - return bio; + public void setRevertDisplayName(@javax.annotation.Nullable Boolean revertDisplayName) { + this.revertDisplayName = revertDisplayName; } - public void setBio(String bio) { - this.bio = bio; + public UpdateUserRequest status(@javax.annotation.Nullable UserStatus status) { + this.status = status; + return this; } + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public UserStatus getStatus() { + return status; + } - public UpdateUserRequest bioLinks(List bioLinks) { - - this.bioLinks = bioLinks; + public void setStatus(@javax.annotation.Nullable UserStatus status) { + this.status = status; + } + + + public UpdateUserRequest statusDescription(@javax.annotation.Nullable String statusDescription) { + this.statusDescription = statusDescription; return this; } - public UpdateUserRequest addBioLinksItem(String bioLinksItem) { - if (this.bioLinks == null) { - this.bioLinks = new ArrayList(); + /** + * Get statusDescription + * @return statusDescription + */ + @javax.annotation.Nullable + public String getStatusDescription() { + return statusDescription; + } + + public void setStatusDescription(@javax.annotation.Nullable String statusDescription) { + this.statusDescription = statusDescription; + } + + + public UpdateUserRequest tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public UpdateUserRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); } - this.bioLinks.add(bioLinksItem); + this.tags.add(tagsItem); return this; } - /** - * Get bioLinks - * @return bioLinks - **/ + /** + * + * @return tags + */ @javax.annotation.Nullable - @ApiModelProperty(value = "") + public List getTags() { + return tags; + } - public List getBioLinks() { - return bioLinks; + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; } - public void setBioLinks(List bioLinks) { - this.bioLinks = bioLinks; + public UpdateUserRequest unsubscribe(@javax.annotation.Nullable Boolean unsubscribe) { + this.unsubscribe = unsubscribe; + return this; + } + + /** + * Get unsubscribe + * @return unsubscribe + */ + @javax.annotation.Nullable + public Boolean getUnsubscribe() { + return 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -302,34 +547,54 @@ public boolean equals(Object o) { return false; } UpdateUserRequest updateUserRequest = (UpdateUserRequest) o; - return Objects.equals(this.email, updateUserRequest.email) && + return Objects.equals(this.acceptedTOSVersion, updateUserRequest.acceptedTOSVersion) && + Objects.equals(this.bio, updateUserRequest.bio) && + Objects.equals(this.bioLinks, updateUserRequest.bioLinks) && Objects.equals(this.birthday, updateUserRequest.birthday) && - Objects.equals(this.acceptedTOSVersion, updateUserRequest.acceptedTOSVersion) && - Objects.equals(this.tags, updateUserRequest.tags) && + Objects.equals(this.contentFilters, updateUserRequest.contentFilters) && + 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) && + Objects.equals(this.pronouns, updateUserRequest.pronouns) && + Objects.equals(this.revertDisplayName, updateUserRequest.revertDisplayName) && Objects.equals(this.status, updateUserRequest.status) && Objects.equals(this.statusDescription, updateUserRequest.statusDescription) && - Objects.equals(this.bio, updateUserRequest.bio) && - Objects.equals(this.bioLinks, updateUserRequest.bioLinks) && + Objects.equals(this.tags, updateUserRequest.tags) && + Objects.equals(this.unsubscribe, updateUserRequest.unsubscribe) && Objects.equals(this.userIcon, updateUserRequest.userIcon); } @Override public int hashCode() { - return Objects.hash(email, birthday, acceptedTOSVersion, tags, status, statusDescription, bio, bioLinks, userIcon); + return Objects.hash(acceptedTOSVersion, bio, bioLinks, birthday, contentFilters, currentPassword, displayName, email, hasDiscordFriendsOptOut, hasSharedConnectionsOptOut, isBoopingEnabled, password, pronouns, revertDisplayName, status, statusDescription, tags, unsubscribe, userIcon); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdateUserRequest {\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); sb.append(" acceptedTOSVersion: ").append(toIndentedString(acceptedTOSVersion)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); sb.append(" bio: ").append(toIndentedString(bio)).append("\n"); sb.append(" bioLinks: ").append(toIndentedString(bioLinks)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" contentFilters: ").append(toIndentedString(contentFilters)).append("\n"); + 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"); + sb.append(" pronouns: ").append(toIndentedString(pronouns)).append("\n"); + sb.append(" revertDisplayName: ").append(toIndentedString(revertDisplayName)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" unsubscribe: ").append(toIndentedString(unsubscribe)).append("\n"); sb.append(" userIcon: ").append(toIndentedString(userIcon)).append("\n"); sb.append("}"); return sb.toString(); @@ -340,11 +605,131 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateUserRequest.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 `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(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())); + } + // ensure the optional json data is an array if present + 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(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(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(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(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(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(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").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(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateUserRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateUserRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateUserRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateUserRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateUserRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 d1f15899..35ad8f02 100644 --- a/src/main/java/io/github/vrchatapi/model/UpdateWorldRequest.java +++ b/src/main/java/io/github/vrchatapi/model/UpdateWorldRequest.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,386 +13,371 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. + /** + * 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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; } public UpdateWorldRequest addTagsItem(String tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(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 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 = "2018.4.20f1", value = "") - public String getUnityVersion() { return unityVersion; } - - public void setUnityVersion(String unityVersion) { + public void setUnityVersion(@javax.annotation.Nullable String unityVersion) { this.unityVersion = unityVersion; } + @Override public boolean equals(Object o) { if (this == o) { @@ -448,11 +433,129 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateWorldRequest.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 `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(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(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(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(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(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(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(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(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").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(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(java.util.Locale.ROOT, "Expected the field `unityVersion` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unityVersion").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateWorldRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateWorldRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateWorldRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateWorldRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateWorldRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..f7e9485f --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UploadGalleryImageRequest.java @@ -0,0 +1,206 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.File; +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; + +/** + * UploadGalleryImageRequest + */ +@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(@javax.annotation.Nonnull File _file) { + this._file = _file; + return this; + } + + /** + * The binary blob of the png file. + * @return _file + */ + @javax.annotation.Nonnull + public File getFile() { + return _file; + } + + public void setFile(@javax.annotation.Nonnull File _file) { + this._file = _file; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadGalleryImageRequest uploadGalleryImageRequest = (UploadGalleryImageRequest) o; + return Objects.equals(this._file, uploadGalleryImageRequest._file); + } + + @Override + public int hashCode() { + return Objects.hash(_file); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadGalleryImageRequest {\n"); + sb.append(" _file: ").append(toIndentedString(_file)).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("file")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("file")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UploadGalleryImageRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UploadGalleryImageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UploadGalleryImageRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UploadGalleryImageRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UploadGalleryImageRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UploadGalleryImageRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..464bd821 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UploadImageRequest.java @@ -0,0 +1,384 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.ImageAnimationStyle; +import io.github.vrchatapi.model.ImageLoopStyle; +import io.github.vrchatapi.model.ImageMask; +import io.github.vrchatapi.model.ImagePurpose; +import java.io.File; +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; + +/** + * UploadImageRequest + */ +@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(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { + this.animationStyle = animationStyle; + return this; + } + + /** + * Get animationStyle + * @return animationStyle + */ + @javax.annotation.Nullable + public ImageAnimationStyle getAnimationStyle() { + return animationStyle; + } + + public void setAnimationStyle(@javax.annotation.Nullable ImageAnimationStyle animationStyle) { + this.animationStyle = animationStyle; + } + + + 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 + public File getFile() { + return _file; + } + + public void setFile(@javax.annotation.Nonnull File _file) { + this._file = _file; + } + + + 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 + public Integer getFrames() { + return frames; + } + + public void setFrames(@javax.annotation.Nullable Integer frames) { + this.frames = frames; + } + + + 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 + public Integer getFramesOverTime() { + return framesOverTime; + } + + public void setFramesOverTime(@javax.annotation.Nullable Integer framesOverTime) { + this.framesOverTime = framesOverTime; + } + + + public UploadImageRequest loopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { + this.loopStyle = loopStyle; + return this; + } + + /** + * Get loopStyle + * @return loopStyle + */ + @javax.annotation.Nullable + public ImageLoopStyle getLoopStyle() { + return loopStyle; + } + + public void setLoopStyle(@javax.annotation.Nullable ImageLoopStyle loopStyle) { + this.loopStyle = loopStyle; + } + + + public UploadImageRequest maskTag(@javax.annotation.Nullable ImageMask maskTag) { + this.maskTag = maskTag; + return this; + } + + /** + * Get maskTag + * @return maskTag + */ + @javax.annotation.Nullable + public ImageMask getMaskTag() { + return maskTag; + } + + public void setMaskTag(@javax.annotation.Nullable ImageMask maskTag) { + this.maskTag = maskTag; + } + + + public UploadImageRequest tag(@javax.annotation.Nonnull ImagePurpose tag) { + this.tag = tag; + return this; + } + + /** + * Get tag + * @return tag + */ + @javax.annotation.Nonnull + public ImagePurpose getTag() { + return tag; + } + + public void setTag(@javax.annotation.Nonnull ImagePurpose tag) { + this.tag = tag; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadImageRequest uploadImageRequest = (UploadImageRequest) o; + return Objects.equals(this.animationStyle, uploadImageRequest.animationStyle) && + Objects.equals(this._file, uploadImageRequest._file) && + Objects.equals(this.frames, uploadImageRequest.frames) && + Objects.equals(this.framesOverTime, uploadImageRequest.framesOverTime) && + Objects.equals(this.loopStyle, uploadImageRequest.loopStyle) && + Objects.equals(this.maskTag, uploadImageRequest.maskTag) && + Objects.equals(this.tag, uploadImageRequest.tag); + } + + @Override + public int hashCode() { + return Objects.hash(animationStyle, _file, frames, framesOverTime, loopStyle, maskTag, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadImageRequest {\n"); + sb.append(" animationStyle: ").append(toIndentedString(animationStyle)).append("\n"); + sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); + sb.append(" frames: ").append(toIndentedString(frames)).append("\n"); + sb.append(" framesOverTime: ").append(toIndentedString(framesOverTime)).append("\n"); + sb.append(" loopStyle: ").append(toIndentedString(loopStyle)).append("\n"); + sb.append(" maskTag: ").append(toIndentedString(maskTag)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).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("animationStyle", "file", "frames", "framesOverTime", "loopStyle", "maskTag", "tag")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("file", "tag")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UploadImageRequest.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UploadImageRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UploadImageRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UploadImageRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UploadImageRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UploadImageRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..252c9f73 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UploadPrintRequest.java @@ -0,0 +1,320 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.File; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * UploadPrintRequest + */ +@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(@javax.annotation.Nonnull File image) { + this.image = image; + return this; + } + + /** + * The binary blob of the png file. + * @return image + */ + @javax.annotation.Nonnull + public File getImage() { + return image; + } + + public void setImage(@javax.annotation.Nonnull File image) { + this.image = image; + } + + + public UploadPrintRequest note(@javax.annotation.Nullable String note) { + this.note = note; + return this; + } + + /** + * The caption for the image. + * @return note + */ + @javax.annotation.Nullable + public String getNote() { + return note; + } + + public void setNote(@javax.annotation.Nullable String note) { + this.note = note; + } + + + public UploadPrintRequest timestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * The time the image was captured. + * @return timestamp + */ + @javax.annotation.Nonnull + public OffsetDateTime getTimestamp() { + return timestamp; + } + + public void setTimestamp(@javax.annotation.Nonnull OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + + 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 + public String getWorldId() { + return worldId; + } + + public void setWorldId(@javax.annotation.Nullable String worldId) { + this.worldId = worldId; + } + + + 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 + public String getWorldName() { + return worldName; + } + + public void setWorldName(@javax.annotation.Nullable String worldName) { + this.worldName = worldName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadPrintRequest uploadPrintRequest = (UploadPrintRequest) o; + return Objects.equals(this.image, uploadPrintRequest.image) && + Objects.equals(this.note, uploadPrintRequest.note) && + Objects.equals(this.timestamp, uploadPrintRequest.timestamp) && + Objects.equals(this.worldId, uploadPrintRequest.worldId) && + Objects.equals(this.worldName, uploadPrintRequest.worldName); + } + + @Override + public int hashCode() { + return Objects.hash(image, note, timestamp, worldId, worldName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadPrintRequest {\n"); + sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" worldId: ").append(toIndentedString(worldId)).append("\n"); + sb.append(" worldName: ").append(toIndentedString(worldName)).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("image", "note", "timestamp", "worldId", "worldName")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("image", "timestamp")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UploadPrintRequest.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 `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 (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(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(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(java.util.Locale.ROOT, "Expected the field `worldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("worldName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UploadPrintRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UploadPrintRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UploadPrintRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UploadPrintRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UploadPrintRequest read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 b3f80715..c7d4da28 100644 --- a/src/main/java/io/github/vrchatapi/model/User.java +++ b/src/main/java/io/github/vrchatapi/model/User.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,659 +13,1148 @@ package io.github.vrchatapi.model; import 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.AgeVerificationStatus; +import io.github.vrchatapi.model.Badge; 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; + +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 org.threeten.bp.LocalDate; +import java.util.Map; +import java.util.Set; + +import io.github.vrchatapi.JSON; /** * 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) + @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) - private List bioLinks = new ArrayList(); + @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) - private List tags = new ArrayList(); + @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(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; + return this; + } + + /** + * Get ageVerificationStatus + * @return ageVerificationStatus + */ + @javax.annotation.Nonnull + public AgeVerificationStatus getAgeVerificationStatus() { + return ageVerificationStatus; + } + + public void setAgeVerificationStatus(@javax.annotation.Nonnull AgeVerificationStatus ageVerificationStatus) { + this.ageVerificationStatus = ageVerificationStatus; + } + + + 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 + public Boolean getAgeVerified() { + return 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 bio(String bio) { - + public User badges(@javax.annotation.Nullable List badges) { + this.badges = badges; + return this; + } + + public User addBadgesItem(Badge badgesItem) { + if (this.badges == null) { + this.badges = new ArrayList<>(); + } + this.badges.add(badgesItem); + return this; + } + + /** + * + * @return badges + */ + @javax.annotation.Nullable + public List getBadges() { + return badges; + } + + public void setBadges(@javax.annotation.Nullable List badges) { + this.badges = badges; + } + + + 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 currentAvatarThumbnailImageUrl(String currentAvatarThumbnailImageUrl) { - + 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 + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nonnull List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + 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 id(String id) { - + public User friendRequestStatus(@javax.annotation.Nullable String friendRequestStatus) { + this.friendRequestStatus = friendRequestStatus; + return this; + } + + /** + * Get friendRequestStatus + * @return friendRequestStatus + */ + @javax.annotation.Nullable + public String getFriendRequestStatus() { + return friendRequestStatus; + } + + public void setFriendRequestStatus(@javax.annotation.Nullable String friendRequestStatus) { + this.friendRequestStatus = friendRequestStatus; + } + + + 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 = "wrld_ba913a96-fac4-4048-a062-9aa5db092812: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 lastLogin(String lastLogin) { - + 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 + public String getLastActivity() { + return lastActivity; + } + + public void setLastActivity(@javax.annotation.Nonnull String lastActivity) { + this.lastActivity = lastActivity; + } + + + 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 lastPlatform(String lastPlatform) { - + public User lastMobile(@javax.annotation.Nullable String lastMobile) { + this.lastMobile = lastMobile; + return this; + } + + /** + * Get lastMobile + * @return lastMobile + */ + @javax.annotation.Nullable + public String getLastMobile() { + return lastMobile; + } + + public void setLastMobile(@javax.annotation.Nullable String lastMobile) { + this.lastMobile = lastMobile; + } + + + public User lastPlatform(@javax.annotation.Nonnull String lastPlatform) { this.lastPlatform = lastPlatform; return this; } - /** - * This can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison such as `2019.2.4-801-Release` or `2019.2.2-772-Release` or even `unknownplatform`. + /** + * 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 can be `standalonewindows` or `android`, but can also pretty much be any random Unity verison 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; } - /** - * WorldID be \"offline\" on User profiles if you are not friends with that user. + /** + * 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_ba913a96-fac4-4048-a062-9aa5db092812", value = "WorldID be \"offline\" on User profiles if you are not friends with that user.") - public String getLocation() { return location; } - - public void setLocation(String location) { + public void setLocation(@javax.annotation.Nullable String location) { this.location = location; } - public User profilePicOverride(String profilePicOverride) { - + 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 + public String getNote() { + return note; + } + + public void setNote(@javax.annotation.Nullable String note) { + this.note = note; + } + + + public User platform(@javax.annotation.Nullable String platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + */ + @javax.annotation.Nullable + public String getPlatform() { + return platform; + } + + public void setPlatform(@javax.annotation.Nullable String platform) { + this.platform = platform; + } + + + 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 state(UserState state) { - + public User profilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; + return this; + } + + /** + * Get profilePicOverrideThumbnail + * @return profilePicOverrideThumbnail + */ + @javax.annotation.Nonnull + public String getProfilePicOverrideThumbnail() { + return profilePicOverrideThumbnail; + } + + public void setProfilePicOverrideThumbnail(@javax.annotation.Nonnull String profilePicOverrideThumbnail) { + this.profilePicOverrideThumbnail = profilePicOverrideThumbnail; + } + + + public User pronouns(@javax.annotation.Nonnull String pronouns) { + this.pronouns = pronouns; + return this; + } + + /** + * Get pronouns + * @return pronouns + */ + @javax.annotation.Nonnull + public String getPronouns() { + return pronouns; + } + + public void setPronouns(@javax.annotation.Nonnull String pronouns) { + this.pronouns = pronouns; + } + + + 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; } - /** - * 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 User userIcon(String userIcon) { - + public User 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 User 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 User 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 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. + /** + * -| 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 - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, 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 + */ + @Deprecated + @javax.annotation.Nullable 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_ba913a96-fac4-4048-a062-9aa5db092812", 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -675,60 +1164,113 @@ public boolean equals(Object o) { return false; } User user = (User) o; - return Objects.equals(this.allowAvatarCopying, user.allowAvatarCopying) && + return Objects.equals(this.ageVerificationStatus, user.ageVerificationStatus) && + 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) && + Objects.equals(this.currentAvatarTags, user.currentAvatarTags) && Objects.equals(this.currentAvatarThumbnailImageUrl, user.currentAvatarThumbnailImageUrl) && Objects.equals(this.dateJoined, user.dateJoined) && Objects.equals(this.developerType, user.developerType) && 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) && Objects.equals(this.state, user.state) && Objects.equals(this.status, user.status) && Objects.equals(this.statusDescription, user.statusDescription) && Objects.equals(this.tags, user.tags) && + Objects.equals(this.travelingToInstance, user.travelingToInstance) && + Objects.equals(this.travelingToLocation, user.travelingToLocation) && + Objects.equals(this.travelingToWorld, user.travelingToWorld) && Objects.equals(this.userIcon, user.userIcon) && Objects.equals(this.username, user.username) && Objects.equals(this.worldId, user.worldId); } + 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(allowAvatarCopying, bio, bioLinks, currentAvatarImageUrl, currentAvatarThumbnailImageUrl, dateJoined, developerType, displayName, friendKey, id, instanceId, isFriend, lastLogin, lastPlatform, location, profilePicOverride, state, status, statusDescription, tags, 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) { + 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 User {\n"); + 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(" 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"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); sb.append(" currentAvatarThumbnailImageUrl: ").append(toIndentedString(currentAvatarThumbnailImageUrl)).append("\n"); sb.append(" dateJoined: ").append(toIndentedString(dateJoined)).append("\n"); sb.append(" developerType: ").append(toIndentedString(developerType)).append("\n"); 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"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" statusDescription: ").append(toIndentedString(statusDescription)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).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(" userIcon: ").append(toIndentedString(userIcon)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" worldId: ").append(toIndentedString(worldId)).append("\n"); @@ -741,11 +1283,231 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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", "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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!User.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 `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 (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(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("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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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("userIcon").isJsonPrimitive()) { + 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(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(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 (!User.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'User' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(User.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, User value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public User read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..bf8af1d3 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UserCreditsEligible.java @@ -0,0 +1,234 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UserCreditsEligible + */ +@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(@javax.annotation.Nonnull Boolean eligible) { + this.eligible = eligible; + return this; + } + + /** + * Get eligible + * @return eligible + */ + @javax.annotation.Nonnull + public Boolean getEligible() { + return eligible; + } + + public void setEligible(@javax.annotation.Nonnull Boolean eligible) { + this.eligible = eligible; + } + + + public UserCreditsEligible reason(@javax.annotation.Nullable String reason) { + this.reason = reason; + return this; + } + + /** + * Get reason + * @return reason + */ + @javax.annotation.Nullable + public String getReason() { + return reason; + } + + public void setReason(@javax.annotation.Nullable String reason) { + this.reason = reason; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserCreditsEligible userCreditsEligible = (UserCreditsEligible) o; + return Objects.equals(this.eligible, userCreditsEligible.eligible) && + Objects.equals(this.reason, userCreditsEligible.reason); + } + + @Override + public int hashCode() { + return Objects.hash(eligible, reason); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserCreditsEligible {\n"); + sb.append(" eligible: ").append(toIndentedString(eligible)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).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("eligible", "reason")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserCreditsEligible.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 `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 (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(java.util.Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserCreditsEligible.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserCreditsEligible' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserCreditsEligible.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserCreditsEligible value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserCreditsEligible read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 61785eab..051b6d2f 100644 --- a/src/main/java/io/github/vrchatapi/model/UserExists.java +++ b/src/main/java/io/github/vrchatapi/model/UserExists.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,50 +13,94 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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 userExists(Boolean userExists) { - + public UserExists nameOk(@javax.annotation.Nullable Boolean nameOk) { + this.nameOk = nameOk; + return this; + } + + /** + * Is the username valid? + * @return nameOk + */ + @javax.annotation.Nullable + public Boolean getNameOk() { + return nameOk; + } + + public void setNameOk(@javax.annotation.Nullable Boolean nameOk) { + this.nameOk = nameOk; + } + + + 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -66,18 +110,20 @@ public boolean equals(Object o) { return false; } UserExists userExists = (UserExists) o; - return Objects.equals(this.userExists, userExists.userExists); + return Objects.equals(this.nameOk, userExists.nameOk) && + Objects.equals(this.userExists, userExists.userExists); } @Override public int hashCode() { - return Objects.hash(userExists); + return Objects.hash(nameOk, userExists); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserExists {\n"); + sb.append(" nameOk: ").append(toIndentedString(nameOk)).append("\n"); sb.append(" userExists: ").append(toIndentedString(userExists)).append("\n"); sb.append("}"); return sb.toString(); @@ -88,11 +134,98 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("nameOk", "userExists")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserExists.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserExists.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserExists' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserExists.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserExists value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserExists read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..90b865ea --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UserNote.java @@ -0,0 +1,353 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.UserNoteTargetUser; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * UserNote + */ +@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(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public UserNote id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + + public UserNote note(@javax.annotation.Nonnull String note) { + this.note = note; + return this; + } + + /** + * Get note + * @return note + */ + @javax.annotation.Nonnull + public String getNote() { + return note; + } + + public void setNote(@javax.annotation.Nonnull String note) { + this.note = note; + } + + + public UserNote targetUser(@javax.annotation.Nullable UserNoteTargetUser targetUser) { + this.targetUser = targetUser; + return this; + } + + /** + * Get targetUser + * @return targetUser + */ + @javax.annotation.Nullable + public UserNoteTargetUser getTargetUser() { + return targetUser; + } + + public void setTargetUser(@javax.annotation.Nullable UserNoteTargetUser targetUser) { + this.targetUser = targetUser; + } + + + 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 + public String getTargetUserId() { + return targetUserId; + } + + public void setTargetUserId(@javax.annotation.Nonnull String targetUserId) { + this.targetUserId = targetUserId; + } + + + 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 + public String getUserId() { + return userId; + } + + public void setUserId(@javax.annotation.Nonnull String userId) { + this.userId = userId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserNote userNote = (UserNote) o; + return Objects.equals(this.createdAt, userNote.createdAt) && + Objects.equals(this.id, userNote.id) && + Objects.equals(this.note, userNote.note) && + Objects.equals(this.targetUser, userNote.targetUser) && + Objects.equals(this.targetUserId, userNote.targetUserId) && + Objects.equals(this.userId, userNote.userId); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, id, note, targetUser, targetUserId, userId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserNote {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" targetUser: ").append(toIndentedString(targetUser)).append("\n"); + sb.append(" targetUserId: ").append(toIndentedString(targetUserId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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("createdAt", "id", "note", "targetUser", "targetUserId", "userId")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("createdAt", "id", "note", "targetUserId", "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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserNote.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 `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 (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(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(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.validateJsonElement(jsonObj.get("targetUser")); + } + if (!jsonObj.get("targetUserId").isJsonPrimitive()) { + 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(java.util.Locale.ROOT, "Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserNote.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserNote' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserNote.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserNote value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserNote read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..9030de88 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UserNoteTargetUser.java @@ -0,0 +1,369 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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.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; + +/** + * UserNoteTargetUser + */ +@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) + @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(@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 UserNoteTargetUser currentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + return this; + } + + public UserNoteTargetUser addCurrentAvatarTagsItem(String currentAvatarTagsItem) { + if (this.currentAvatarTags == null) { + this.currentAvatarTags = new ArrayList<>(); + } + this.currentAvatarTags.add(currentAvatarTagsItem); + return this; + } + + /** + * Get currentAvatarTags + * @return currentAvatarTags + */ + @javax.annotation.Nullable + public List getCurrentAvatarTags() { + return currentAvatarTags; + } + + public void setCurrentAvatarTags(@javax.annotation.Nullable List currentAvatarTags) { + this.currentAvatarTags = currentAvatarTags; + } + + + 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 + public String getCurrentAvatarThumbnailImageUrl() { + return currentAvatarThumbnailImageUrl; + } + + public void setCurrentAvatarThumbnailImageUrl(@javax.annotation.Nullable String currentAvatarThumbnailImageUrl) { + this.currentAvatarThumbnailImageUrl = currentAvatarThumbnailImageUrl; + } + + + public UserNoteTargetUser 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 UserNoteTargetUser profilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + return this; + } + + /** + * Get profilePicOverride + * @return profilePicOverride + */ + @javax.annotation.Nullable + public String getProfilePicOverride() { + return profilePicOverride; + } + + public void setProfilePicOverride(@javax.annotation.Nullable String profilePicOverride) { + this.profilePicOverride = profilePicOverride; + } + + + public UserNoteTargetUser userIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + return this; + } + + /** + * Get userIcon + * @return userIcon + */ + @javax.annotation.Nullable + public String getUserIcon() { + return userIcon; + } + + public void setUserIcon(@javax.annotation.Nullable String userIcon) { + this.userIcon = userIcon; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserNoteTargetUser userNoteTargetUser = (UserNoteTargetUser) o; + return Objects.equals(this.id, userNoteTargetUser.id) && + Objects.equals(this.currentAvatarTags, userNoteTargetUser.currentAvatarTags) && + Objects.equals(this.currentAvatarThumbnailImageUrl, userNoteTargetUser.currentAvatarThumbnailImageUrl) && + Objects.equals(this.displayName, userNoteTargetUser.displayName) && + Objects.equals(this.profilePicOverride, userNoteTargetUser.profilePicOverride) && + Objects.equals(this.userIcon, userNoteTargetUser.userIcon); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, currentAvatarTags, currentAvatarThumbnailImageUrl, displayName, profilePicOverride, userIcon); + } + + 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 UserNoteTargetUser {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" currentAvatarTags: ").append(toIndentedString(currentAvatarTags)).append("\n"); + sb.append(" currentAvatarThumbnailImageUrl: ").append(toIndentedString(currentAvatarThumbnailImageUrl)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" profilePicOverride: ").append(toIndentedString(profilePicOverride)).append("\n"); + sb.append(" userIcon: ").append(toIndentedString(userIcon)).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("id", "currentAvatarTags", "currentAvatarThumbnailImageUrl", "displayName", "profilePicOverride", "userIcon")); + + // 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserNoteTargetUser.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 `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(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").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(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(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(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(java.util.Locale.ROOT, "Expected the field `userIcon` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userIcon").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserNoteTargetUser.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserNoteTargetUser' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserNoteTargetUser.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserNoteTargetUser value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserNoteTargetUser read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 d8f5ad95..021fd39b 100644 --- a/src/main/java/io/github/vrchatapi/model/UserState.java +++ b/src/main/java/io/github/vrchatapi/model/UserState.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,10 +28,10 @@ @JsonAdapter(UserState.Adapter.class) public enum UserState { - OFFLINE("offline"), - ACTIVE("active"), + OFFLINE("offline"), + ONLINE("online"); private String value; @@ -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 35afad02..0572c25f 100644 --- a/src/main/java/io/github/vrchatapi/model/UserStatus.java +++ b/src/main/java/io/github/vrchatapi/model/UserStatus.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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; @@ -31,12 +30,12 @@ public enum UserStatus { ACTIVE("active"), - JOIN_ME("join me"), - ASK_ME("ask me"), BUSY("busy"), + JOIN_ME("join me"), + OFFLINE("offline"); private String value; @@ -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 e0cb522f..28dadc69 100644 --- a/src/main/java/io/github/vrchatapi/model/UserSubscription.java +++ b/src/main/java/io/github/vrchatapi/model/UserSubscription.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -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,430 +20,461 @@ 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 org.threeten.bp.OffsetDateTime; -/** - * UserSubscription - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserSubscription { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; +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; - public static final String SERIALIZED_NAME_TRANSACTION_ID = "transactionId"; - @SerializedName(SERIALIZED_NAME_TRANSACTION_ID) - private String transactionId; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; - public static final String SERIALIZED_NAME_STORE = "store"; - @SerializedName(SERIALIZED_NAME_STORE) - private String store; +import io.github.vrchatapi.JSON; - public static final String SERIALIZED_NAME_STEAM_ITEM_ID = "steamItemId"; - @SerializedName(SERIALIZED_NAME_STEAM_ITEM_ID) - private String steamItemId; +/** + * + */ +@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_TIER = "tier"; - @SerializedName(SERIALIZED_NAME_TIER) - private BigDecimal tier; - - public static final String SERIALIZED_NAME_ACTIVE = "active"; - @SerializedName(SERIALIZED_NAME_ACTIVE) - private Boolean active = true; + 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_EXPIRES = "expires"; - @SerializedName(SERIALIZED_NAME_EXPIRES) - private OffsetDateTime expires; + 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_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + 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 static final String SERIALIZED_NAME_LICENSE_GROUPS = "licenseGroups"; - @SerializedName(SERIALIZED_NAME_LICENSE_GROUPS) - private List licenseGroups = new ArrayList(); - - public static final String SERIALIZED_NAME_IS_GIFT = "isGift"; - @SerializedName(SERIALIZED_NAME_IS_GIFT) - private Boolean isGift = false; - + public UserSubscription() { + } - public UserSubscription id(String id) { - - this.id = id; + public UserSubscription active(@javax.annotation.Nonnull Boolean active) { + this.active = active; return this; } - /** - * Get id - * @return id - **/ + /** + * Get active + * @return active + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getId() { - return id; + public Boolean getActive() { + return active; } - - public void setId(String id) { - this.id = id; + public void setActive(@javax.annotation.Nonnull Boolean active) { + this.active = active; } - public UserSubscription transactionId(String transactionId) { - - this.transactionId = transactionId; + public UserSubscription amount(@javax.annotation.Nonnull BigDecimal amount) { + this.amount = amount; return this; } - /** - * Get transactionId - * @return transactionId - **/ + /** + * Get amount + * @return amount + */ @javax.annotation.Nonnull - @ApiModelProperty(example = "txn_e5c72948-e735-4880-8245-24b2a41198b0", required = true, value = "") - - public String getTransactionId() { - return transactionId; + public BigDecimal getAmount() { + return amount; } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; + public void setAmount(@javax.annotation.Nonnull BigDecimal amount) { + this.amount = amount; } - public UserSubscription store(String store) { - - this.store = store; + public UserSubscription createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; return this; } - /** - * Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\". - * @return store - **/ + /** + * Get createdAt + * @return createdAt + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\".") + public OffsetDateTime getCreatedAt() { + return createdAt; + } - public String getStore() { - return store; + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; } - public void setStore(String store) { - this.store = store; + public UserSubscription description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; } + /** + * Get description + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } - public UserSubscription steamItemId(String steamItemId) { - - this.steamItemId = steamItemId; - return this; + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; } - /** - * Get steamItemId - * @return steamItemId - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - public String getSteamItemId() { - return steamItemId; + public UserSubscription expires(@javax.annotation.Nonnull OffsetDateTime expires) { + this.expires = expires; + return this; } + /** + * Get expires + * @return expires + */ + @javax.annotation.Nonnull + public OffsetDateTime getExpires() { + return expires; + } - public void setSteamItemId(String steamItemId) { - this.steamItemId = steamItemId; + public void setExpires(@javax.annotation.Nonnull OffsetDateTime expires) { + this.expires = expires; } - public UserSubscription amount(BigDecimal amount) { - - this.amount = amount; + public UserSubscription id(@javax.annotation.Nonnull String id) { + this.id = id; return this; } - /** - * Get amount - * @return amount - **/ + /** + * Get id + * @return id + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getAmount() { - return amount; + public String getId() { + return id; } - - public void setAmount(BigDecimal amount) { - this.amount = amount; + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; } - public UserSubscription description(String description) { - - this.description = description; + public UserSubscription isBulkGift(@javax.annotation.Nonnull Boolean isBulkGift) { + this.isBulkGift = isBulkGift; return this; } - /** - * Get description - * @return description - **/ + /** + * Get isBulkGift + * @return isBulkGift + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public String getDescription() { - return description; + public Boolean getIsBulkGift() { + return isBulkGift; } - - public void setDescription(String description) { - this.description = description; + public void setIsBulkGift(@javax.annotation.Nonnull Boolean isBulkGift) { + this.isBulkGift = isBulkGift; } - public UserSubscription period(SubscriptionPeriod period) { - - this.period = period; + public UserSubscription isGift(@javax.annotation.Nonnull Boolean isGift) { + this.isGift = isGift; return this; } - /** - * Get period - * @return period - **/ + /** + * Get isGift + * @return isGift + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public Boolean getIsGift() { + return isGift; + } - public SubscriptionPeriod getPeriod() { - return period; + public void setIsGift(@javax.annotation.Nonnull Boolean isGift) { + this.isGift = isGift; } - public void setPeriod(SubscriptionPeriod period) { - this.period = period; + public UserSubscription licenseGroups(@javax.annotation.Nonnull List licenseGroups) { + this.licenseGroups = licenseGroups; + return this; } - - public UserSubscription tier(BigDecimal tier) { - - this.tier = tier; + public UserSubscription addLicenseGroupsItem(String licenseGroupsItem) { + if (this.licenseGroups == null) { + this.licenseGroups = new ArrayList<>(); + } + this.licenseGroups.add(licenseGroupsItem); return this; } - /** - * Get tier - * @return tier - **/ + /** + * Get licenseGroups + * @return licenseGroups + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public BigDecimal getTier() { - return tier; + public List getLicenseGroups() { + return licenseGroups; } - - public void setTier(BigDecimal tier) { - this.tier = tier; + public void setLicenseGroups(@javax.annotation.Nonnull List licenseGroups) { + this.licenseGroups = licenseGroups; } - public UserSubscription active(Boolean active) { - - this.active = active; + public UserSubscription period(@javax.annotation.Nonnull SubscriptionPeriod period) { + this.period = period; return this; } - /** - * Get active - * @return active - **/ + /** + * Get period + * @return period + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") + public SubscriptionPeriod getPeriod() { + return period; + } - public Boolean getActive() { - return active; + public void setPeriod(@javax.annotation.Nonnull SubscriptionPeriod period) { + this.period = period; } - public void setActive(Boolean active) { - this.active = active; + public UserSubscription starts(@javax.annotation.Nullable String starts) { + this.starts = starts; + return this; } + /** + * Get starts + * @return starts + */ + @javax.annotation.Nullable + public String getStarts() { + return starts; + } - public UserSubscription status(TransactionStatus status) { - + public void setStarts(@javax.annotation.Nullable String starts) { + this.starts = starts; + } + + + 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 expires(OffsetDateTime expires) { - - this.expires = expires; + public UserSubscription steamItemId(@javax.annotation.Nullable String steamItemId) { + this.steamItemId = steamItemId; return this; } - /** - * Get expires - * @return expires - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public OffsetDateTime getExpires() { - return expires; + /** + * Get steamItemId + * @return steamItemId + */ + @javax.annotation.Nullable + public String getSteamItemId() { + return steamItemId; } - - public void setExpires(OffsetDateTime expires) { - this.expires = expires; + public void setSteamItemId(@javax.annotation.Nullable String steamItemId) { + this.steamItemId = steamItemId; } - public UserSubscription createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; + public UserSubscription store(@javax.annotation.Nonnull String store) { + this.store = store; return this; } - /** - * Get createdAt - * @return createdAt - **/ + /** + * Which \"Store\" it came from. Right now only Stores are \"Steam\" and \"Admin\". + * @return store + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public OffsetDateTime getCreatedAt() { - return createdAt; + public String getStore() { + return store; } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public void setStore(@javax.annotation.Nonnull String store) { + this.store = store; } - public UserSubscription updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; + public UserSubscription tier(@javax.annotation.Nonnull Integer tier) { + this.tier = tier; return this; } - /** - * Get updatedAt - * @return updatedAt - **/ + /** + * Get tier + * @return tier + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public OffsetDateTime getUpdatedAt() { - return updatedAt; + public Integer getTier() { + return tier; } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + public void setTier(@javax.annotation.Nonnull Integer tier) { + this.tier = tier; } - public UserSubscription licenseGroups(List licenseGroups) { - - this.licenseGroups = licenseGroups; - return this; - } - - public UserSubscription addLicenseGroupsItem(String licenseGroupsItem) { - this.licenseGroups.add(licenseGroupsItem); + public UserSubscription transactionId(@javax.annotation.Nonnull String transactionId) { + this.transactionId = transactionId; return this; } - /** - * Get licenseGroups - * @return licenseGroups - **/ + /** + * Get transactionId + * @return transactionId + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public List getLicenseGroups() { - return licenseGroups; + public String getTransactionId() { + return transactionId; } - - public void setLicenseGroups(List licenseGroups) { - this.licenseGroups = licenseGroups; + public void setTransactionId(@javax.annotation.Nonnull String transactionId) { + this.transactionId = transactionId; } - public UserSubscription isGift(Boolean isGift) { - - this.isGift = isGift; + public UserSubscription updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; return this; } - /** - * Get isGift - * @return isGift - **/ + /** + * Get updatedAt + * @return updatedAt + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Boolean getIsGift() { - return isGift; + public OffsetDateTime getUpdatedAt() { + return updatedAt; } - - public void setIsGift(Boolean isGift) { - this.isGift = isGift; + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; } + @Override public boolean equals(Object o) { if (this == o) { @@ -454,47 +484,51 @@ public boolean equals(Object o) { return false; } UserSubscription userSubscription = (UserSubscription) o; - return Objects.equals(this.id, userSubscription.id) && - Objects.equals(this.transactionId, userSubscription.transactionId) && - Objects.equals(this.store, userSubscription.store) && - Objects.equals(this.steamItemId, userSubscription.steamItemId) && + return Objects.equals(this.active, userSubscription.active) && Objects.equals(this.amount, userSubscription.amount) && + Objects.equals(this.createdAt, userSubscription.createdAt) && Objects.equals(this.description, userSubscription.description) && - Objects.equals(this.period, userSubscription.period) && - Objects.equals(this.tier, userSubscription.tier) && - Objects.equals(this.active, userSubscription.active) && - Objects.equals(this.status, userSubscription.status) && Objects.equals(this.expires, userSubscription.expires) && - Objects.equals(this.createdAt, userSubscription.createdAt) && - Objects.equals(this.updatedAt, userSubscription.updatedAt) && + Objects.equals(this.id, userSubscription.id) && + Objects.equals(this.isBulkGift, userSubscription.isBulkGift) && + Objects.equals(this.isGift, userSubscription.isGift) && Objects.equals(this.licenseGroups, userSubscription.licenseGroups) && - Objects.equals(this.isGift, userSubscription.isGift); + Objects.equals(this.period, userSubscription.period) && + Objects.equals(this.starts, userSubscription.starts) && + Objects.equals(this.status, userSubscription.status) && + Objects.equals(this.steamItemId, userSubscription.steamItemId) && + Objects.equals(this.store, userSubscription.store) && + Objects.equals(this.tier, userSubscription.tier) && + Objects.equals(this.transactionId, userSubscription.transactionId) && + Objects.equals(this.updatedAt, userSubscription.updatedAt); } @Override public int hashCode() { - return Objects.hash(id, transactionId, store, steamItemId, amount, description, period, tier, active, status, expires, createdAt, updatedAt, licenseGroups, isGift); + return Objects.hash(active, amount, createdAt, description, expires, id, isBulkGift, isGift, licenseGroups, period, starts, status, steamItemId, store, tier, transactionId, updatedAt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UserSubscription {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); - sb.append(" store: ").append(toIndentedString(store)).append("\n"); - sb.append(" steamItemId: ").append(toIndentedString(steamItemId)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isBulkGift: ").append(toIndentedString(isBulkGift)).append("\n"); + sb.append(" isGift: ").append(toIndentedString(isGift)).append("\n"); + sb.append(" licenseGroups: ").append(toIndentedString(licenseGroups)).append("\n"); sb.append(" period: ").append(toIndentedString(period)).append("\n"); - sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); - sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" starts: ").append(toIndentedString(starts)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" steamItemId: ").append(toIndentedString(steamItemId)).append("\n"); + sb.append(" store: ").append(toIndentedString(store)).append("\n"); + sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" licenseGroups: ").append(toIndentedString(licenseGroups)).append("\n"); - sb.append(" isGift: ").append(toIndentedString(isGift)).append("\n"); sb.append("}"); return sb.toString(); } @@ -504,11 +538,126 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserSubscription.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 `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 (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(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(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(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(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(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(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(java.util.Locale.ROOT, "Expected the field `transactionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transactionId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserSubscription.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserSubscription' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserSubscription.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserSubscription value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserSubscription read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 new file mode 100644 index 00000000..37d16ae2 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/UserSubscriptionEligible.java @@ -0,0 +1,335 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * UserSubscriptionEligible + */ +@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(@javax.annotation.Nonnull Boolean activeCancelledSubscription) { + this.activeCancelledSubscription = activeCancelledSubscription; + return this; + } + + /** + * Get activeCancelledSubscription + * @return activeCancelledSubscription + */ + @javax.annotation.Nonnull + public Boolean getActiveCancelledSubscription() { + return activeCancelledSubscription; + } + + public void setActiveCancelledSubscription(@javax.annotation.Nonnull Boolean activeCancelledSubscription) { + this.activeCancelledSubscription = activeCancelledSubscription; + } + + + public UserSubscriptionEligible giftEligible(@javax.annotation.Nonnull Boolean giftEligible) { + this.giftEligible = giftEligible; + return this; + } + + /** + * Get giftEligible + * @return giftEligible + */ + @javax.annotation.Nonnull + public Boolean getGiftEligible() { + return giftEligible; + } + + public void setGiftEligible(@javax.annotation.Nonnull Boolean giftEligible) { + this.giftEligible = giftEligible; + } + + + public UserSubscriptionEligible nonExtendVendorWillLoseGiftTime(@javax.annotation.Nonnull Boolean nonExtendVendorWillLoseGiftTime) { + this.nonExtendVendorWillLoseGiftTime = nonExtendVendorWillLoseGiftTime; + return this; + } + + /** + * Get nonExtendVendorWillLoseGiftTime + * @return nonExtendVendorWillLoseGiftTime + */ + @javax.annotation.Nonnull + public Boolean getNonExtendVendorWillLoseGiftTime() { + return nonExtendVendorWillLoseGiftTime; + } + + public void setNonExtendVendorWillLoseGiftTime(@javax.annotation.Nonnull Boolean nonExtendVendorWillLoseGiftTime) { + this.nonExtendVendorWillLoseGiftTime = nonExtendVendorWillLoseGiftTime; + } + + + public UserSubscriptionEligible purchaseEligible(@javax.annotation.Nonnull Boolean purchaseEligible) { + this.purchaseEligible = purchaseEligible; + return this; + } + + /** + * Get purchaseEligible + * @return purchaseEligible + */ + @javax.annotation.Nonnull + public Boolean getPurchaseEligible() { + return purchaseEligible; + } + + public void setPurchaseEligible(@javax.annotation.Nonnull Boolean purchaseEligible) { + this.purchaseEligible = purchaseEligible; + } + + + public UserSubscriptionEligible subscriptionEligible(@javax.annotation.Nonnull Boolean subscriptionEligible) { + this.subscriptionEligible = subscriptionEligible; + return this; + } + + /** + * Get subscriptionEligible + * @return subscriptionEligible + */ + @javax.annotation.Nonnull + public Boolean getSubscriptionEligible() { + return subscriptionEligible; + } + + public void setSubscriptionEligible(@javax.annotation.Nonnull Boolean subscriptionEligible) { + this.subscriptionEligible = subscriptionEligible; + } + + + public UserSubscriptionEligible subscriptionOnAltAccount(@javax.annotation.Nonnull Boolean subscriptionOnAltAccount) { + this.subscriptionOnAltAccount = subscriptionOnAltAccount; + return this; + } + + /** + * Get subscriptionOnAltAccount + * @return subscriptionOnAltAccount + */ + @javax.annotation.Nonnull + public Boolean getSubscriptionOnAltAccount() { + return subscriptionOnAltAccount; + } + + public void setSubscriptionOnAltAccount(@javax.annotation.Nonnull Boolean subscriptionOnAltAccount) { + this.subscriptionOnAltAccount = subscriptionOnAltAccount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserSubscriptionEligible userSubscriptionEligible = (UserSubscriptionEligible) o; + return Objects.equals(this.activeCancelledSubscription, userSubscriptionEligible.activeCancelledSubscription) && + Objects.equals(this.giftEligible, userSubscriptionEligible.giftEligible) && + Objects.equals(this.nonExtendVendorWillLoseGiftTime, userSubscriptionEligible.nonExtendVendorWillLoseGiftTime) && + Objects.equals(this.purchaseEligible, userSubscriptionEligible.purchaseEligible) && + Objects.equals(this.subscriptionEligible, userSubscriptionEligible.subscriptionEligible) && + Objects.equals(this.subscriptionOnAltAccount, userSubscriptionEligible.subscriptionOnAltAccount); + } + + @Override + public int hashCode() { + return Objects.hash(activeCancelledSubscription, giftEligible, nonExtendVendorWillLoseGiftTime, purchaseEligible, subscriptionEligible, subscriptionOnAltAccount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserSubscriptionEligible {\n"); + sb.append(" activeCancelledSubscription: ").append(toIndentedString(activeCancelledSubscription)).append("\n"); + sb.append(" giftEligible: ").append(toIndentedString(giftEligible)).append("\n"); + sb.append(" nonExtendVendorWillLoseGiftTime: ").append(toIndentedString(nonExtendVendorWillLoseGiftTime)).append("\n"); + sb.append(" purchaseEligible: ").append(toIndentedString(purchaseEligible)).append("\n"); + sb.append(" subscriptionEligible: ").append(toIndentedString(subscriptionEligible)).append("\n"); + sb.append(" subscriptionOnAltAccount: ").append(toIndentedString(subscriptionOnAltAccount)).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("activeCancelledSubscription", "giftEligible", "nonExtendVendorWillLoseGiftTime", "purchaseEligible", "subscriptionEligible", "subscriptionOnAltAccount")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("activeCancelledSubscription", "giftEligible", "nonExtendVendorWillLoseGiftTime", "purchaseEligible", "subscriptionEligible", "subscriptionOnAltAccount")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UserSubscriptionEligible.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UserSubscriptionEligible.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UserSubscriptionEligible' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UserSubscriptionEligible.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UserSubscriptionEligible value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UserSubscriptionEligible read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 new file mode 100644 index 00000000..bca22a85 --- /dev/null +++ b/src/main/java/io/github/vrchatapi/model/Verify2FAEmailCodeResult.java @@ -0,0 +1,205 @@ +/* + * VRChat API Documentation + * + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.github.vrchatapi.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; + +/** + * Verify2FAEmailCodeResult + */ +@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(@javax.annotation.Nonnull Boolean verified) { + this.verified = verified; + return this; + } + + /** + * Get verified + * @return verified + */ + @javax.annotation.Nonnull + public Boolean getVerified() { + return verified; + } + + public void setVerified(@javax.annotation.Nonnull Boolean verified) { + this.verified = verified; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Verify2FAEmailCodeResult verify2FAEmailCodeResult = (Verify2FAEmailCodeResult) o; + return Objects.equals(this.verified, verify2FAEmailCodeResult.verified); + } + + @Override + public int hashCode() { + return Objects.hash(verified); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Verify2FAEmailCodeResult {\n"); + sb.append(" verified: ").append(toIndentedString(verified)).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("verified")); + + // a set of required properties/fields (JSON key names) + 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 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Verify2FAEmailCodeResult.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Verify2FAEmailCodeResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Verify2FAEmailCodeResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Verify2FAEmailCodeResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Verify2FAEmailCodeResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Verify2FAEmailCodeResult read(JsonReader in) throws IOException { + 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 + */ + 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 + */ + 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 a794672b..43a3641b 100644 --- a/src/main/java/io/github/vrchatapi/model/Verify2FAResult.java +++ b/src/main/java/io/github/vrchatapi/model/Verify2FAResult.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,49 +13,94 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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 verified(Boolean verified) { - + public Verify2FAResult enabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + */ + @javax.annotation.Nullable + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(@javax.annotation.Nullable Boolean enabled) { + this.enabled = enabled; + } + + + 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -65,18 +110,20 @@ public boolean equals(Object o) { return false; } Verify2FAResult verify2FAResult = (Verify2FAResult) o; - return Objects.equals(this.verified, verify2FAResult.verified); + return Objects.equals(this.enabled, verify2FAResult.enabled) && + Objects.equals(this.verified, verify2FAResult.verified); } @Override public int hashCode() { - return Objects.hash(verified); + return Objects.hash(enabled, verified); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Verify2FAResult {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); sb.append("}"); return sb.toString(); @@ -87,11 +134,98 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("enabled", "verified")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Verify2FAResult.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Verify2FAResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Verify2FAResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Verify2FAResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Verify2FAResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Verify2FAResult read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 2821ddb7..9044c7af 100644 --- a/src/main/java/io/github/vrchatapi/model/VerifyAuthTokenResult.java +++ b/src/main/java/io/github/vrchatapi/model/VerifyAuthTokenResult.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,76 +13,94 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -116,11 +134,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("ok", "token")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!VerifyAuthTokenResult.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 `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 (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(java.util.Locale.ROOT, "Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VerifyAuthTokenResult.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VerifyAuthTokenResult' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(VerifyAuthTokenResult.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, VerifyAuthTokenResult value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public VerifyAuthTokenResult read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 b236328f..e5d8f850 100644 --- a/src/main/java/io/github/vrchatapi/model/World.java +++ b/src/main/java/io/github/vrchatapi/model/World.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,920 +13,893 @@ package io.github.vrchatapi.model; import 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.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; -import org.threeten.bp.OffsetDateTime; + +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; /** - * World + * */ -@javax.annotation.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_ASSET_URL = "assetUrl"; - @SerializedName(SERIALIZED_NAME_ASSET_URL) - private String assetUrl; - - public static final String SERIALIZED_NAME_ASSET_URL_OBJECT = "assetUrlObject"; - @SerializedName(SERIALIZED_NAME_ASSET_URL_OBJECT) - 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_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_PLUGIN_URL_OBJECT = "pluginUrlObject"; - @SerializedName(SERIALIZED_NAME_PLUGIN_URL_OBJECT) - private Object pluginUrlObject; - 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) - private List tags = new ArrayList(); + @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_OBJECT = "unityPackageUrlObject"; - @SerializedName(SERIALIZED_NAME_UNITY_PACKAGE_URL_OBJECT) - private Object unityPackageUrlObject; + public static final String SERIALIZED_NAME_UDON_PRODUCTS = "udonProducts"; + @SerializedName(SERIALIZED_NAME_UDON_PRODUCTS) + @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 = new ArrayList(); + @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) + @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) - private Integer visits = 0; - - - public World assetUrl(String assetUrl) { - - this.assetUrl = assetUrl; - return this; - } - - /** - * Empty if unauthenticated. - * @return assetUrl - **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Empty if unauthenticated.") - - public String getAssetUrl() { - return assetUrl; - } - - - public void setAssetUrl(String assetUrl) { - this.assetUrl = assetUrl; - } - - - public World assetUrlObject(Object assetUrlObject) { - - this.assetUrlObject = assetUrlObject; - return this; - } - - /** - * Get assetUrlObject - * @return assetUrlObject - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Object getAssetUrlObject() { - return assetUrlObject; - } - + private Integer visits = 0; - public void setAssetUrlObject(Object assetUrlObject) { - this.assetUrlObject = assetUrlObject; + 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 - * minimum: 0 - * maximum: 40 * @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 description(String description) { - + public World defaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { + this.defaultContentSettings = defaultContentSettings; + return this; + } + + /** + * Get defaultContentSettings + * @return defaultContentSettings + */ + @javax.annotation.Nullable + public InstanceContentSettings getDefaultContentSettings() { + return defaultContentSettings; + } + + public void setDefaultContentSettings(@javax.annotation.Nullable InstanceContentSettings defaultContentSettings) { + this.defaultContentSettings = defaultContentSettings; + } + + + 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_ba913a96-fac4-4048-a062-9aa5db092812", 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; } public World addInstancesItem(List instancesItem) { if (this.instances == null) { - this.instances = new ArrayList>(); + this.instances = new ArrayList<>(); } this.instances.add(instancesItem); return this; } - /** - * Get instances + /** + * Will always be an empty list when unauthenticated. * @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; } - 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.Nonnull - @ApiModelProperty(required = true, value = "") - + */ + @javax.annotation.Nullable 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; } - /** - * Get occupants + /** + * Will always be `0` when unauthenticated. * minimum: 0 * @return occupants - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "47", value = "") - 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 pluginUrlObject(Object pluginUrlObject) { - - this.pluginUrlObject = pluginUrlObject; - return this; - } - - /** - * Get pluginUrlObject - * @return pluginUrlObject - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Object getPluginUrlObject() { - return pluginUrlObject; - } - - - public void setPluginUrlObject(Object pluginUrlObject) { - this.pluginUrlObject = pluginUrlObject; - } - - - 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; } - /** - * Get privateOccupants + /** + * Will always be `0` when unauthenticated. * minimum: 0 * @return privateOccupants - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "1", value = "") - 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; } - /** - * Get publicOccupants + /** + * Will always be `0` when unauthenticated. * minimum: 0 * @return publicOccupants - **/ + */ @javax.annotation.Nullable - @ApiModelProperty(example = "46", value = "") - 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 releaseStatus(ReleaseStatus releaseStatus) { - + public World recommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + return this; + } + + /** + * Get recommendedCapacity + * @return recommendedCapacity + */ + @javax.annotation.Nonnull + public Integer getRecommendedCapacity() { + return recommendedCapacity; + } + + public void setRecommendedCapacity(@javax.annotation.Nonnull Integer recommendedCapacity) { + this.recommendedCapacity = recommendedCapacity; + } + + + 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 tags(List tags) { - + public World storeId(@javax.annotation.Nullable String storeId) { + this.storeId = storeId; + return this; + } + + /** + * Get storeId + * @return storeId + */ + @javax.annotation.Nullable + public String getStoreId() { + return storeId; + } + + public void setStoreId(@javax.annotation.Nullable String storeId) { + this.storeId = storeId; + } + + + 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; } - /** - * 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 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 unityPackageUrlObject(Object unityPackageUrlObject) { - - this.unityPackageUrlObject = unityPackageUrlObject; + public World udonProducts(@javax.annotation.Nullable List udonProducts) { + this.udonProducts = udonProducts; return this; } - /** - * Get unityPackageUrlObject - * @return unityPackageUrlObject - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Object getUnityPackageUrlObject() { - return unityPackageUrlObject; + public World addUdonProductsItem(String udonProductsItem) { + if (this.udonProducts == null) { + this.udonProducts = new ArrayList<>(); + } + this.udonProducts.add(udonProductsItem); + return this; } + /** + * Get udonProducts + * @return udonProducts + */ + @javax.annotation.Nullable + public List getUdonProducts() { + return udonProducts; + } - public void setUnityPackageUrlObject(Object unityPackageUrlObject) { - this.unityPackageUrlObject = unityPackageUrlObject; + 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; } public World addUnityPackagesItem(UnityPackage unityPackagesItem) { + if (this.unityPackages == null) { + this.unityPackages = new ArrayList<>(); + } this.unityPackages.add(unityPackagesItem); return this; } - /** + /** * Empty if unauthenticated. * @return unityPackages - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Empty if unauthenticated.") - + */ + @javax.annotation.Nullable 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 version(Integer version) { - + public World urlList(@javax.annotation.Nullable List urlList) { + this.urlList = urlList; + return this; + } + + public World addUrlListItem(String urlListItem) { + if (this.urlList == null) { + this.urlList = new ArrayList<>(); + } + this.urlList.add(urlListItem); + return this; + } + + /** + * Get urlList + * @return urlList + */ + @javax.annotation.Nullable + public List getUrlList() { + return urlList; + } + + public void setUrlList(@javax.annotation.Nullable List urlList) { + this.urlList = urlList; + } + + + 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -936,12 +909,11 @@ public boolean equals(Object o) { return false; } World world = (World) o; - return Objects.equals(this.assetUrl, world.assetUrl) && - Objects.equals(this.assetUrlObject, world.assetUrlObject) && - Objects.equals(this.authorId, world.authorId) && + return Objects.equals(this.authorId, world.authorId) && Objects.equals(this.authorName, world.authorName) && Objects.equals(this.capacity, world.capacity) && Objects.equals(this.createdAt, world.createdAt) && + Objects.equals(this.defaultContentSettings, world.defaultContentSettings) && Objects.equals(this.description, world.description) && Objects.equals(this.favorites, world.favorites) && Objects.equals(this.featured, world.featured) && @@ -954,18 +926,20 @@ public boolean equals(Object o) { Objects.equals(this.namespace, world.namespace) && Objects.equals(this.occupants, world.occupants) && Objects.equals(this.organization, world.organization) && - Objects.equals(this.pluginUrlObject, world.pluginUrlObject) && Objects.equals(this.popularity, world.popularity) && Objects.equals(this.previewYoutubeId, world.previewYoutubeId) && Objects.equals(this.privateOccupants, world.privateOccupants) && Objects.equals(this.publicOccupants, world.publicOccupants) && Objects.equals(this.publicationDate, world.publicationDate) && + Objects.equals(this.recommendedCapacity, world.recommendedCapacity) && Objects.equals(this.releaseStatus, world.releaseStatus) && + Objects.equals(this.storeId, world.storeId) && Objects.equals(this.tags, world.tags) && Objects.equals(this.thumbnailImageUrl, world.thumbnailImageUrl) && - Objects.equals(this.unityPackageUrlObject, world.unityPackageUrlObject) && + Objects.equals(this.udonProducts, world.udonProducts) && Objects.equals(this.unityPackages, world.unityPackages) && Objects.equals(this.updatedAt, world.updatedAt) && + Objects.equals(this.urlList, world.urlList) && Objects.equals(this.version, world.version) && Objects.equals(this.visits, world.visits); } @@ -976,7 +950,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(assetUrl, assetUrlObject, authorId, authorName, capacity, createdAt, description, favorites, featured, heat, id, imageUrl, instances, labsPublicationDate, name, namespace, occupants, organization, pluginUrlObject, popularity, previewYoutubeId, privateOccupants, publicOccupants, publicationDate, releaseStatus, tags, thumbnailImageUrl, unityPackageUrlObject, unityPackages, updatedAt, version, visits); + return Objects.hash(authorId, authorName, capacity, createdAt, 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, updatedAt, urlList, version, visits); } private static int hashCodeNullable(JsonNullable a) { @@ -990,12 +964,11 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class World {\n"); - sb.append(" assetUrl: ").append(toIndentedString(assetUrl)).append("\n"); - sb.append(" assetUrlObject: ").append(toIndentedString(assetUrlObject)).append("\n"); sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); sb.append(" capacity: ").append(toIndentedString(capacity)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" defaultContentSettings: ").append(toIndentedString(defaultContentSettings)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" favorites: ").append(toIndentedString(favorites)).append("\n"); sb.append(" featured: ").append(toIndentedString(featured)).append("\n"); @@ -1008,18 +981,20 @@ public String toString() { sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" occupants: ").append(toIndentedString(occupants)).append("\n"); sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" pluginUrlObject: ").append(toIndentedString(pluginUrlObject)).append("\n"); sb.append(" popularity: ").append(toIndentedString(popularity)).append("\n"); sb.append(" previewYoutubeId: ").append(toIndentedString(previewYoutubeId)).append("\n"); sb.append(" privateOccupants: ").append(toIndentedString(privateOccupants)).append("\n"); sb.append(" publicOccupants: ").append(toIndentedString(publicOccupants)).append("\n"); sb.append(" publicationDate: ").append(toIndentedString(publicationDate)).append("\n"); + sb.append(" recommendedCapacity: ").append(toIndentedString(recommendedCapacity)).append("\n"); sb.append(" releaseStatus: ").append(toIndentedString(releaseStatus)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" thumbnailImageUrl: ").append(toIndentedString(thumbnailImageUrl)).append("\n"); - sb.append(" unityPackageUrlObject: ").append(toIndentedString(unityPackageUrlObject)).append("\n"); + sb.append(" udonProducts: ").append(toIndentedString(udonProducts)).append("\n"); sb.append(" unityPackages: ").append(toIndentedString(unityPackages)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" urlList: ").append(toIndentedString(urlList)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" visits: ").append(toIndentedString(visits)).append("\n"); sb.append("}"); @@ -1031,11 +1006,175 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("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(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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!World.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 `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 (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(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(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.validateJsonElement(jsonObj.get("defaultContentSettings")); + } + if (!jsonObj.get("description").isJsonPrimitive()) { + 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(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(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").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(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(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(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(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(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(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(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(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(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").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(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.validateJsonElement(jsonArrayunityPackages.get(i)); + }; + } + } + // ensure the optional json data is an array if present + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!World.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'World' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(World.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, World value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public World read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 3f0cd2aa..71350eed 100644 --- a/src/main/java/io/github/vrchatapi/model/WorldMetadata.java +++ b/src/main/java/io/github/vrchatapi/model/WorldMetadata.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,76 +13,94 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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_ba913a96-fac4-4048-a062-9aa5db092812", 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; } + @Override public boolean equals(Object o) { if (this == o) { @@ -116,11 +134,101 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("id", "metadata")); + + // a set of required properties/fields (JSON key names) + 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WorldMetadata.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 `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 (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(java.util.Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WorldMetadata.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WorldMetadata' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WorldMetadata.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WorldMetadata value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WorldMetadata read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + 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 db171bda..d53f54ef 100644 --- a/src/main/java/io/github/vrchatapi/model/WorldPublishStatus.java +++ b/src/main/java/io/github/vrchatapi/model/WorldPublishStatus.java @@ -1,8 +1,8 @@ /* * VRChat API Documentation * - * The version of the OpenAPI document: 1.6.9 - * Contact: me@ruby.js.org + * The version of the OpenAPI document: 1.20.8 + * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,49 +13,70 @@ package io.github.vrchatapi.model; import 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; +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; /** * 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_PUBILSH = "canPubilsh"; - @SerializedName(SERIALIZED_NAME_CAN_PUBILSH) - private Boolean canPubilsh = true; + 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 canPubilsh(Boolean canPubilsh) { - - this.canPubilsh = canPubilsh; + public WorldPublishStatus canPublish(@javax.annotation.Nonnull Boolean canPublish) { + this.canPublish = canPublish; return this; } - /** - * Get canPubilsh - * @return canPubilsh - **/ + /** + * Get canPublish + * @return canPublish + */ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public Boolean getCanPubilsh() { - return canPubilsh; + public Boolean getCanPublish() { + return canPublish; } - - public void setCanPubilsh(Boolean canPubilsh) { - this.canPubilsh = canPubilsh; + public void setCanPublish(@javax.annotation.Nonnull Boolean canPublish) { + this.canPublish = canPublish; } + @Override public boolean equals(Object o) { if (this == o) { @@ -65,19 +86,19 @@ public boolean equals(Object o) { return false; } WorldPublishStatus worldPublishStatus = (WorldPublishStatus) o; - return Objects.equals(this.canPubilsh, worldPublishStatus.canPubilsh); + return Objects.equals(this.canPublish, worldPublishStatus.canPublish); } @Override public int hashCode() { - return Objects.hash(canPubilsh); + return Objects.hash(canPublish); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WorldPublishStatus {\n"); - sb.append(" canPubilsh: ").append(toIndentedString(canPubilsh)).append("\n"); + sb.append(" canPublish: ").append(toIndentedString(canPublish)).append("\n"); sb.append("}"); return sb.toString(); } @@ -87,11 +108,98 @@ public String toString() { * (except the first line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; + 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("canPublish")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("canPublish")); + } + + /** + * Validates the 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 = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!WorldPublishStatus.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 `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 (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 { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WorldPublishStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WorldPublishStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WorldPublishStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, WorldPublishStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public WorldPublishStatus read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); } - return o.toString().replace("\n", "\n "); } + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } }